Documentation
¶
Index ¶
- Constants
- func NewSuperCommand() cmd.Command
- type AddCommand
- type AddUserAPI
- type ChangePasswordAPI
- type ChangePasswordCommand
- type DisableCommand
- type DisenableUserAPI
- type DisenableUserBase
- type EnableCommand
- type EnvironInfoCredsWriter
- type InfoCommand
- type InfoCommandBase
- type ListCommand
- type ShareEnvironmentAPI
- type UserCommandBase
- type UserInfo
- type UserInfoAPI
Constants ¶
const InfoCommandDoc = `` /* 958-byte string literal not displayed */
const ListCommandDoc = `
List all the current users in the Juju server.
See Also:
juju user info
`
Variables ¶
This section is empty.
Functions ¶
func NewSuperCommand ¶
NewSuperCommand creates the user supercommand and registers the subcommands that it supports.
Types ¶
type AddCommand ¶
type AddCommand struct {
UserCommandBase
User string
DisplayName string
Password string
OutPath string
Generate bool
}
AddCommand adds new users into a Juju Server.
func (*AddCommand) Init ¶
func (c *AddCommand) Init(args []string) error
Init implements Command.Init.
func (*AddCommand) Run ¶
func (c *AddCommand) Run(ctx *cmd.Context) error
Run implements Command.Run.
func (*AddCommand) SetFlags ¶
func (c *AddCommand) SetFlags(f *gnuflag.FlagSet)
SetFlags implements Command.SetFlags.
type AddUserAPI ¶
type AddUserAPI interface {
AddUser(username, displayName, password string) (names.UserTag, 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 ChangePasswordCommand ¶
type ChangePasswordCommand struct {
UserCommandBase
Password string
Generate bool
OutPath string
User string
}
ChangePasswordCommand changes the password for a user.
func (*ChangePasswordCommand) Info ¶
func (c *ChangePasswordCommand) Info() *cmd.Info
Info implements Command.Info.
func (*ChangePasswordCommand) Init ¶
func (c *ChangePasswordCommand) Init(args []string) error
Init implements Command.Init.
func (*ChangePasswordCommand) Run ¶
func (c *ChangePasswordCommand) Run(ctx *cmd.Context) error
Run implements Command.Run.
func (*ChangePasswordCommand) SetFlags ¶
func (c *ChangePasswordCommand) SetFlags(f *gnuflag.FlagSet)
SetFlags implements Command.SetFlags.
type DisableCommand ¶
type DisableCommand struct {
DisenableUserBase
}
DisableCommand disables users.
func (*DisableCommand) Info ¶
func (c *DisableCommand) Info() *cmd.Info
Info implements Command.Info.
type DisenableUserAPI ¶
type DisenableUserAPI interface {
EnableUser(username string) error
DisableUser(username string) error
Close() error
}
DisenableUserAPI defines the API methods that the disable and enable commands use.
type DisenableUserBase ¶
type DisenableUserBase struct {
UserCommandBase
// contains filtered or unexported fields
}
DisenableUserBase common code for enable/disable user commands
func (*DisenableUserBase) Init ¶
func (c *DisenableUserBase) Init(args []string) error
Init implements Command.Init.
type EnvironInfoCredsWriter ¶
type EnvironInfoCredsWriter interface {
Write() error
SetAPICredentials(creds configstore.APICredentials)
Location() string
}
EnvironInfoCredsWriter defines methods of the configstore API info that are used to change the password.
type InfoCommand ¶
type InfoCommand struct {
InfoCommandBase
Username string
}
InfoCommand retrieves information about a single user.
func (*InfoCommand) Init ¶
func (c *InfoCommand) Init(args []string) (err error)
Init implements Command.Init.
func (*InfoCommand) Run ¶
func (c *InfoCommand) Run(ctx *cmd.Context) (err error)
Run implements Command.Run.
func (*InfoCommand) SetFlags ¶
func (c *InfoCommand) SetFlags(f *gnuflag.FlagSet)
SetFlags implements Command.SetFlags.
type InfoCommandBase ¶
type InfoCommandBase struct {
UserCommandBase
// contains filtered or unexported fields
}
InfoCommandBase is a common base for 'juju user info' and 'juju user list'.
func (*InfoCommandBase) SetFlags ¶
func (c *InfoCommandBase) SetFlags(f *gnuflag.FlagSet)
type ListCommand ¶
type ListCommand struct {
InfoCommandBase
// contains filtered or unexported fields
}
ListCommand shows all the users in the Juju server.
func (*ListCommand) Run ¶
func (c *ListCommand) Run(ctx *cmd.Context) (err error)
Run implements Command.Run.
func (*ListCommand) SetFlags ¶
func (c *ListCommand) SetFlags(f *gnuflag.FlagSet)
SetFlags implements Command.SetFlags.
type ShareEnvironmentAPI ¶
type ShareEnvironmentAPI interface {
}
ShareEnvironmentAPI defines the client API methods that the add command uses.
type UserCommandBase ¶
type UserCommandBase struct {
envcmd.EnvCommandBase
}
UserCommandBase is a helper base structure that has a method to get the user manager client.
func (*UserCommandBase) NewUserManagerClient ¶
func (c *UserCommandBase) NewUserManagerClient() (*usermanager.Client, error)
NewUserManagerClient returns a usermanager client for the root api endpoint that the environment command returns.
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.