user

package
v0.0.0-...-0000000 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 11, 2016 License: AGPL-3.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const ShowUserCommandDoc = `` /* 950-byte string literal not displayed */

Variables

This section is empty.

Functions

func LastConnection

func LastConnection(connectionTime *time.Time, now time.Time, exact bool) string

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.

func NewAddCommand

func NewAddCommand() cmd.Command

func NewChangePasswordCommand

func NewChangePasswordCommand() cmd.Command

func NewDisableCommand

func NewDisableCommand() cmd.Command

func NewEnableCommand

func NewEnableCommand() cmd.Command

func NewListCommand

func NewListCommand() cmd.Command

func NewShowUserCommand

func NewShowUserCommand() cmd.Command

func NewSwitchUserCommand

func NewSwitchUserCommand() cmd.Command

func UserFriendlyDuration

func UserFriendlyDuration(when, now time.Time) string

UserFriendlyDuration translates a time in the past into a user friendly string representation relative to the "now" time argument.

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

type ChangePasswordAPI interface {
	SetPassword(username, password string) error
	Close() error
}

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
⌂ 换网址