Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrDuplicateKey = errors.New("Duplicate key") ErrInvalidKey = errors.New("Invalid key") ErrKeyNotFound = errors.New("Key not found") )
View Source
var ( ErrUserAlreadyExists = errors.New("user already exists") ErrUserNotFound = errors.New("user not found") )
Functions ¶
func AddKey ¶
AddKey adds new SSH keys to the list of user keys for the provided username.
Returns an error in case the user does not exist.
func Remove ¶
Removes a user. Also removes it's associated keys from authorized_keys and repositories It handles user with repositories specially when: - a user has at least one repository:
- if he/she is the only one with access to the repository, the removal will stop and return an error
- if there are more than one user with access to the repository, gandalf will first revoke user's access and then remove the user permanently
- a user has no repositories: gandalf will simply remove the user
Types ¶
type InvalidUserError ¶
type InvalidUserError struct {
// contains filtered or unexported fields
}
func (*InvalidUserError) Error ¶
func (err *InvalidUserError) Error() string
Click to show internal directories.
Click to hide internal directories.