Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultUserStoreMock = UserStoreMock{"test": 1}
DefaultUserStoreMock default mock UserStore
View Source
var Root = UserFunc(func(args ...interface{}) (int64, error) { return 1, nil })
Root for root user
Functions ¶
This section is empty.
Types ¶
type Etcd ¶
type Etcd struct { *etcd.KV *etcd.Incrementer }
Etcd for a UserStore using etcdkv
func (*Etcd) CreateUserByUniqueID ¶
CreateUserByUniqueID creates a user with the given uniqueID
type MySQL ¶
MySQL wraps a mysql service
func (*MySQL) CreateUserByUniqueID ¶
CreateUserByUniqueID implements UserStore
type SQLite ¶
SQLite wraps a mysql service
func (*SQLite) CreateUserByUniqueID ¶
CreateUserByUniqueID implements UserStore
type UserSQLite ¶
UserSQLite stores a user into MySQL
type UserStore ¶
type UserStore interface { GetUserIDByUniqueID(uniqueID string) (int64, error) CreateUserByUniqueID(uniqueID string) (int64, error) }
UserStore for user storage
var DefaultUserStore UserStore
DefaultUserStore default store for user
type UserStoreMock ¶
UserStoreMock mock a user store with a map
func (UserStoreMock) CreateUserByUniqueID ¶
func (u UserStoreMock) CreateUserByUniqueID(uniqueID string) (int64, error)
CreateUserByUniqueID implements UserStore
func (UserStoreMock) GetUserIDByUniqueID ¶
func (u UserStoreMock) GetUserIDByUniqueID(uniqueID string) (int64, error)
GetUserIDByUniqueID implements UserStore
Click to show internal directories.
Click to hide internal directories.