Documentation ¶
Index ¶
- func ParseModelAccess(access string) (params.ModelAccessPermission, error)
- type Client
- func (c *Client) Close() error
- func (c *Client) ConfigSkeleton(provider, region string) (params.ModelConfig, error)
- func (c *Client) CreateModel(owner string, account, config map[string]interface{}) (params.Model, error)
- func (c *Client) GrantModel(user, access string, modelUUIDs ...string) error
- func (c *Client) ListModels(user string) ([]base.UserModel, error)
- func (c *Client) ModelInfo(tags []names.ModelTag) ([]params.ModelInfoResult, error)
- func (c *Client) RevokeModel(user, access string, modelUUIDs ...string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ParseModelAccess ¶
func ParseModelAccess(access string) (params.ModelAccessPermission, error)
ParseModelAccess parses an access permission argument into a type suitable for making an API facade call.
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 models 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) ConfigSkeleton ¶
func (c *Client) ConfigSkeleton(provider, region string) (params.ModelConfig, error)
ConfigSkeleton returns config values to be used as a starting point for the API caller to construct a valid model specific config. The provider and region params are there for future use, and current behaviour expects both of these to be empty.
func (*Client) CreateModel ¶
func (c *Client) CreateModel(owner string, account, config map[string]interface{}) (params.Model, error)
CreateModel creates a new model using the account and model config specified in the args.
func (*Client) GrantModel ¶
GrantModel grants a user access to the specified models.
func (*Client) ListModels ¶
ListModels returns the models that the specified user has access to in the current server. Only that controller owner can list models for any user (at this stage). Other users can only ask about their own models.