Documentation
¶
Overview ¶
Package users contains methods for creating and managing users and their ssh keys.
Index ¶
Constants ¶
View Source
const ( NullAction UserAction = "null" Create = "create" Disable = "disable" )
View Source
const DefaultHomeBase = "/home"
View Source
const DefaultShell = "/bin/bash"
Variables ¶
This section is empty.
Functions ¶
func MakeNewGroup ¶
func ProcessUsers ¶
ProcessUsers updates or create users as needed.
Types ¶
type User ¶
type User struct {
*user.User
AuthorizedKeys []string
Shell string
Action UserAction
Groups []string
PrimaryGroup string
// contains filtered or unexported fields
}
type UserAction ¶
type UserAction string
type UserExtDataClient ¶
func NewUserExtDataClient ¶
func NewUserExtDataClient(c *consul.Client, userKeyPrefix string) *UserExtDataClient
func (*UserExtDataClient) GetUsers ¶
func (c *UserExtDataClient) GetUsers(userList []*groups.Member) ([]*User, error)
get user information out of consul, get any that are present on the
func (*UserExtDataClient) UpdateUsers ¶
func (c *UserExtDataClient) UpdateUsers(userGaggle []*User) error
type UserInfo ¶
type UserInfo struct {
Username string `json:"username"`
Name string `json:"full_name"`
Groups []string `json:"groups"`
PrimaryGroup string `json:"primary_group"`
HomeDir string `json:"home_dir"`
Shell string `json:"shell"`
Action UserAction `json:"action"`
DoesNotExist bool `json:"does_not_exist"`
AuthorizedKeys []string `json:"authorized_keys"`
}
Click to show internal directories.
Click to hide internal directories.