ginm

package module
v0.0.0-...-edd9449 Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2017 License: MIT Imports: 7 Imported by: 0

README

gin-mongodb-middleware

Documentation

Index

Constants

View Source
const (
	RouteNew = 1 << iota
	RouteList
	RouteGet
	RouteUpdate
	RoutePatch
	RouteDelete
	RouteALL = RouteNew | RouteList | RouteGet | RouteUpdate | RoutePatch | RouteDelete
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Blueprint

type Blueprint struct {
	// contains filtered or unexported fields
}

Blueprint ...

func NewBlueprint

func NewBlueprint(instance interface{}, database, collection string) *Blueprint

func (*Blueprint) Delete

func (b *Blueprint) Delete(c *gin.Context)

func (*Blueprint) Get

func (b *Blueprint) Get(c *gin.Context)

func (*Blueprint) List

func (b *Blueprint) List(c *gin.Context)

func (*Blueprint) New

func (b *Blueprint) New(c *gin.Context)

func (*Blueprint) Patch

func (b *Blueprint) Patch(c *gin.Context)

func (*Blueprint) Routes

func (b *Blueprint) Routes(r gin.IRoutes, routes ...int)

func (*Blueprint) Update

func (b *Blueprint) Update(c *gin.Context)

type Middleware

type Middleware struct {
	// contains filtered or unexported fields
}

func NewMiddleware

func NewMiddleware(session *mgo.Session) *Middleware

func (*Middleware) Connect

func (m *Middleware) Connect(c *gin.Context)

type PostCreate

type PostCreate interface {
	PostCreate() error
}

type PostDelete

type PostDelete interface {
	PostDelete() error
}

type PostUpdate

type PostUpdate interface {
	PostUpdate(pre interface{}) error
}

type PreCreate

type PreCreate interface {
	PreCreate() error
}

type PreDelete

type PreDelete interface {
	PreDelete() error
}

type PreUpdate

type PreUpdate interface {
	PreUpdate() error
}

Jump to

Keyboard shortcuts

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