Versions in this module Expand all Collapse all v1 v1.0.1 Nov 3, 2017 v1.0.0 Oct 31, 2017 Changes in this version + const CurrentUser + const DefaultResourceID + const DefaultResourceType + const ERROR + const IsAdmin + const NOTICE + const RoleAdmin + const RoleRoot + const SendEmailJob + const TITLE + const UserTypeEmail + const WARNING + func CreateCertificate(ca bool, subject pkix.Name, years int) ([]byte, []byte, error) + func Languages() []string + func WritePemFile(file, _type string, buf []byte, mode os.FileMode) error + type AdminPlugin struct + Cache *web.Cache + DB *pg.DB + Dao *Dao + I18n *web.I18n + Jobber *web.Jobber + Layout *Layout + Redis *redis.Pool + Router *gin.Engine + Settings *web.Settings + func (p *AdminPlugin) Init(*inject.Graph) error + func (p *AdminPlugin) Mount() error + func (p *AdminPlugin) Shell() []cli.Command + type Attachment struct + CreatedAt time.Time + ID uint + Length int64 + MediaType string + ResourceID uint + ResourceType string + Title string + URL string + UpdatedAt time.Time + User User + UserID uint + func (p *Attachment) IsPicture() bool + type AttachmentsPlugin struct + Cache *web.Cache + DB *pg.DB + I18n *web.I18n + Jwt *web.Jwt + Layout *Layout + Router *gin.Engine + S3 *web.S3 + UEditor *web.UEditor + func (p *AttachmentsPlugin) Init(*inject.Graph) error + func (p *AttachmentsPlugin) Mount() error + func (p *AttachmentsPlugin) Shell() []cli.Command + type Card struct + Action string + CreatedAt time.Time + Href string + ID uint + Lang string + Loc string + Logo string + SortOrder int + Summary string + Title string + Type string + UpdatedAt time.Time + type Dao struct + DB *pg.DB + I18n *web.I18n + Security *web.Security + func (p *Dao) AddEmailUser(tx *pg.Tx, name, email, password string) (*User, error) + func (p *Dao) AddLog(tx *pg.Tx, user uint, ip, lang, format string, args ...interface{}) error + func (p *Dao) Allow(tx *pg.Tx, user uint, name, rty string, rid uint, years, months, days int) error + func (p *Dao) Can(user uint, name, rty string, rid uint) bool + func (p *Dao) Deny(tx *pg.Tx, user uint, name, rty string, rid uint) error + func (p *Dao) Is(user uint, role string) bool + func (p *Dao) SignIn(lang, ip, email, password string) (*User, error) + type FriendLink struct + CreatedAt time.Time + Home string + ID uint + Logo string + SortOrder int + Title string + UpdatedAt time.Time + type HomePlugin struct + Cache *web.Cache + DB *pg.DB + Dao *Dao + I18n *web.I18n + Jobber *web.Jobber + Jwt *web.Jwt + Layout *Layout + Router *gin.Engine + Settings *web.Settings + func (p *HomePlugin) Init(g *inject.Graph) error + func (p *HomePlugin) Mount() error + func (p *HomePlugin) Shell() []cli.Command + type Layout struct + DB *pg.DB + Dao *Dao + I18n *web.I18n + Jwt *web.Jwt + Router *gin.Engine + Settings *web.Settings + func (p *Layout) Abort(c *gin.Context, s int, e error) + func (p *Layout) Application(tpl string, fn func(string, gin.H, *gin.Context) error) gin.HandlerFunc + func (p *Layout) CurrentUserMiddleware(c *gin.Context) + func (p *Layout) Home(req *http.Request) string + func (p *Layout) JSON(fn func(string, *gin.Context) (interface{}, error)) gin.HandlerFunc + func (p *Layout) MustAdminMiddleware(c *gin.Context) + func (p *Layout) MustSignInMiddleware(c *gin.Context) + func (p *Layout) Redirect(to string, fn func(string, *gin.Context) error) gin.HandlerFunc + func (p *Layout) UEditor(act string, check func(*User, uint) bool, ...) + func (p *Layout) XML(fn func(string, *gin.Context) (interface{}, error)) gin.HandlerFunc + type LeaveWord struct + Body string + CreatedAt time.Time + ID uint + Type string + type Link struct + CreatedAt time.Time + Href string + ID uint + Label string + Lang string + Loc string + SortOrder int + UpdatedAt time.Time + type Log struct + CreatedAt time.Time + ID uint + IP string + Message string + User *User + UserID uint + func (p Log) String() string + type Policy struct + Begin time.Time + CreatedAt time.Time + End time.Time + ID uint + Role *Role + RoleID uint + UpdatedAt time.Time + User *User + UserID uint + func (p *Policy) Enable() bool + type Role struct + CreatedAt time.Time + ID uint + Name string + ResourceID uint + ResourceType string + UpdatedAt time.Time + func (p Role) String() string + type User struct + ConfirmedAt *time.Time + CreatedAt time.Time + CurrentSignInAt *time.Time + CurrentSignInIP string + Email string + ID uint + LastSignInAt *time.Time + LastSignInIP string + LockedAt *time.Time + Logo string + Logs []Log + Name string + Password []byte + ProviderID string + ProviderType string + SignInCount uint + UID string + UpdatedAt time.Time + func (p *User) IsConfirm() bool + func (p *User) IsLock() bool + func (p *User) SetGravatarLogo() + func (p *User) SetUID() + func (p User) String() string + type UsersPlugin struct + Cache *web.Cache + DB *pg.DB + Dao *Dao + I18n *web.I18n + Jobber *web.Jobber + Jwt *web.Jwt + Layout *Layout + Router *gin.Engine + Security *web.Security + Settings *web.Settings + func (p *UsersPlugin) Init(*inject.Graph) error + func (p *UsersPlugin) Mount() error + func (p *UsersPlugin) Shell() []cli.Command + type Vote struct + CreatedAt time.Time + ID uint + Point int + ResourceID uint + ResourceType string + UpdatedAt time.Time