Documentation
¶
Index ¶
- Constants
- func SyncConfig(resourceName string, b Backend, ...) error
- type Backend
- type BackendDummy
- func (b BackendDummy) CreateGroup(v UserGroup) error
- func (b BackendDummy) CreateUser(v UserGroup) error
- func (b BackendDummy) DeleteGroup(id int) error
- func (b BackendDummy) DeleteUser(id int) error
- func (b BackendDummy) FindGroupByID(id int) (map[string]UserGroup, error)
- func (b BackendDummy) FindGroupByName(name string) (map[string]UserGroup, error)
- func (b BackendDummy) FindUserByID(id int) (map[string]UserGroup, error)
- func (b BackendDummy) FindUserByName(name string) (map[string]UserGroup, error)
- func (b BackendDummy) Groups() (map[string]UserGroup, error)
- func (b BackendDummy) HighestGroupID() int
- func (b BackendDummy) HighestUserID() int
- func (b BackendDummy) LowestGroupID() int
- func (b BackendDummy) LowestUserID() int
- func (b BackendDummy) UpdateGroup(v UserGroup) error
- func (b BackendDummy) UpdateUser(v UserGroup) error
- func (b BackendDummy) Users() (map[string]UserGroup, error)
- type BackendNil
- func (b BackendNil) CreateGroup(v UserGroup) error
- func (b BackendNil) CreateUser(v UserGroup) error
- func (b BackendNil) DeleteGroup(id int) error
- func (b BackendNil) DeleteUser(id int) error
- func (b BackendNil) FindGroupByID(id int) (map[string]UserGroup, error)
- func (b BackendNil) FindGroupByName(name string) (map[string]UserGroup, error)
- func (b BackendNil) FindUserByID(id int) (map[string]UserGroup, error)
- func (b BackendNil) FindUserByName(name string) (map[string]UserGroup, error)
- func (b BackendNil) Groups() (map[string]UserGroup, error)
- func (b BackendNil) HighestGroupID() int
- func (b BackendNil) HighestUserID() int
- func (b BackendNil) LowestGroupID() int
- func (b BackendNil) LowestUserID() int
- func (b BackendNil) UpdateGroup(v UserGroup) error
- func (b BackendNil) UpdateUser(v UserGroup) error
- func (b BackendNil) Users() (map[string]UserGroup, error)
- type BackendRedis
- func (b *BackendRedis) CreateGroup(u UserGroup) error
- func (b *BackendRedis) CreateUser(u UserGroup) error
- func (b *BackendRedis) DelCache(key string)
- func (b *BackendRedis) DeleteGroup(id int) error
- func (b *BackendRedis) DeleteUser(id int) error
- func (b *BackendRedis) FindGroupByID(id int) (map[string]UserGroup, error)
- func (b *BackendRedis) FindGroupByName(name string) (map[string]UserGroup, error)
- func (b *BackendRedis) FindUserByID(id int) (map[string]UserGroup, error)
- func (b *BackendRedis) FindUserByName(name string) (map[string]UserGroup, error)
- func (b *BackendRedis) GetCache(key string) string
- func (b *BackendRedis) Groups() (map[string]UserGroup, error)
- func (b *BackendRedis) HighestGroupID() int
- func (b *BackendRedis) HighestUserID() int
- func (b *BackendRedis) LowestGroupID() int
- func (b *BackendRedis) LowestUserID() int
- func (b *BackendRedis) SetCache(key string, src interface{})
- func (b *BackendRedis) UpdateGroup(us UserGroup) error
- func (b *BackendRedis) UpdateUser(us UserGroup) error
- func (b *BackendRedis) Users() (map[string]UserGroup, error)
- type BackendTomlFile
- func (t BackendTomlFile) CreateGroup(UserGroup) error
- func (t BackendTomlFile) CreateUser(UserGroup) error
- func (t BackendTomlFile) DeleteGroup(int) error
- func (t BackendTomlFile) DeleteUser(int) error
- func (t BackendTomlFile) FindGroupByID(id int) (map[string]UserGroup, error)
- func (t BackendTomlFile) FindGroupByName(name string) (map[string]UserGroup, error)
- func (t BackendTomlFile) FindUserByID(id int) (map[string]UserGroup, error)
- func (t BackendTomlFile) FindUserByName(name string) (map[string]UserGroup, error)
- func (t BackendTomlFile) Groups() (map[string]UserGroup, error)
- func (t BackendTomlFile) HighestGroupID() int
- func (t BackendTomlFile) HighestUserID() int
- func (t BackendTomlFile) LowestGroupID() int
- func (t BackendTomlFile) LowestUserID() int
- func (t BackendTomlFile) UpdateGroup(UserGroup) error
- func (t BackendTomlFile) UpdateUser(UserGroup) error
- func (t BackendTomlFile) Users() (map[string]UserGroup, error)
- type Base
- type Group
- type Groups
- type NotFoundError
- type User
- type UserGroup
- type Users
Constants ¶
View Source
const Highest = 0
View Source
const Lowest = 1
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Backend ¶
type Backend interface { // Getter FindUserByID(int) (map[string]UserGroup, error) FindUserByName(string) (map[string]UserGroup, error) FindGroupByID(int) (map[string]UserGroup, error) FindGroupByName(string) (map[string]UserGroup, error) Users() (map[string]UserGroup, error) Groups() (map[string]UserGroup, error) HighestUserID() int LowestUserID() int HighestGroupID() int LowestGroupID() int // Setter CreateUser(UserGroup) error DeleteUser(int) error UpdateUser(UserGroup) error CreateGroup(UserGroup) error DeleteGroup(int) error UpdateGroup(UserGroup) error }
func NewBackendDummy ¶
func NewBackendNil ¶
type BackendDummy ¶
type BackendDummy struct { }
func (BackendDummy) CreateGroup ¶
func (b BackendDummy) CreateGroup(v UserGroup) error
func (BackendDummy) CreateUser ¶
func (b BackendDummy) CreateUser(v UserGroup) error
func (BackendDummy) DeleteGroup ¶
func (b BackendDummy) DeleteGroup(id int) error
func (BackendDummy) DeleteUser ¶
func (b BackendDummy) DeleteUser(id int) error
func (BackendDummy) FindGroupByID ¶
func (b BackendDummy) FindGroupByID(id int) (map[string]UserGroup, error)
func (BackendDummy) FindGroupByName ¶
func (b BackendDummy) FindGroupByName(name string) (map[string]UserGroup, error)
func (BackendDummy) FindUserByID ¶
func (b BackendDummy) FindUserByID(id int) (map[string]UserGroup, error)
func (BackendDummy) FindUserByName ¶
func (b BackendDummy) FindUserByName(name string) (map[string]UserGroup, error)
func (BackendDummy) HighestGroupID ¶
func (b BackendDummy) HighestGroupID() int
func (BackendDummy) HighestUserID ¶
func (b BackendDummy) HighestUserID() int
func (BackendDummy) LowestGroupID ¶
func (b BackendDummy) LowestGroupID() int
func (BackendDummy) LowestUserID ¶
func (b BackendDummy) LowestUserID() int
func (BackendDummy) UpdateGroup ¶
func (b BackendDummy) UpdateGroup(v UserGroup) error
func (BackendDummy) UpdateUser ¶
func (b BackendDummy) UpdateUser(v UserGroup) error
type BackendNil ¶
type BackendNil struct { }
func (BackendNil) CreateGroup ¶
func (b BackendNil) CreateGroup(v UserGroup) error
func (BackendNil) CreateUser ¶
func (b BackendNil) CreateUser(v UserGroup) error
func (BackendNil) DeleteGroup ¶
func (b BackendNil) DeleteGroup(id int) error
func (BackendNil) DeleteUser ¶
func (b BackendNil) DeleteUser(id int) error
func (BackendNil) FindGroupByID ¶
func (b BackendNil) FindGroupByID(id int) (map[string]UserGroup, error)
func (BackendNil) FindGroupByName ¶
func (b BackendNil) FindGroupByName(name string) (map[string]UserGroup, error)
func (BackendNil) FindUserByID ¶
func (b BackendNil) FindUserByID(id int) (map[string]UserGroup, error)
func (BackendNil) FindUserByName ¶
func (b BackendNil) FindUserByName(name string) (map[string]UserGroup, error)
func (BackendNil) HighestGroupID ¶
func (b BackendNil) HighestGroupID() int
func (BackendNil) HighestUserID ¶
func (b BackendNil) HighestUserID() int
func (BackendNil) LowestGroupID ¶
func (b BackendNil) LowestGroupID() int
func (BackendNil) LowestUserID ¶
func (b BackendNil) LowestUserID() int
func (BackendNil) UpdateGroup ¶
func (b BackendNil) UpdateGroup(v UserGroup) error
func (BackendNil) UpdateUser ¶
func (b BackendNil) UpdateUser(v UserGroup) error
type BackendRedis ¶
func NewBackendRedis ¶
func (*BackendRedis) CreateGroup ¶
func (b *BackendRedis) CreateGroup(u UserGroup) error
func (*BackendRedis) CreateUser ¶
func (b *BackendRedis) CreateUser(u UserGroup) error
func (*BackendRedis) DelCache ¶
func (b *BackendRedis) DelCache(key string)
func (*BackendRedis) DeleteGroup ¶
func (b *BackendRedis) DeleteGroup(id int) error
func (*BackendRedis) DeleteUser ¶
func (b *BackendRedis) DeleteUser(id int) error
func (*BackendRedis) FindGroupByID ¶
func (b *BackendRedis) FindGroupByID(id int) (map[string]UserGroup, error)
func (*BackendRedis) FindGroupByName ¶
func (b *BackendRedis) FindGroupByName(name string) (map[string]UserGroup, error)
func (*BackendRedis) FindUserByID ¶
func (b *BackendRedis) FindUserByID(id int) (map[string]UserGroup, error)
func (*BackendRedis) FindUserByName ¶
func (b *BackendRedis) FindUserByName(name string) (map[string]UserGroup, error)
func (*BackendRedis) GetCache ¶
func (b *BackendRedis) GetCache(key string) string
func (*BackendRedis) HighestGroupID ¶
func (b *BackendRedis) HighestGroupID() int
func (*BackendRedis) HighestUserID ¶
func (b *BackendRedis) HighestUserID() int
func (*BackendRedis) LowestGroupID ¶
func (b *BackendRedis) LowestGroupID() int
func (*BackendRedis) LowestUserID ¶
func (b *BackendRedis) LowestUserID() int
func (*BackendRedis) SetCache ¶
func (b *BackendRedis) SetCache(key string, src interface{})
func (*BackendRedis) UpdateGroup ¶
func (b *BackendRedis) UpdateGroup(us UserGroup) error
func (*BackendRedis) UpdateUser ¶
func (b *BackendRedis) UpdateUser(us UserGroup) error
type BackendTomlFile ¶
type BackendTomlFile struct {
// contains filtered or unexported fields
}
func NewBackendTomlFile ¶
func NewBackendTomlFile(u *Users, g *Groups) (*BackendTomlFile, error)
func (BackendTomlFile) CreateGroup ¶
func (t BackendTomlFile) CreateGroup(UserGroup) error
func (BackendTomlFile) CreateUser ¶
func (t BackendTomlFile) CreateUser(UserGroup) error
func (BackendTomlFile) DeleteGroup ¶
func (t BackendTomlFile) DeleteGroup(int) error
func (BackendTomlFile) DeleteUser ¶
func (t BackendTomlFile) DeleteUser(int) error
func (BackendTomlFile) FindGroupByID ¶
func (t BackendTomlFile) FindGroupByID(id int) (map[string]UserGroup, error)
func (BackendTomlFile) FindGroupByName ¶
func (t BackendTomlFile) FindGroupByName(name string) (map[string]UserGroup, error)
func (BackendTomlFile) FindUserByID ¶
func (t BackendTomlFile) FindUserByID(id int) (map[string]UserGroup, error)
func (BackendTomlFile) FindUserByName ¶
func (t BackendTomlFile) FindUserByName(name string) (map[string]UserGroup, error)
func (BackendTomlFile) HighestGroupID ¶
func (t BackendTomlFile) HighestGroupID() int
func (BackendTomlFile) HighestUserID ¶
func (t BackendTomlFile) HighestUserID() int
func (BackendTomlFile) LowestGroupID ¶
func (t BackendTomlFile) LowestGroupID() int
func (BackendTomlFile) LowestUserID ¶
func (t BackendTomlFile) LowestUserID() int
func (BackendTomlFile) UpdateGroup ¶
func (t BackendTomlFile) UpdateGroup(UserGroup) error
func (BackendTomlFile) UpdateUser ¶
func (t BackendTomlFile) UpdateUser(UserGroup) error
type Base ¶
type Groups ¶
func (*Groups) ToUserGroup ¶
type NotFoundError ¶
type NotFoundError struct {
// contains filtered or unexported fields
}
func NewNotFoundError ¶
func NewNotFoundError(r string, v interface{}) NotFoundError
func (NotFoundError) Error ¶
func (e NotFoundError) Error() string
type User ¶
type User struct { Base `yaml:",inline"` Password string `toml:"password" yaml:"password" json:"password"` GroupID int `toml:"group_id" yaml:"group_id" json:"group_id"` Directory string `toml:"directory" yaml:"directory" json:"directory"` Shell string `toml:"shell" yaml:"shell" json:"shell"` Gecos string `toml:"gecos" yaml:"gecos" json:"gecos"` Keys []string `toml:"keys" yaml:"keys" json:"keys"` LinkUsers []string `toml:"link_users" yaml:"link_users" json:"-"` }
Click to show internal directories.
Click to hide internal directories.