web

package
v0.0.0-...-3e31bc8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 4, 2017 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Create

func Create(model Model, session *mgo.Session) http.Handler

func Delete

func Delete(model Model, session *mgo.Session) http.Handler

func List

func List(model ModelSlice, session *mgo.Session) http.Handler

func MustEnv

func MustEnv(key string) (value string)

func NewDBSession

func NewDBSession() *mgo.Session

func NewServer

func NewServer(handler http.Handler) *http.Server

func Retrieve

func Retrieve(model Model, session *mgo.Session) http.Handler

func RunServer

func RunServer(server *http.Server)

func Update

func Update(model Model, session *mgo.Session) http.Handler

Types

type Model

type Model interface {
	ModelName() string
	SetId(bson.ObjectId)
	GetId() bson.ObjectId
}

type ModelSlice

type ModelSlice interface {
	ModelName() string
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL