Documentation
¶
Index ¶
- type GroupRepo
- func (p GroupRepo) All() ([]core.Group, error)
- func (p GroupRepo) Delete(name string) error
- func (p GroupRepo) Exists(name string) (bool, error)
- func (p GroupRepo) Get(name string) (core.Group, error)
- func (p GroupRepo) GroupsFor(userID store.Identity) ([]core.Group, error)
- func (p GroupRepo) Set(group core.Group) error
- type SessionRepo
- func (p SessionRepo) All() ([]core.Session, error)
- func (p SessionRepo) Delete(token string) error
- func (p SessionRepo) DoLogin(req core.LoginRequest, ip string) (core.UserInfo, core.Session, core.LoginResult, error)
- func (p SessionRepo) Exists(token string) (bool, error)
- func (p SessionRepo) GenerateFor(userID store.Identity, ip string) core.Session
- func (p SessionRepo) Get(token string) (core.Session, error)
- func (p SessionRepo) PurgeAll() error
- func (p SessionRepo) Set(session core.Session) error
- func (p SessionRepo) UpdateHeartbeat(session *core.Session, ip string) error
- type UserGroupRepo
- func (p UserGroupRepo) All() ([]core.UserGroup, error)
- func (p UserGroupRepo) Delete(userID store.Identity, groupName string) error
- func (p UserGroupRepo) Exists(userID store.Identity, groupName string) (bool, error)
- func (p UserGroupRepo) Get(userID store.Identity, groupName string) (core.UserGroup, error)
- func (p UserGroupRepo) Set(userGroup core.UserGroup) error
- type UserRepo
- func (p UserRepo) All() ([]core.User, error)
- func (p UserRepo) Count() (int, error)
- func (p UserRepo) Delete(userID store.Identity) error
- func (p UserRepo) Exists(userID store.Identity) (bool, error)
- func (p UserRepo) Get(userID store.Identity) (core.User, error)
- func (p UserRepo) PurgeAll() error
- func (p UserRepo) Set(user core.User) error
- func (p UserRepo) UsersFor(groupName string) ([]core.User, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GroupRepo ¶
type GroupRepo struct {
// contains filtered or unexported fields
}
type SessionRepo ¶
type SessionRepo struct {
// contains filtered or unexported fields
}
func NewSessionRepo ¶
func NewSessionRepo(store database.Storer, db *database.Database) *SessionRepo
func (SessionRepo) Delete ¶
func (p SessionRepo) Delete(token string) error
func (SessionRepo) DoLogin ¶ added in v0.4.0
func (p SessionRepo) DoLogin(req core.LoginRequest, ip string) (core.UserInfo, core.Session, core.LoginResult, error)
DoLogin executes a login request. It returns a user, session (possibly both empty) and a LoginResult. The error will be nil if (and only if) the result is LoginResultError.
func (SessionRepo) Exists ¶
func (p SessionRepo) Exists(token string) (bool, error)
Exists checks whether a specific core.Session exists
func (SessionRepo) GenerateFor ¶
GenerateFor makes a new core.Session for the specified userID but does not check if the id exists or persist anything to the database.
func (SessionRepo) PurgeAll ¶
func (p SessionRepo) PurgeAll() error
func (SessionRepo) Set ¶
func (p SessionRepo) Set(session core.Session) error
Set saves a core.Session to the database
func (SessionRepo) UpdateHeartbeat ¶
func (p SessionRepo) UpdateHeartbeat(session *core.Session, ip string) error
type UserGroupRepo ¶
type UserGroupRepo struct {
// contains filtered or unexported fields
}
func NewUserGroupRepo ¶
func NewUserGroupRepo(store database.Storer, db *database.Database) *UserGroupRepo
func (UserGroupRepo) Delete ¶
func (p UserGroupRepo) Delete(userID store.Identity, groupName string) error
type UserRepo ¶
type UserRepo struct { core.UserSearcher // contains filtered or unexported fields }
func NewUserRepo ¶
Click to show internal directories.
Click to hide internal directories.