Documentation
¶
Index ¶
Constants ¶
View Source
const (
LocalUserDomain = "local"
)
Variables ¶
View Source
var ( // AdminUserName is the default username that we give to the default admin // user that is created as part of every Juju bootstrap. AdminUserName = Name{/* contains filtered or unexported fields */} )
Functions ¶
func IsValidName ¶
IsValidName returns whether the given name is a valid user name string.
Types ¶
type Name ¶
type Name struct {
// contains filtered or unexported fields
}
Name represents the identity of a user.
func NewName ¶
NewName validates the name and returns a new Name object. If the name is not valid an error satisfying errors.NotValid will be returned.
func (Name) Domain ¶
Domain returns the user domain. Users in the local database are from the LocalDomain. Other users are considered 'remote' users.
type UUID ¶
type UUID string
UUID is a unique identifier for a user.
func (UUID) Validate ¶
Validate returns an error if the UUID is invalid. The error returned satisfies errors.NotValid.
type User ¶
type User struct {
// UUID is the unique identifier for the user.
UUID UUID
// Name is the username of the user.
Name Name
// DisplayName is a user-friendly name represent the user as.
DisplayName string
// CreatorUUID is the associated user that created this user.
CreatorUUID UUID
// CreatorName is the name of the user that created this user.
CreatorName Name
// CreatedAt is the time that the user was created at.
CreatedAt time.Time
// LastLogin is the last time the user logged in.
LastLogin time.Time
// Disabled is true if the user is disabled.
Disabled bool
}
User represents a user in the system.
Click to show internal directories.
Click to hide internal directories.