Documentation ¶
Index ¶
- Variables
- type Client
- func (c *Client) BestAPIVersion() int
- func (c *Client) GetModelConstraints(ctx context.Context) (constraints.Value, error)
- func (c *Client) GetModelSecretBackend(ctx context.Context) (string, error)
- func (c *Client) ModelGet(ctx context.Context) (map[string]interface{}, error)
- func (c *Client) ModelGetWithMetadata(ctx context.Context) (config.ConfigValues, error)
- func (c *Client) ModelSet(ctx context.Context, config map[string]interface{}) error
- func (c *Client) ModelUnset(ctx context.Context, keys ...string) error
- func (c *Client) Sequences(ctx context.Context) (map[string]int, error)
- func (c *Client) SetModelConstraints(ctx context.Context, constraints constraints.Value) error
- func (c *Client) SetModelSecretBackend(ctx context.Context, secretBackendName string) error
- type Option
Constants ¶
This section is empty.
Variables ¶
var WithTracer = base.WithTracer
WithTracer returns an Option that configures the Client to use the supplied tracer.
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 models stored in the Juju Server.
func NewClient ¶
func NewClient(st base.APICallCloser, options ...Option) *Client
NewClient creates a new `Client` based on an existing authenticated API connection.
func (*Client) BestAPIVersion ¶
BestAPIVersion returns the best API version supported by the client.
func (*Client) GetModelConstraints ¶
GetModelConstraints returns the constraints for the model.
func (*Client) GetModelSecretBackend ¶
GetModelSecretBackend returns the secret backend name for the specified model, returning an error satisfying [modelerrors.NotFound] if the model provided does not exist.
func (*Client) ModelGetWithMetadata ¶
ModelGetWithMetadata returns all model settings along with extra metadata like the source of the setting value.
func (*Client) ModelUnset ¶
ModelUnset sets the given key-value pairs in the model.
func (*Client) SetModelConstraints ¶
SetModelConstraints specifies the constraints for the model.
func (*Client) SetModelSecretBackend ¶
SetModelSecretBackend sets the secret backend config for the specified model, returning an error satisfying [secretbackenderrors.NotFound] if the backend provided does not exist, returning an error satisfying [modelerrors.NotFound] if the model provided does not exist, returning an error satisfying [secretbackenderrors.NotValid] if the backend name provided is not valid.