Versions in this module Expand all Collapse all v0 v0.1.0 Jan 28, 2016 Changes in this version + type AuthEngine struct + Cfg *config.Model + Dao *Dao + Db *gorm.DB + Render *render.Render + Session *Session + SiteDao *site.Dao + Token token.Provider + func (p *AuthEngine) Asserts() []*core.Template + func (p *AuthEngine) Migrate() + func (p *AuthEngine) Mount(rt core.Router) + func (p *AuthEngine) Rss() rss.Handler + func (p *AuthEngine) Seed() error + func (p *AuthEngine) Shell() []cli.Command + func (p *AuthEngine) Sitemap() sitemap.Handler + type Dao struct + Db *gorm.DB + func (p *Dao) Allow(role uint, user uint, dur time.Duration) error + func (p *Dao) Can(user uint, name string, resource_type string, resource_id uint) bool + func (p *Dao) Deny(role uint, user uint) error + func (p *Dao) GetUser(uid string) (*User, error) + func (p *Dao) Is(user uint, name string) bool + func (p *Dao) ListUser() []User + func (p *Dao) Log(user uint, message string) error + func (p *Dao) Role(name string, resource_type string, resource_id uint) (*Role, error) + func (p *Dao) SaveUser(pty, pid, email, name, home, logo string) (*User, error) + type EmailForm struct + Email string + type Google struct + func NewGoogle(cfg *GoogleConf) *Google + func (p *Google) ParseToken(req *http.Request) ([]byte, error) + func (p *Google) Token(code string) ([]byte, error) + func (p *Google) Url() string + type GoogleConf struct + Web GoogleWeb + type GoogleUserInfo struct + Email string + Id string + Link string + Name string + Picture string + type GoogleWeb struct + ClientId string + ClientSecret string + RedirectURLS []string + type Log struct + CreatedAt time.Time + ID uint + Message string + User User + UserID uint + type Oauth interface + Token func(req *http.Request) ([]byte, error) + Url func() string + type PasswordForm struct + Password string + PasswordConfirmation string + Token string + type Permission struct + Begin time.Time + End time.Time + ID uint + Role Role + RoleID uint + User User + UserID uint + func (p *Permission) BeginS() string + func (p *Permission) Enable() bool + func (p *Permission) EndS() string + type Role struct + ID uint + Name string + ResourceId uint + ResourceType string + func (p Role) String() string + type Session struct + Dao *Dao + Db *gorm.DB + Token token.Provider + func (p *Session) Admin(req *http.Request) (*User, error) + func (p *Session) User(req *http.Request) (*User, error) + type SignInForm struct + Email string + Password string + RememberMe bool + type SignUpForm struct + Email string + Password string + PasswordConfirmation string + Username string + type User struct + Email string + Home string + LastSignIn time.Time + Logo string + Name string + Permissions []Permission + ProviderId string + ProviderType string + SignInCount uint + Uid string + func (p *User) SetGravatar() + func (p User) String() string