Documentation
¶
Index ¶
- Constants
- type HashAlgorithm
- type Htgroups
- func (this *Htgroups) AddUserToGroup(user, group string) error
- func (this *Htgroups) Groups() []string
- func (this *Htgroups) GroupsForUser(user string) []string
- func (this *Htgroups) RemoveUserFromGroup(user, group string) error
- func (this *Htgroups) String() string
- func (this *Htgroups) UserInGroup(user, group string) bool
- func (this *Htgroups) UsersForGroup(group string) []string
- func (this *Htgroups) Write(w io.Writer) error
- type Htpasswd
- func (this *Htpasswd) Delete(name string)
- func (this *Htpasswd) Exists(user string) bool
- func (this *Htpasswd) Set(name, passwd string, hash HashAlgorithm) error
- func (this *Htpasswd) String() string
- func (this *Htpasswd) Users() []string
- func (this *Htpasswd) Verify(name, passwd string) bool
- func (this *Htpasswd) Write(w io.Writer) error
Constants ¶
View Source
const (
GroupPrefix = "@"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HashAlgorithm ¶
type HashAlgorithm int
const ( BCrypt HashAlgorithm = iota MD5 SHA )
func (HashAlgorithm) String ¶
func (a HashAlgorithm) String() string
type Htgroups ¶ added in v1.0.24
type Htgroups struct {
// contains filtered or unexported fields
}
func (*Htgroups) AddUserToGroup ¶ added in v1.0.24
Add user to a group
func (*Htgroups) GroupsForUser ¶ added in v1.0.24
Return groups for a user
func (*Htgroups) RemoveUserFromGroup ¶ added in v1.0.24
Remove user from a group
func (*Htgroups) UserInGroup ¶ added in v1.0.24
Return true if a user is a member of a group
func (*Htgroups) UsersForGroup ¶ added in v1.0.24
Return users for a group
type Htpasswd ¶
type Htpasswd struct {
// contains filtered or unexported fields
}
func (*Htpasswd) Set ¶
func (this *Htpasswd) Set(name, passwd string, hash HashAlgorithm) error
Set a password for a user with a named hashing algorithm
Click to show internal directories.
Click to hide internal directories.