Documentation
¶
Index ¶
- Constants
- func LastConnection(connectionTime *time.Time, now time.Time, exact bool) string
- func NewAddCommand() cmd.Command
- func NewChangePasswordCommand() cmd.Command
- func NewDisableCommand() cmd.Command
- func NewEnableCommand() cmd.Command
- func NewListCommand() cmd.Command
- func NewShowUserCommand() cmd.Command
- func NewSwitchUserCommand() cmd.Command
- func UserFriendlyDuration(when, now time.Time) string
- type AddUserAPI
- type ChangePasswordAPI
- type UserInfo
- type UserInfoAPI
Constants ¶
View Source
const ShowUserCommandDoc = `` /* 950-byte string literal not displayed */
Variables ¶
This section is empty.
Functions ¶
func LastConnection ¶
LastConnection turns the *time.Time returned from the API server into a user facing string with either exact time or a user friendly string based on the args.
Types ¶
type AddUserAPI ¶
type AddUserAPI interface {
AddUser(username, displayName, password string, modelUUIDs ...string) (names.UserTag, []byte, error)
Close() error
}
AddUserAPI defines the usermanager API methods that the add command uses.
type ChangePasswordAPI ¶
ChangePasswordAPI defines the usermanager API methods that the change password command uses.
type UserInfo ¶
type UserInfo struct {
Username string `yaml:"user-name" json:"user-name"`
DisplayName string `yaml:"display-name" json:"display-name"`
DateCreated string `yaml:"date-created" json:"date-created"`
LastConnection string `yaml:"last-connection" json:"last-connection"`
Disabled bool `yaml:"disabled,omitempty" json:"disabled,omitempty"`
}
UserInfo defines the serialization behaviour of the user information.
type UserInfoAPI ¶
type UserInfoAPI interface {
UserInfo([]string, usermanager.IncludeDisabled) ([]params.UserInfo, error)
Close() error
}
UserInfoAPI defines the API methods that the info command uses.
Source Files
¶
- add.go
- change_password.go
- disenable.go
- info.go
- list.go
- switch.go
- user.go
Click to show internal directories.
Click to hide internal directories.