Documentation ¶
Index ¶
- Constants
- func RandomString(tam int) string
- func SetContext(ctx *Context) gin.HandlerFunc
- type Context
- func (ctx *Context) AuthUser(email, password string) *User
- func (ctx *Context) CheckAdmin()
- func (ctx *Context) DoMigrations()
- func (ctx *Context) GetSessionByToken(token string) *Session
- func (c *Context) Init()
- func (ctx *Context) LoginUser(user *User) string
- func (c *Context) SetupUserEP()
- func (c *Context) Start()
- func (ctx *Context) StartDB() error
- type LoginJSON
- type Session
- type User
Constants ¶
View Source
const ADMIN_EMAIL string = "admin@outbarriers.com"
View Source
const ADMIN_PASSWORD string = "icansee"
View Source
const DBSTRING string = "outbarriers:outbarriers@/outbarriers?charset=utf8&parseTime=True"
View Source
const LISTENADDR string = "127.0.0.1:3344"
Variables ¶
This section is empty.
Functions ¶
func RandomString ¶
Types ¶
type Context ¶
type Context struct { Handler *gin.Engine REST *gin.RouterGroup DB gorm.DB UserREST *gin.RouterGroup }
func NewContext ¶
func NewContext() *Context
func (*Context) CheckAdmin ¶
func (ctx *Context) CheckAdmin()
func (*Context) DoMigrations ¶
func (ctx *Context) DoMigrations()
func (*Context) GetSessionByToken ¶
func (*Context) SetupUserEP ¶
func (c *Context) SetupUserEP()
Source Files ¶
Click to show internal directories.
Click to hide internal directories.