Versions in this module Expand all Collapse all v0 v0.1.3 Sep 11, 2020 Changes in this version + const GuestRoleName + const RootRoleName + const StorePermsPrefix + type Error struct + Errmsg string + Status int + func (ae Error) Error() string + func (ae Error) HTTPStatus() int + type PasswordStore interface + CheckPassword func(user User, password string) bool + HashPassword func(password string) (string, error) + type Permissions struct + KV RWPermission + func (p *Permissions) IsEmpty() bool + func (p Permissions) Grant(n *Permissions) (Permissions, error) + func (p Permissions) Revoke(lg *zap.Logger, n *Permissions) (Permissions, error) + type RWPermission struct + Read []string + Write []string + func (rw RWPermission) Grant(n RWPermission) (RWPermission, error) + func (rw RWPermission) HasAccess(key string, write bool) bool + func (rw RWPermission) HasRecursiveAccess(key string, write bool) bool + func (rw RWPermission) Revoke(lg *zap.Logger, n RWPermission) (RWPermission, error) + type Role struct + Grant *Permissions + Permissions Permissions + Revoke *Permissions + Role string + func (r Role) HasKeyAccess(key string, write bool) bool + func (r Role) HasRecursiveAccess(key string, write bool) bool + type Store interface + AllRoles func() ([]string, error) + AllUsers func() ([]string, error) + AuthEnabled func() bool + CreateOrUpdateUser func(user User) (out User, created bool, err error) + CreateRole func(role Role) error + CreateUser func(user User) (User, error) + DeleteRole func(name string) error + DeleteUser func(name string) error + DisableAuth func() error + EnableAuth func() error + GetRole func(name string) (Role, error) + GetUser func(name string) (User, error) + UpdateRole func(role Role) (Role, error) + UpdateUser func(user User) (User, error) + func NewStore(lg *zap.Logger, server doer, timeout time.Duration) Store + type User struct + Grant []string + Password string + Revoke []string + Roles []string + User string Incompatible versions in this module v3.4.19+incompatible Sep 11, 2020 v3.4.18+incompatible Sep 11, 2020