Documentation
¶
Index ¶
- Constants
- func InvalidRequestParams(message string) interface{}
- type AppEnvironment
- type Env
- func (env *Env) AddUser(login, password string) (err error)
- func (env *Env) Authenticate(login string, password string) (err error)
- func (env *Env) ExportEventRoutes(router *mux.Router)
- func (env *Env) ExportProjectRoutes(router *mux.Router)
- func (env *Env) ExportUserRoutes(router *mux.Router)
- func (env *Env) JWTMiddleware(next http.Handler) http.Handler
- type Resp
Constants ¶
View Source
const ( StatusOk = 0 StatusIntErr = 1 StatusErr = 2 StatusForbidden = 3 StatusExists = 4 )
http functions status
Variables ¶
This section is empty.
Functions ¶
func InvalidRequestParams ¶
func InvalidRequestParams(message string) interface{}
returns struct ready for rendering with text message
Types ¶
type AppEnvironment ¶
type Env ¶
type Env struct { DBEngine mongo.DataStore SigningKey *jwtauth.JWTAuth AllowOrigin string Location *time.Location }
Env - core struct for storing dependencies
func (*Env) Authenticate ¶
Authenticate - returns error, if user not exists or wrong password, else ok
func (*Env) ExportEventRoutes ¶
func (*Env) ExportProjectRoutes ¶
func (*Env) ExportUserRoutes ¶
Source Files
¶
Click to show internal directories.
Click to hide internal directories.