Documentation ¶
Index ¶
- func GetKVs(db *mgo.Database, ks ...string) (map[string]string, error)
- func GetValue(db *mgo.Database, k string) (string, error)
- func GetValues(db *mgo.Database, ks ...string) (map[string]string, error)
- func SetKV(db *mgo.Database, k, v string) error
- func Status(db *mgo.Database) (map[string]interface{}, error)
- type Setting
- type User
- func (u *User) BindGithub(db *mgo.Database, ghAccount *types.GithubAccount) (*User, error)
- func (u *User) IsAdmin() bool
- func (u *User) Login(db *mgo.Database) (*User, error)
- func (u *User) Registry(db *mgo.Database) (*User, error)
- func (u *User) RegistryByGHAccount(db *mgo.Database, ghAcc *types.GithubAccount) (*User, error)
- type UserAuth
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Setting ¶
type Setting struct { Key string `json:"key" bson:"key"` Value string `json:"value" bson:"value"` Created time.Time `json:"created" bson:"created"` }
Setting ...
type User ¶
User ...
func GetUserByGHAccount ¶
GetUserByGHAccount ...
func (*User) BindGithub ¶
func (u *User) BindGithub(db *mgo.Database, ghAccount *types.GithubAccount) (*User, error)
BindGithub ...
func (*User) RegistryByGHAccount ¶
func (u *User) RegistryByGHAccount(db *mgo.Database, ghAcc *types.GithubAccount) (*User, error)
RegistryByGHAccount ...
type UserAuth ¶
types.UserAuth
func AuthSignature ¶
AuthSignature: 验证用户Token
func NewUserAuth ¶
NewUserAuth: 为用户登录认证新建一个Token
Click to show internal directories.
Click to hide internal directories.