Back to / middlewares

Package middlewares

Latest Go to latest

The highest tagged major version is .

Published: Mar 15, 2016 | License: Apache-2.0 | Module:


func Auth

func Auth() gin.HandlerFunc

Auth handles the user authorization in the application.

func NewDatabaseMiddleware

func NewDatabaseMiddleware(host, dbname string) gin.HandlerFunc

func NewGoogleMiddleware

func NewGoogleMiddleware() gin.HandlerFunc

func NewGoogleMiddlewareWithRoundTripper

func NewGoogleMiddlewareWithRoundTripper(roundTripper http.RoundTripper) gin.HandlerFunc

type DB

type DB struct {

func (*DB) C

func (db *DB) C(name string) interfaces.DBCollection

type DBCollection

type DBCollection struct {

func (*DBCollection) AggregationIterator

func (dbc *DBCollection) AggregationIterator(query interface{}) interfaces.DBResultIterator

func (*DBCollection) AggregationOne

func (dbc *DBCollection) AggregationOne(query, result interface{}) error

func (*DBCollection) Find

func (dbc *DBCollection) Find(query interface{}) interfaces.DBQuery

func (*DBCollection) FindOne

func (dbc *DBCollection) FindOne(query interface{}, result interface{}) (bool, error)

FindOne finds the first object matched by the query and stores it into result. Returns whether the object has been found or not and an error.

func (*DBCollection) Insert

func (dbc *DBCollection) Insert(object interface{}) error

type DBConnection

type DBConnection struct {

func (*DBConnection) Clone

func (dbc *DBConnection) Clone() interfaces.DBConnection

func (*DBConnection) DB

func (dbc *DBConnection) DB(name string) interfaces.Database

type DBQuery

type DBQuery struct {

func (*DBQuery) Iterator

func (dbq *DBQuery) Iterator() interfaces.DBResultIterator

type DBResultIterator

type DBResultIterator struct {

type Google

type Google struct {

func (*Google) VerifyToken

func (google *Google) VerifyToken(token string) (*types.User, error)

Package Files

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier