Documentation ¶
Index ¶
- type Client
- func (c *Client) AddUser(username, displayName, password string) (names.UserTag, error)
- func (c *Client) DisableUser(username string) error
- func (c *Client) EnableUser(username string) error
- func (c *Client) SetPassword(username, password string) error
- func (c *Client) UserInfo(usernames []string, all IncludeDisabled) ([]params.UserInfo, error)
- type IncludeDisabled
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct { base.ClientFacade // contains filtered or unexported fields }
Client provides methods that the Juju client command uses to interact with users stored in the Juju Server.
func NewClient ¶
func NewClient(st base.APICallCloser) *Client
NewClient creates a new `Client` based on an existing authenticated API connection.
func (*Client) DisableUser ¶
DisableUser disables a user. If the user is already disabled, the action is consided a success.
func (*Client) EnableUser ¶
EnableUser enables a users. If the user is already enabled, the action is consided a success.
func (*Client) SetPassword ¶
SetPassword changes the password for the specified user.
type IncludeDisabled ¶
type IncludeDisabled bool
IncludeDisabled is a type alias to avoid bare true/false values in calls to the client method.
var ( // ActiveUsers indicates to only return active users. ActiveUsers IncludeDisabled = false // AllUsers indicates that both enabled and disabled users should be // returned. AllUsers IncludeDisabled = true )
Click to show internal directories.
Click to hide internal directories.