params

package
v0.0.0-...-4bd6544 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2016 License: AGPL-3.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ActionCancelled is the status for an Action that has been
	// cancelled prior to execution.
	ActionCancelled string = "cancelled"

	// ActionCompleted is the status of an Action that has completed
	// successfully.
	ActionCompleted string = "completed"

	// ActionFailed is the status of an Action that has completed with
	// an error.
	ActionFailed string = "failed"

	// ActionPending is the status of an Action that has been queued up but
	// not executed yet.
	ActionPending string = "pending"

	// ActionRunning is the status of an Action that has been started but
	// not completed yet.
	ActionRunning string = "running"
)
View Source
const (
	CodeNotFound                  = "not found"
	CodeUserNotFound              = "user not found"
	CodeModelNotFound             = "model not found"
	CodeUnauthorized              = "unauthorized access"
	CodeLoginExpired              = "login expired"
	CodeNoCreds                   = "no credentials provided"
	CodeCannotEnterScope          = "cannot enter scope"
	CodeCannotEnterScopeYet       = "cannot enter scope yet"
	CodeExcessiveContention       = "excessive contention"
	CodeUnitHasSubordinates       = "unit has subordinates"
	CodeNotAssigned               = "not assigned"
	CodeStopped                   = "stopped"
	CodeDead                      = "dead"
	CodeHasAssignedUnits          = "machine has assigned units"
	CodeHasHostedModels           = "controller has hosted models"
	CodeMachineHasAttachedStorage = "machine has attached storage"
	CodeNotProvisioned            = "not provisioned"
	CodeNoAddressSet              = "no address set"
	CodeTryAgain                  = "try again"
	CodeNotImplemented            = "not implemented" // asserted to match rpc.codeNotImplemented in rpc/rpc_test.go
	CodeAlreadyExists             = "already exists"
	CodeUpgradeInProgress         = "upgrade in progress"
	CodeActionNotAvailable        = "action no longer available"
	CodeOperationBlocked          = "operation is blocked"
	CodeLeadershipClaimDenied     = "leadership claim denied"
	CodeLeaseClaimDenied          = "lease claim denied"
	CodeNotSupported              = "not supported"
	CodeBadRequest                = "bad request"
	CodeMethodNotAllowed          = "method not allowed"
	CodeForbidden                 = "forbidden"
	CodeDischargeRequired         = "macaroon discharge required"
	CodeRedirect                  = "redirection required"
	CodeRetry                     = "retry"
)

The Code constants hold error codes for some kinds of error.

View Source
const (
	// DigestSHA is the HTTP digest algorithm value used in juju's HTTP code.
	DigestSHA256 DigestAlgorithm = "SHA-256"

	// ContentTypeJSON is the HTTP content-type value used for JSON content.
	ContentTypeJSON = "application/json"

	// ContentTypeRaw is the HTTP content-type value used for raw, unformattedcontent.
	ContentTypeRaw = "application/octet-stream"

	// ContentTypeJS is the HTTP content-type value used for javascript.
	ContentTypeJS = "application/javascript"

	// ContentTypeXJS is the outdated HTTP content-type value used for javascript.
	ContentTypeXJS = "application/x-javascript"
)
View Source
const MachineNonceHeader = "X-Juju-Nonce"

Variables

View Source
var UpgradeInProgressError = errors.New(CodeUpgradeInProgress)

UpgradeInProgressError signifies an upgrade is in progress.

Functions

func EncodeChecksum

func EncodeChecksum(checksum string) string

EncodeChecksum base64 encodes a sha256 checksum according to RFC 4648 and returns a value that can be added to the "Digest" http header.

func ErrCode

func ErrCode(err error) string

ErrCode returns the error code associated with the given error, or the empty string if there is none.

func FromNetworkHostsPorts

func FromNetworkHostsPorts(nhpm [][]network.HostPort) [][]HostPort

FromNetworkHostsPorts is a helper to create a parameter out of the network type, here for a nested slice of HostPort.

func IsBadRequest

func IsBadRequest(err error) bool

func IsCodeActionNotAvailable

func IsCodeActionNotAvailable(err error) bool

func IsCodeAlreadyExists

func IsCodeAlreadyExists(err error) bool

func IsCodeCannotEnterScope

func IsCodeCannotEnterScope(err error) bool

func IsCodeCannotEnterScopeYet

func IsCodeCannotEnterScopeYet(err error) bool

func IsCodeDead

func IsCodeDead(err error) bool

func IsCodeExcessiveContention

func IsCodeExcessiveContention(err error) bool

func IsCodeHasAssignedUnits

func IsCodeHasAssignedUnits(err error) bool

func IsCodeHasHostedModels

func IsCodeHasHostedModels(err error) bool

func IsCodeLeadershipClaimDenied

func IsCodeLeadershipClaimDenied(err error) bool

func IsCodeLeaseClaimDenied

func IsCodeLeaseClaimDenied(err error) bool

func IsCodeLoginExpired

func IsCodeLoginExpired(err error) bool

func IsCodeMachineHasAttachedStorage

func IsCodeMachineHasAttachedStorage(err error) bool

func IsCodeModelNotFound

func IsCodeModelNotFound(err error) bool

func IsCodeNoAddressSet

func IsCodeNoAddressSet(err error) bool

func IsCodeNoCreds

func IsCodeNoCreds(err error) bool

func IsCodeNotAssigned

func IsCodeNotAssigned(err error) bool

func IsCodeNotFound

func IsCodeNotFound(err error) bool

func IsCodeNotFoundOrCodeUnauthorized

func IsCodeNotFoundOrCodeUnauthorized(err error) bool

IsCodeNotFoundOrCodeUnauthorized is used in API clients which, pre-API, used errors.IsNotFound; this is because an API client is not necessarily privileged to know about the existence or otherwise of a particular entity, and the server may hence convert NotFound to Unauthorized at its discretion.

func IsCodeNotImplemented

func IsCodeNotImplemented(err error) bool

func IsCodeNotProvisioned

func IsCodeNotProvisioned(err error) bool

func IsCodeNotSupported

func IsCodeNotSupported(err error) bool

func IsCodeOperationBlocked

func IsCodeOperationBlocked(err error) bool

func IsCodeStopped

func IsCodeStopped(err error) bool

func IsCodeTryAgain

func IsCodeTryAgain(err error) bool

func IsCodeUnauthorized

func IsCodeUnauthorized(err error) bool

func IsCodeUnitHasSubordinates

func IsCodeUnitHasSubordinates(err error) bool

func IsCodeUpgradeInProgress

func IsCodeUpgradeInProgress(err error) bool

func IsCodeUserNotFound

func IsCodeUserNotFound(err error) bool

func IsMethodNotAllowed

func IsMethodNotAllowed(err error) bool

func IsRedirect

func IsRedirect(err error) bool

func NetworkAddresses

func NetworkAddresses(addrs ...Address) []network.Address

NetworkAddresses is a convenience helper to return the parameter as network type, here for a slice of Address.

func NetworkHostPorts

func NetworkHostPorts(hps []HostPort) []network.HostPort

NetworkHostPorts is a convenience helper to return the parameter as network type, here for a slice of HostPort.

func NetworkHostsPorts

func NetworkHostsPorts(hpm [][]HostPort) [][]network.HostPort

NetworkHostsPorts is a convenience helper to return the parameter as network type, here for a nested slice of HostPort.

Types

type APIHostPortsResult

type APIHostPortsResult struct {
	Servers [][]HostPort `json:"servers"`
}

APIHostPortsResult holds the result of an APIHostPorts call. Each element in the top level slice holds the addresses for one API server.

func (APIHostPortsResult) NetworkHostsPorts

func (r APIHostPortsResult) NetworkHostsPorts() [][]network.HostPort

NetworkHostsPorts is a convenience helper to return the contained result servers as network type.

type Action

type Action struct {
	Tag        string                 `json:"tag"`
	Receiver   string                 `json:"receiver"`
	Name       string                 `json:"name"`
	Parameters map[string]interface{} `json:"parameters,omitempty"`
}

Action describes an Action that will be or has been queued up.

type ActionExecutionResult

type ActionExecutionResult struct {
	ActionTag string                 `json:"action-tag"`
	Status    string                 `json:"status"`
	Results   map[string]interface{} `json:"results,omitempty"`
	Message   string                 `json:"message,omitempty"`
}

ActionExecutionResult holds the action tag and output used when recording the result of an action.

type ActionExecutionResults

type ActionExecutionResults struct {
	Results []ActionExecutionResult `json:"results,omitempty"`
}

ActionExecutionResults holds a slice of ActionExecutionResult for a bulk action API call

type ActionResult

type ActionResult struct {
	Action    *Action                `json:"action,omitempty"`
	Enqueued  time.Time              `json:"enqueued,omitempty"`
	Started   time.Time              `json:"started,omitempty"`
	Completed time.Time              `json:"completed,omitempty"`
	Status    string                 `json:"status,omitempty"`
	Message   string                 `json:"message,omitempty"`
	Output    map[string]interface{} `json:"output,omitempty"`
	Error     *Error                 `json:"error,omitempty"`
}

ActionResult describes an Action that will be or has been completed.

type ActionResults

type ActionResults struct {
	Results []ActionResult `json:"results,omitempty"`
}

ActionResults is a slice of ActionResult for bulk requests.

type ActionSpec

type ActionSpec struct {
	Description string                 `json:"description"`
	Params      map[string]interface{} `json:"params"`
}

ActionSpec is a definition of the parameters and traits of an Action. The Params map is expected to conform to JSON-Schema Draft 4 as defined at http://json-schema.org/draft-04/schema# (see http://json-schema.org/latest/json-schema-core.html)

type Actions

type Actions struct {
	Actions []Action `json:"actions,omitempty"`
}

Actions is a slice of Action for bulk requests.

type ActionsByName

type ActionsByName struct {
	Name    string         `json:"name,omitempty"`
	Actions []ActionResult `json:"actions,omitempty"`
	Error   *Error         `json:"error,omitempty"`
}

ActionsByName is a bulk API call wrapper containing actions as results.

type ActionsByNames

type ActionsByNames struct {
	Actions []ActionsByName `json:"actions,omitempty"`
}

ActionsByNames wrap a slice of Actions for API calls.

type ActionsByReceiver

type ActionsByReceiver struct {
	Receiver string         `json:"receiver,omitempty"`
	Actions  []ActionResult `json:"actions,omitempty"`
	Error    *Error         `json:"error,omitempty"`
}

ActionsByReceiver is a bulk API call wrapper containing Actions, either as input paramters or as results.

type ActionsByReceivers

type ActionsByReceivers struct {
	Actions []ActionsByReceiver `json:"actions,omitempty"`
}

ActionsByReceivers wrap a slice of Actions for API calls.

type ActionsQueryResult

type ActionsQueryResult struct {
	Receiver string       `json:"receiver,omitempty"`
	Action   ActionResult `json:"action,omitempty"`
	Error    *Error       `json:"error,omitempty"`
}

ActionsQueryResult holds the name and parameters of an query result.

type ActionsQueryResults

type ActionsQueryResults struct {
	Results []ActionsQueryResult `json:"results,omitempty"`
}

ActionsQueryResults holds a slice of responses from the Actions query.

type AddApplicationUnits

type AddApplicationUnits struct {
	ApplicationName string                `json:"application"`
	NumUnits        int                   `json:"num-units"`
	Placement       []*instance.Placement `json:"placement"`
}

AddApplicationUnits holds parameters for the AddUnits call.

type AddApplicationUnitsResults

type AddApplicationUnitsResults struct {
	Units []string `json:"units"`
}

AddApplicationUnitsResults holds the names of the units added by the AddUnits call.

type AddCharm

type AddCharm struct {
	URL     string `json:"url"`
	Channel string `json:"channel"`
}

AddCharm holds the arguments for making an AddCharm API call.

type AddCharmWithAuthorization

type AddCharmWithAuthorization struct {
	URL                string             `json:"url"`
	Channel            string             `json:"channel"`
	CharmStoreMacaroon *macaroon.Macaroon `json:"macaroon"`
}

AddCharmWithAuthorization holds the arguments for making an AddCharmWithAuthorization API call.

type AddMachineParams

type AddMachineParams struct {
	// The following fields hold attributes that will be given to the
	// new machine when it is created.
	Series      string                    `json:"series"`
	Constraints constraints.Value         `json:"constraints"`
	Jobs        []multiwatcher.MachineJob `json:"jobs"`

	// Disks describes constraints for disks that must be attached to
	// the machine when it is provisioned.
	Disks []storage.Constraints `json:"disks,omitempty"`

	// If Placement is non-nil, it contains a placement directive
	// that will be used to decide how to instantiate the machine.
	Placement *instance.Placement `json:"placement,omitempty"`

	// If ParentId is non-empty, it specifies the id of the
	// parent machine within which the new machine will
	// be created. In that case, ContainerType must also be
	// set.
	ParentId string `json:"parent-id"`

	// ContainerType optionally gives the container type of the
	// new machine. If it is non-empty, the new machine
	// will be implemented by a container. If it is specified
	// but ParentId is empty, a new top level machine will
	// be created to hold the container with given series,
	// constraints and jobs.
	ContainerType instance.ContainerType `json:"container-type"`

	// If InstanceId is non-empty, it will be associated with
	// the new machine along with the given nonce,
	// hardware characteristics and addresses.
	// All the following fields will be ignored if ContainerType
	// is set.
	InstanceId              instance.Id                      `json:"instance-id"`
	Nonce                   string                           `json:"nonce"`
	HardwareCharacteristics instance.HardwareCharacteristics `json:"hardware-characteristics"`
	Addrs                   []Address                        `json:"addresses"`
}

AddMachineParams encapsulates the parameters used to create a new machine.

type AddMachines

type AddMachines struct {
	MachineParams []AddMachineParams `json:"params"`
}

AddMachines holds the parameters for making the AddMachines call.

type AddMachinesResult

type AddMachinesResult struct {
	Machine string `json:"machine"`
	Error   *Error `json:"error,omitempty"`
}

AddMachinesResult holds the name of a machine added by the api.client.AddMachine call for a single machine.

type AddMachinesResults

type AddMachinesResults struct {
	Machines []AddMachinesResult `json:"machines"`
}

AddMachinesResults holds the results of an AddMachines call.

type AddRelation

type AddRelation struct {
	Endpoints []string `json:"endpoints"`
}

AddRelation holds the parameters for making the AddRelation call. The endpoints specified are unordered.

type AddRelationResults

type AddRelationResults struct {
	Endpoints map[string]CharmRelation `json:"endpoints"`
}

AddRelationResults holds the results of a AddRelation call. The Endpoints field maps application names to the involved endpoints.

type AddSubnetParams

type AddSubnetParams struct {
	SubnetTag        string   `json:"subnet-tag,omitempty"`
	SubnetProviderId string   `json:"subnet-provider-id,omitempty"`
	SpaceTag         string   `json:"space-tag"`
	Zones            []string `json:"zones,omitempty"`
}

AddSubnetParams holds a subnet and space tags, subnet provider ID, and a list of zones to associate the subnet to. Either SubnetTag or SubnetProviderId must be set, but not both. Zones can be empty if they can be discovered

type AddSubnetsParams

type AddSubnetsParams struct {
	Subnets []AddSubnetParams `json:"subnets"`
}

AddSubnetsParams holds the arguments of AddSubnets API call.

type AddUser

type AddUser struct {
	Username    string `json:"username"`
	DisplayName string `json:"display-name"`

	// Password is optional. If it is empty, then
	// a secret key will be generated for the user
	// and returned in AddUserResult. It will not
	// be possible to login with a password until
	// registration with the secret key is completed.
	Password string `json:"password,omitempty"`
}

AddUser stores the parameters to add one user.

type AddUserResult

type AddUserResult struct {
	Tag       string `json:"tag,omitempty"`
	SecretKey []byte `json:"secret-key,omitempty"`
	Error     *Error `json:"error,omitempty"`
}

AddUserResult returns the tag of the newly created user and the secret key required to complete registration, or an error.

type AddUserResults

type AddUserResults struct {
	Results []AddUserResult `json:"results"`
}

AddUserResults holds the results of the bulk AddUser API call.

type AddUsers

type AddUsers struct {
	Users []AddUser `json:"users"`
}

AddUsers holds the parameters for adding new users.

type Address

type Address struct {
	Value     string `json:"value"`
	Type      string `json:"type"`
	Scope     string `json:"scope"`
	SpaceName string `json:"space-name,omitempty"`
}

Address represents the location of a machine, including metadata about what kind of location the address describes. It's used in the API requests/responses. See also network.Address, from/to which this is transformed.

func FromNetworkAddress

func FromNetworkAddress(naddr network.Address) Address

FromNetworkAddress is a convenience helper to create a parameter out of the network type, here for Address.

func FromNetworkAddresses

func FromNetworkAddresses(naddrs ...network.Address) []Address

FromNetworkAddresses is a convenience helper to create a parameter out of the network type, here for a slice of Address.

func (Address) NetworkAddress

func (addr Address) NetworkAddress() network.Address

NetworkAddress is a convenience helper to return the parameter as network type, here for Address.

type AgentGetEntitiesResult

type AgentGetEntitiesResult struct {
	Life          Life                      `json:"life"`
	Jobs          []multiwatcher.MachineJob `json:"jobs"`
	ContainerType instance.ContainerType    `json:"container-type"`
	Error         *Error                    `json:"error,omitempty"`
}

AgentGetEntitiesResult holds the results of a machineagent.API.GetEntities call for a single entity.

type AgentGetEntitiesResults

type AgentGetEntitiesResults struct {
	Entities []AgentGetEntitiesResult `json:"entities"`
}

AgentGetEntitiesResults holds the results of a agent.API.GetEntities call.

type AgentVersionResult

type AgentVersionResult struct {
	Version version.Number `json:"version"`
}

AgentVersionResult is used to return the current version number of the agent running the API server.

type AllWatcherId

type AllWatcherId struct {
	AllWatcherId string `json:"watcher-id"`
}

AllWatcherId holds the id of an AllWatcher.

type AllWatcherNextResults

type AllWatcherNextResults struct {
	Deltas []multiwatcher.Delta `json:"deltas"`
}

AllWatcherNextResults holds deltas returned from calling AllWatcher.Next().

type AnnotationsGetResult

type AnnotationsGetResult struct {
	EntityTag   string            `json:"entity"`
	Annotations map[string]string `json:"annotations"`
	Error       ErrorResult       `json:"error,omitempty"`
}

AnnotationsGetResult holds entity annotations or retrieval error.

type AnnotationsGetResults

type AnnotationsGetResults struct {
	Results []AnnotationsGetResult `json:"results"`
}

AnnotationsGetResults holds annotations associated with entities.

type AnnotationsSet

type AnnotationsSet struct {
	Annotations []EntityAnnotations `json:"annotations"`
}

AnnotationsSet stores parameters for making Set call on Annotations client.

type ApplicationCharmActionsResult

type ApplicationCharmActionsResult struct {
	ApplicationTag string                `json:"application-tag,omitempty"`
	Actions        map[string]ActionSpec `json:"actions,omitempty"`
	Error          *Error                `json:"error,omitempty"`
}

ApplicationCharmActionsResult holds application name and charm.Actions for the application. If an error such as a missing charm or malformed application name occurs, it is encapsulated in this type.

type ApplicationCharmRelations

type ApplicationCharmRelations struct {
	ApplicationName string `json:"application"`
}

ApplicationCharmRelations holds parameters for making the application CharmRelations call.

type ApplicationCharmRelationsResults

type ApplicationCharmRelationsResults struct {
	CharmRelations []string `json:"charm-relations"`
}

ApplicationCharmRelationsResults holds the results of the application CharmRelations call.

type ApplicationDeploy

type ApplicationDeploy struct {
	ApplicationName  string                         `json:"application"`
	Series           string                         `json:"series"`
	CharmURL         string                         `json:"charm-url"`
	Channel          string                         `json:"channel"`
	NumUnits         int                            `json:"num-units"`
	Config           map[string]string              `json:"config,omitempty"`
	ConfigYAML       string                         `json:"config-yaml"` // Takes precedence over config if both are present.
	Constraints      constraints.Value              `json:"constraints"`
	Placement        []*instance.Placement          `json:"placement,omitempty"`
	Storage          map[string]storage.Constraints `json:"storage,omitempty"`
	EndpointBindings map[string]string              `json:"endpoint-bindings,omitempty"`
	Resources        map[string]string              `json:"resources,omitempty"`
}

ApplicationDeploy holds the parameters for making the application Deploy call.

type ApplicationDestroy

type ApplicationDestroy struct {
	ApplicationName string `json:"application"`
}

ApplicationDestroy holds the parameters for making the application Destroy call.

type ApplicationExpose

type ApplicationExpose struct {
	ApplicationName string `json:"application"`
}

ApplicationExpose holds the parameters for making the application Expose call.

type ApplicationGet

type ApplicationGet struct {
	ApplicationName string `json:"application"`
}

ApplicationGet holds parameters for making the Get or GetCharmURL calls.

type ApplicationGetResults

type ApplicationGetResults struct {
	Application string                 `json:"application"`
	Charm       string                 `json:"charm"`
	Config      map[string]interface{} `json:"config"`
	Constraints constraints.Value      `json:"constraints"`
	Series      string                 `json:"series"`
}

ApplicationGetResults holds results of the application Get call.

type ApplicationMetricCredential

type ApplicationMetricCredential struct {
	ApplicationName   string `json:"application"`
	MetricCredentials []byte `json:"metrics-credentials"`
}

ApplicationMetricCredential holds parameters for the SetApplicationCredentials call.

type ApplicationMetricCredentials

type ApplicationMetricCredentials struct {
	Creds []ApplicationMetricCredential `json:"creds"`
}

ApplicationMetricCredentials holds multiple ApplicationMetricCredential parameters.

type ApplicationSet

type ApplicationSet struct {
	ApplicationName string            `json:"application"`
	Options         map[string]string `json:"options"`
}

ApplicationSet holds the parameters for an application Set command. Options contains the configuration data.

type ApplicationSetCharm

type ApplicationSetCharm struct {
	// ApplicationName is the name of the application to set the charm on.
	ApplicationName string `json:"application"`

	// CharmURL is the new url for the charm.
	CharmURL string `json:"charm-url"`

	// Channel is the charm store channel from which the charm came.
	Channel string `json:"channel"`

	// ConfigSettings is the charm settings to set during the upgrade.
	// This field is only understood by Application facade version 2
	// and greater.
	ConfigSettings map[string]string `json:"config-settings,omitempty"`

	// ConfigSettingsYAML is the charm settings in YAML format to set
	// during the upgrade. If this is non-empty, it will take precedence
	// over ConfigSettings. This field is only understood by Application
	// facade version 2
	ConfigSettingsYAML string `json:"config-settings-yaml,omitempty"`

	// ForceUnits forces the upgrade on units in an error state.
	ForceUnits bool `json:"force-units"`

	// ForceSeries forces the use of the charm even if it doesn't match the
	// series of the unit.
	ForceSeries bool `json:"force-series"`

	// ResourceIDs is a map of resource names to resource IDs to activate during
	// the upgrade.
	ResourceIDs map[string]string `json:"resource-ids,omitempty"`

	// StorageConstraints is a map of storage names to storage constraints to
	// update during the upgrade. This field is only understood by Application
	// facade version 2 and greater.
	StorageConstraints map[string]StorageConstraints `json:"storage-constraints,omitempty"`
}

ApplicationSetCharm sets the charm for a given application.

type ApplicationStatus

type ApplicationStatus struct {
	Err             error                  `json:"err,omitempty"`
	Charm           string                 `json:"charm"`
	Series          string                 `json:"series"`
	Exposed         bool                   `json:"exposed"`
	Life            string                 `json:"life"`
	Relations       map[string][]string    `json:"relations"`
	CanUpgradeTo    string                 `json:"can-upgrade-to"`
	SubordinateTo   []string               `json:"subordinate-to"`
	Units           map[string]UnitStatus  `json:"units"`
	MeterStatuses   map[string]MeterStatus `json:"meter-statuses"`
	Status          DetailedStatus         `json:"status"`
	WorkloadVersion string                 `json:"workload-version"`
}

ApplicationStatus holds status info about an application.

type ApplicationStatusResult

type ApplicationStatusResult struct {
	Application StatusResult            `json:"application"`
	Units       map[string]StatusResult `json:"units"`
	Error       *Error                  `json:"error,omitempty"`
}

ApplicationStatusResult holds results for an application Full Status

type ApplicationStatusResults

type ApplicationStatusResults struct {
	Results []ApplicationStatusResult `json:"results"`
}

ApplicationStatusResults holds multiple StatusResult.

type ApplicationUnexpose

type ApplicationUnexpose struct {
	ApplicationName string `json:"application"`
}

ApplicationUnexpose holds parameters for the application Unexpose call.

type ApplicationUnset

type ApplicationUnset struct {
	ApplicationName string   `json:"application"`
	Options         []string `json:"options"`
}

ApplicationUnset holds the parameters for an application Unset command. Options contains the option attribute names to unset.

type ApplicationUpdate

type ApplicationUpdate struct {
	ApplicationName string             `json:"application"`
	CharmURL        string             `json:"charm-url"`
	ForceCharmURL   bool               `json:"force-charm-url"`
	ForceSeries     bool               `json:"force-series"`
	MinUnits        *int               `json:"min-units,omitempty"`
	SettingsStrings map[string]string  `json:"settings,omitempty"`
	SettingsYAML    string             `json:"settings-yaml"` // Takes precedence over SettingsStrings if both are present.
	Constraints     *constraints.Value `json:"constraints,omitempty"`
}

ApplicationUpdate holds the parameters for making the application Update call.

type ApplicationsCharmActionsResults

type ApplicationsCharmActionsResults struct {
	Results []ApplicationCharmActionsResult `json:"results,omitempty"`
}

ApplicationsCharmActionsResults holds a slice of ApplicationCharmActionsResult for a bulk result of charm Actions for Applications.

type ApplicationsDeploy

type ApplicationsDeploy struct {
	Applications []ApplicationDeploy `json:"applications"`
}

ApplicationsDeploy holds the parameters for deploying one or more applications.

type AuthUserInfo

type AuthUserInfo struct {
	DisplayName    string     `json:"display-name"`
	Identity       string     `json:"identity"`
	LastConnection *time.Time `json:"last-connection,omitempty"`

	// Credentials contains an optional opaque credential value to be held by
	// the client, if any.
	Credentials *string `json:"credentials,omitempty"`

	// ControllerAccess holds the access the user has to the connected controller.
	ControllerAccess string `json:"controller-access"`
	// ModelAccess holds the access the user has to the connected model.
	ModelAccess string `json:"model-access"`
}

AuthUserInfo describes a logged-in local user or remote identity.

type BackupsCreateArgs

type BackupsCreateArgs struct {
	Notes string `json:"notes"`
}

BackupsCreateArgs holds the args for the API Create method.

type BackupsDownloadArgs

type BackupsDownloadArgs struct {
	ID string `json:"id"`
}

BackupsDownloadArgs holds the args for the API Download method.

type BackupsInfoArgs

type BackupsInfoArgs struct {
	ID string `json:"id"`
}

BackupsInfoArgs holds the args for the API Info method.

type BackupsListArgs

type BackupsListArgs struct {
}

BackupsListArgs holds the args for the API List method.

type BackupsListResult

type BackupsListResult struct {
	List []BackupsMetadataResult `json:"list"`
}

BackupsListResult holds the list of all stored backups.

type BackupsMetadataResult

type BackupsMetadataResult struct {
	ID string `json:"id"`

	Checksum       string    `json:"checksum"`
	ChecksumFormat string    `json:"checksum-format"`
	Size           int64     `json:"size"`
	Stored         time.Time `json:"stored"` // May be zero...

	Started  time.Time      `json:"started"`
	Finished time.Time      `json:"finished"` // May be zero...
	Notes    string         `json:"notes"`
	Model    string         `json:"model"`
	Machine  string         `json:"machine"`
	Hostname string         `json:"hostname"`
	Version  version.Number `json:"version"`
	Series   string         `json:"series"`

	CACert       string `json:"ca-cert"`
	CAPrivateKey string `json:"ca-private-key"`
}

BackupsMetadataResult holds the metadata for a backup as returned by an API backups method (such as Create).

type BackupsRemoveArgs

type BackupsRemoveArgs struct {
	ID string `json:"id"`
}

BackupsRemoveArgs holds the args for the API Remove method.

type BackupsUploadArgs

type BackupsUploadArgs struct {
	Data     []byte                `json:"data"`
	Metadata BackupsMetadataResult `json:"metadata"`
}

BackupsUploadArgs holds the args for the API Upload method.

type BackupsUploadResult

type BackupsUploadResult struct {
	ID string `json:"id"`
}

BackupsListResult holds the list of all stored backups.

type Block

type Block struct {
	// Id is this blocks id.
	Id string `json:"id"`

	// Tag holds the tag of the entity that is blocked.
	Tag string `json:"tag"`

	// Type is block type as per state.multiwatcher.BlockType.
	// Valid types are "BlockDestroy", "BlockRemove" and "BlockChange".
	Type string `json:"type"`

	// Message is a descriptive or an explanatory message
	// that the block was created with.
	Message string `json:"message,omitempty"`
}

Block describes a Juju block that protects model from corruption.

type BlockDeviceResult

type BlockDeviceResult struct {
	Result storage.BlockDevice `json:"result"`
	Error  *Error              `json:"error,omitempty"`
}

BlockDeviceResult holds the result of an API call to retrieve details of a block device.

type BlockDeviceResults

type BlockDeviceResults struct {
	Results []BlockDeviceResult `json:"results,omitempty"`
}

BlockDeviceResults holds the result of an API call to retrieve details of multiple block devices.

type BlockDevicesResult

type BlockDevicesResult struct {
	Result []storage.BlockDevice `json:"result"`
	Error  *Error                `json:"error,omitempty"`
}

BlockDevicesResult holds the result of an API call to retrieve details of all block devices relating to some entity.

type BlockDevicesResults

type BlockDevicesResults struct {
	Results []BlockDevicesResult `json:"results,omitempty"`
}

BlockDevicseResults holds the result of an API call to retrieve details of all block devices relating to some entities.

type BlockResult

type BlockResult struct {
	Result Block  `json:"result"`
	Error  *Error `json:"error,omitempty"`
}

BlockResult holds the result of an API call to retrieve details for a block.

type BlockResults

type BlockResults struct {
	Results []BlockResult `json:"results,omitempty"`
}

BlockResults holds the result of an API call to list blocks.

type BlockSwitchParams

type BlockSwitchParams struct {
	// Type is block type as per state.multiwatcher.BlockType.
	// Valid types are "BlockDestroy", "BlockRemove" and "BlockChange".
	Type string `json:"type"`

	// Message is a descriptive or an explanatory message
	// that accompanies the switch.
	Message string `json:"message,omitempty"`
}

BlockSwitchParams holds the parameters for switching a block on/off.

type BoolResult

type BoolResult struct {
	Error  *Error `json:"error,omitempty"`
	Result bool   `json:"result"`
}

BoolResult holds the result of an API call that returns a a boolean or an error.

type BoolResults

type BoolResults struct {
	Results []BoolResult `json:"results"`
}

BoolResults holds multiple results with BoolResult each.

type BundleChangesChange

type BundleChangesChange struct {
	// Id is the unique identifier for this change.
	Id string `json:"id"`
	// Method is the action to be performed to apply this change.
	Method string `json:"method"`
	// Args holds a list of arguments to pass to the method.
	Args []interface{} `json:"args"`
	// Requires holds a list of dependencies for this change. Each dependency
	// is represented by the corresponding change id, and must be applied
	// before this change is applied.
	Requires []string `json:"requires"`
}

BundleChangesChange holds a single change required to deploy a bundle.

type BytesResult

type BytesResult struct {
	Result []byte `json:"result"`
}

BytesResult holds the result of an API call that returns a slice of bytes.

type CharmActionSpec

type CharmActionSpec struct {
	Description string                 `json:"description"`
	Params      map[string]interface{} `json:"params"`
}

CharmActionSpec mirrors charm.ActionSpec.

type CharmActions

type CharmActions struct {
	ActionSpecs map[string]CharmActionSpec `json:"specs,omitempty"`
}

CharmActions mirrors charm.Actions.

type CharmInfo

type CharmInfo struct {
	Revision int                    `json:"revision"`
	URL      string                 `json:"url"`
	Config   map[string]CharmOption `json:"config"`
	Meta     *CharmMeta             `json:"meta,omitempty"`
	Actions  *CharmActions          `json:"actions,omitempty"`
	Metrics  *CharmMetrics          `json:"metrics,omitempty"`
}

CharmInfo holds all the charm data that the client needs. To be honest, it probably returns way more than what is actually needed.

type CharmMeta

type CharmMeta struct {
	Name           string                       `json:"name"`
	Summary        string                       `json:"summary"`
	Description    string                       `json:"description"`
	Subordinate    bool                         `json:"subordinate"`
	Provides       map[string]CharmRelation     `json:"provides,omitempty"`
	Requires       map[string]CharmRelation     `json:"requires,omitempty"`
	Peers          map[string]CharmRelation     `json:"peers,omitempty"`
	ExtraBindings  map[string]string            `json:"extra-bindings,omitempty"`
	Categories     []string                     `json:"categories,omitempty"`
	Tags           []string                     `json:"tags,omitempty"`
	Series         []string                     `json:"series,omitempty"`
	Storage        map[string]CharmStorage      `json:"storage,omitempty"`
	PayloadClasses map[string]CharmPayloadClass `json:"payload-classes,omitempty"`
	Resources      map[string]CharmResourceMeta `json:"resources,omitempty"`
	Terms          []string                     `json:"terms,omitempty"`
	MinJujuVersion string                       `json:"min-juju-version,omitempty"`
}

CharmMeta mirrors charm.Meta.

type CharmMetric

type CharmMetric struct {
	Type        string `json:"type"`
	Description string `json:"description"`
}

CharmMetric mirrors charm.Metric.

type CharmMetrics

type CharmMetrics struct {
	Metrics map[string]CharmMetric `json:"metrics"`
	Plan    CharmPlan              `json:"plan"`
}

CharmMetrics mirrors charm.Metrics.

type CharmOption

type CharmOption struct {
	Type        string      `json:"type"`
	Description string      `json:"description,omitempty"`
	Default     interface{} `json:"default,omitempty"`
}

CharmOption mirrors charm.Option

type CharmPayloadClass

type CharmPayloadClass struct {
	Name string `json:"name"`
	Type string `json:"type"`
}

CharmPayloadClass mirrors charm.PayloadClass.

type CharmPlan

type CharmPlan struct {
	Required bool `json:"required"`
}

CharmPlan mirrors charm.Plan

type CharmRelation

type CharmRelation struct {
	Name      string `json:"name"`
	Role      string `json:"role"`
	Interface string `json:"interface"`
	Optional  bool   `json:"optional"`
	Limit     int    `json:"limit"`
	Scope     string `json:"scope"`
}

CharmRelation mirrors charm.Relation.

type CharmResourceMeta

type CharmResourceMeta struct {
	Name        string `json:"name"`
	Type        string `json:"type"`
	Path        string `json:"path"`
	Description string `json:"description"`
}

CharmResourceMeta mirrors charm.ResourceMeta.

type CharmStorage

type CharmStorage struct {
	Name        string   `json:"name"`
	Description string   `json:"description"`
	Type        string   `json:"type"`
	Shared      bool     `json:"shared"`
	ReadOnly    bool     `json:"read-only"`
	CountMin    int      `json:"count-min"`
	CountMax    int      `json:"count-max"`
	MinimumSize uint64   `json:"minimum-size"`
	Location    string   `json:"location,omitempty"`
	Properties  []string `json:"properties,omitempty"`
}

CharmStorage mirrors charm.Storage.

type CharmURL

type CharmURL struct {
	URL string `json:"url"`
}

CharmURL identifies a single charm URL.

type CharmURLs

type CharmURLs struct {
	URLs []CharmURL `json:"urls"`
}

CharmURLs identifies multiple charm URLs.

type CharmsList

type CharmsList struct {
	Names []string `json:"names"`
}

CharmsList stores parameters for a charms.List call

type CharmsListResult

type CharmsListResult struct {
	CharmURLs []string `json:"charm-urls"`
}

CharmsListResult stores result from a charms.List call

type CharmsResponse

type CharmsResponse struct {
	Error string `json:"error,omitempty"`

	// ErrorCode holds the code associated with the error.
	// Ideally, Error would hold an Error object and the
	// code would be in that, but for backward compatibility,
	// we cannot do that.
	ErrorCode string `json:"error-code,omitempty"`

	// ErrorInfo holds extra information associated with the error.
	// Like ErrorCode, this should really be in an Error object.
	ErrorInfo *ErrorInfo `json:"error-info,omitempty"`

	CharmURL string   `json:"charm-url,omitempty"`
	Files    []string `json:"files,omitempty"`
}

CharmsResponse is the server response to charm upload or GET requests.

type ClaimLeadershipBulkParams

type ClaimLeadershipBulkParams struct {

	// Params are the parameters for making a bulk leadership claim.
	Params []ClaimLeadershipParams `json:"params"`
}

ClaimLeadershipBulkParams is a collection of parameters for making a bulk leadership claim.

type ClaimLeadershipBulkResults

type ClaimLeadershipBulkResults ErrorResults

ClaimLeadershipBulkResults is the collection of results from a bulk leadership claim.

type ClaimLeadershipParams

type ClaimLeadershipParams struct {

	// ApplicationTag is the application for which you want to make a
	// leadership claim.
	ApplicationTag string `json:"application-tag"`

	// UnitTag is the unit which is making the leadership claim.
	UnitTag string `json:"unit-tag"`

	// DurationSeconds is the number of seconds for which the lease is required.
	DurationSeconds float64 `json:"duration"`
}

ClaimLeadershipParams are the parameters needed for making a leadership claim.

type Cloud

type Cloud struct {
	Type             string        `json:"type"`
	AuthTypes        []string      `json:"auth-types,omitempty"`
	Endpoint         string        `json:"endpoint,omitempty"`
	IdentityEndpoint string        `json:"identity-endpoint,omitempty"`
	StorageEndpoint  string        `json:"storage-endpoint,omitempty"`
	Regions          []CloudRegion `json:"regions,omitempty"`
}

Cloud holds information about a cloud.

type CloudCredential

type CloudCredential struct {
	// AuthType is the authentication type.
	AuthType string `json:"auth-type"`

	// Attributes contains non-secret credential values.
	Attributes map[string]string `json:"attrs,omitempty"`

	// Redacted is a list of redacted attributes
	Redacted []string `json:"redacted,omitempty"`
}

CloudCredential contains a cloud credential possibly with secrets redacted.

type CloudCredentialResult

type CloudCredentialResult struct {
	Result *CloudCredential `json:"result,omitempty"`
	Error  *Error           `json:"error,omitempty"`
}

CloudCredentialResult contains a CloudCredential or an error.

type CloudCredentialResults

type CloudCredentialResults struct {
	Results []CloudCredentialResult `json:"results,omitempty"`
}

CloudCredentialResults contains a set of CloudCredentialResults.

type CloudImageMetadata

type CloudImageMetadata struct {
	// ImageId is an image identifier.
	ImageId string `json:"image-id"`

	// Stream contains reference to a particular stream,
	// for e.g. "daily" or "released"
	Stream string `json:"stream,omitempty"`

	// Region is the name of cloud region associated with the image.
	Region string `json:"region"`

	// Version is OS version, for e.g. "12.04".
	Version string `json:"version"`

	// Series is OS series, for e.g. "trusty".
	Series string `json:"series"`

	// Arch is the architecture for this cloud image, for e.g. "amd64"
	Arch string `json:"arch"`

	// VirtType contains the virtualisation type of the cloud image, for e.g. "pv", "hvm". "kvm".
	VirtType string `json:"virt-type,omitempty"`

	// RootStorageType contains type of root storage, for e.g. "ebs", "instance".
	RootStorageType string `json:"root-storage-type,omitempty"`

	// RootStorageSize contains size of root storage in gigabytes (GB).
	RootStorageSize *uint64 `json:"root-storage-size,omitempty"`

	// Source describes where this image is coming from: is it public? custom?
	Source string `json:"source"`

	// Priority is an importance factor for image metadata.
	// Higher number means higher priority.
	// This will allow to sort metadata by importance.
	Priority int `json:"priority"`
}

CloudImageMetadata holds cloud image metadata properties.

type CloudImageMetadataList

type CloudImageMetadataList struct {
	Metadata []CloudImageMetadata `json:"metadata,omitempty"`
}

CloudImageMetadataList holds a list of cloud image metadata.

type CloudRegion

type CloudRegion struct {
	Name             string `json:"name"`
	Endpoint         string `json:"endpoint,omitempty"`
	IdentityEndpoint string `json:"identity-endpoint,omitempty"`
	StorageEndpoint  string `json:"storage-endpoint,omitempty"`
}

CloudRegion holds information about a cloud region.

type CloudResult

type CloudResult struct {
	Cloud *Cloud `json:"cloud,omitempty"`
	Error *Error `json:"error,omitempty"`
}

CloudResult contains a cloud definition or an error.

type CloudResults

type CloudResults struct {
	Results []CloudResult `json:"results,omitempty"`
}

CloudResults contains a set of CloudResults.

type CloudSpec

type CloudSpec struct {
	Type             string           `json:"type"`
	Name             string           `json:"name"`
	Region           string           `json:"region,omitempty"`
	Endpoint         string           `json:"endpoint,omitempty"`
	IdentityEndpoint string           `json:"identity-endpoint,omitempty"`
	StorageEndpoint  string           `json:"storage-endpoint,omitempty"`
	Credential       *CloudCredential `json:"credential,omitempty"`
}

CloudSpec holds a cloud specification.

type CloudSpecResult

type CloudSpecResult struct {
	Result *CloudSpec `json:"result,omitempty"`
	Error  *Error     `json:"error,omitempty"`
}

CloudSpecResult contains a CloudSpec or an error.

type CloudSpecResults

type CloudSpecResults struct {
	Results []CloudSpecResult `json:"results,omitempty"`
}

CloudSpecResults contains a set of CloudSpecResults.

type CloudsResult

type CloudsResult struct {
	// Clouds is a map of clouds, keyed by cloud tag.
	Clouds map[string]Cloud `json:"clouds,omitempty"`
}

CloudsResult contains a set of Clouds.

type ConfigSettings

type ConfigSettings map[string]interface{}

ConfigSettings holds unit, application or cham configuration settings with string keys and arbitrary values.

type ConfigSettingsResult

type ConfigSettingsResult struct {
	Error    *Error         `json:"error,omitempty"`
	Settings ConfigSettings `json:"settings"`
}

ConfigSettingsResult holds a configuration map or an error.

type ConfigSettingsResults

type ConfigSettingsResults struct {
	Results []ConfigSettingsResult `json:"results"`
}

ConfigSettingsResults holds multiple configuration maps or errors.

type ConfigValue

type ConfigValue struct {
	Value  interface{} `json:"value"`
	Source string      `json:"source"`
}

ConfigValue encapsulates a configuration value and its source.

type ConstraintsResult

type ConstraintsResult struct {
	Error       *Error            `json:"error,omitempty"`
	Constraints constraints.Value `json:"constraints"`
}

ConstraintsResult holds machine constraints or an error.

type ConstraintsResults

type ConstraintsResults struct {
	Results []ConstraintsResult `json:"results"`
}

ConstraintsResults holds multiple constraints results.

type ContainerConfig

type ContainerConfig struct {
	ProviderType            string         `json:"provider-type"`
	AuthorizedKeys          string         `json:"authorized-keys"`
	SSLHostnameVerification bool           `json:"ssl-hostname-verification"`
	Proxy                   proxy.Settings `json:"proxy"`
	AptProxy                proxy.Settings `json:"apt-proxy"`
	AptMirror               string         `json:"apt-mirror"`
	*UpdateBehavior
}

ContainerConfig contains information from the model config that is needed for container cloud-init.

type ContainerManagerConfig

type ContainerManagerConfig struct {
	ManagerConfig map[string]string `json:"config"`
}

ContainerManagerConfig contains information from the model config that is needed for configuring the container manager.

type ContainerManagerConfigParams

type ContainerManagerConfigParams struct {
	Type instance.ContainerType `json:"type"`
}

ContainerManagerConfigParams contains the parameters for the ContainerManagerConfig provisioner API call.

type ControllerAction

type ControllerAction string

ControllerAction is an action that can be performed on a model.

const (
	GrantControllerAccess  ControllerAction = "grant"
	RevokeControllerAccess ControllerAction = "revoke"
)

Actions that can be preformed on a model.

type ControllerConfig

type ControllerConfig map[string]interface{}

ControllerConfig holds a controller configuration.

type ControllerConfigResult

type ControllerConfigResult struct {
	Config ControllerConfig `json:"config"`
}

ControllerConfigResult holds controller configuration.

type ControllersChangeResult

type ControllersChangeResult struct {
	Result ControllersChanges `json:"result"`
	Error  *Error             `json:"error,omitempty"`
}

ControllersChangeResult contains the results of a single EnableHA API call or an error.

type ControllersChangeResults

type ControllersChangeResults struct {
	Results []ControllersChangeResult `json:"results"`
}

ControllersChangeResults contains the results of the EnableHA API call.

type ControllersChanges

type ControllersChanges struct {
	Added      []string `json:"added,omitempty"`
	Maintained []string `json:"maintained,omitempty"`
	Removed    []string `json:"removed,omitempty"`
	Promoted   []string `json:"promoted,omitempty"`
	Demoted    []string `json:"demoted,omitempty"`
	Converted  []string `json:"converted,omitempty"`
}

ControllersChanges lists the servers that have been added, removed or maintained in the pool as a result of an enable-ha operation.

type ControllersSpec

type ControllersSpec struct {
	ModelTag       string            `json:"model-tag"`
	NumControllers int               `json:"num-controllers"`
	Constraints    constraints.Value `json:"constraints,omitempty"`
	// Series is the series to associate with new controller machines.
	// If this is empty, then the model's default series is used.
	Series string `json:"series,omitempty"`
	// Placement defines specific machines to become new controller machines.
	Placement []string `json:"placement,omitempty"`
}

ControllersServersSpec contains arguments for the EnableHA client API call.

type ControllersSpecs

type ControllersSpecs struct {
	Specs []ControllersSpec `json:"specs"`
}

ControllersServersSpecs contains all the arguments for the EnableHA API call.

type CreateSpaceParams

type CreateSpaceParams struct {
	SubnetTags []string `json:"subnet-tags"`
	SpaceTag   string   `json:"space-tag"`
	Public     bool     `json:"public"`
	ProviderId string   `json:"provider-id,omitempty"`
}

CreateSpaceParams holds the space tag and at least one subnet tag required to create a new space.

type CreateSpacesParams

type CreateSpacesParams struct {
	Spaces []CreateSpaceParams `json:"spaces"`
}

CreateSpacesParams olds the arguments of the AddSpaces API call.

type CreateSubnetParams

type CreateSubnetParams struct {
	SubnetTag string   `json:"subnet-tag,omitempty"`
	SpaceTag  string   `json:"space-tag"`
	Zones     []string `json:"zones,omitempty"`
	VLANTag   int      `json:"vlan-tag,omitempty"`
	IsPublic  bool     `json:"is-public"`
}

CreateSubnetParams holds a subnet and space tags, vlan tag, and a list of zones to associate the subnet to.

type CreateSubnetsParams

type CreateSubnetsParams struct {
	Subnets []CreateSubnetParams `json:"subnets"`
}

CreateSubnetsParams holds the arguments of CreateSubnets API call.

type Creds

type Creds struct {
	AuthTag  string `json:"auth-tag"`
	Password string `json:"password"`
	Nonce    string `json:"nonce"`
}

Creds holds credentials for identifying an entity.

type DeployerConnectionValues

type DeployerConnectionValues struct {
	StateAddresses []string `json:"state-addresses"`
	APIAddresses   []string `json:"api-addresses"`
}

DeployerConnectionValues containers the result of deployer.ConnectionInfo API call.

type DestroyApplicationUnits

type DestroyApplicationUnits struct {
	UnitNames []string `json:"unit-names"`
}

DestroyApplicationUnits holds parameters for the DestroyUnits call.

type DestroyControllerArgs

type DestroyControllerArgs struct {
	// DestroyModels specifies whether or not the hosted models
	// should be destroyed as well. If this is not specified, and there are
	// other hosted models, the destruction of the controller will fail.
	DestroyModels bool `json:"destroy-models"`
}

DestroyControllerArgs holds the arguments for destroying a controller.

type DestroyMachines

type DestroyMachines struct {
	MachineNames []string `json:"machine-names"`
	Force        bool     `json:"force"`
}

DestroyMachines holds parameters for the DestroyMachines call.

type DestroyRelation

type DestroyRelation struct {
	Endpoints []string `json:"endpoints"`
}

DestroyRelation holds the parameters for making the DestroyRelation call. The endpoints specified are unordered.

type DetailedStatus

type DetailedStatus struct {
	Status  string                 `json:"status"`
	Info    string                 `json:"info"`
	Data    map[string]interface{} `json:"data"`
	Since   *time.Time             `json:"since"`
	Kind    string                 `json:"kind"`
	Version string                 `json:"version"`
	Life    string                 `json:"life"`
	Err     error                  `json:"err,omitempty"`
}

DetailedStatus holds status info about a machine or unit agent.

type DigestAlgorithm

type DigestAlgorithm string

DigestAlgorithm is one of the values in the IANA registry. See RFC 3230 and 5843.

type DiscoverSpacesResults

type DiscoverSpacesResults struct {
	Results []ProviderSpace `json:"results"`
}

DiscoverSpacesResults holds the list of all provider spaces.

type DistributionGroupResult

type DistributionGroupResult struct {
	Error  *Error        `json:"error,omitempty"`
	Result []instance.Id `json:"result"`
}

DistributionGroupResult contains the result of the DistributionGroup provisioner API call.

type DistributionGroupResults

type DistributionGroupResults struct {
	Results []DistributionGroupResult `json:"results"`
}

DistributionGroupResults is the bulk form of DistributionGroupResult.

type EndpointStatus

type EndpointStatus struct {
	ApplicationName string `json:"application"`
	Name            string `json:"name"`
	Role            string `json:"role"`
	Subordinate     bool   `json:"subordinate"`
}

EndpointStatus holds status info about a single endpoint

func (*EndpointStatus) String

func (epStatus *EndpointStatus) String() string

type Entities

type Entities struct {
	Entities []Entity `json:"entities"`
}

Entities identifies multiple entities.

type EntitiesCharmURL

type EntitiesCharmURL struct {
	Entities []EntityCharmURL `json:"entities"`
}

EntitiesCharmURL holds the parameters for making a SetCharmURL API call.

type EntitiesPortRanges

type EntitiesPortRanges struct {
	Entities []EntityPortRange `json:"entities"`
}

EntitiesPortRanges holds the parameters for making an OpenPorts or ClosePorts on some entities.

type EntitiesPorts

type EntitiesPorts struct {
	Entities []EntityPort `json:"entities"`
}

EntitiesPorts holds the parameters for making an OpenPort or ClosePort on some entities.

type EntitiesResult

type EntitiesResult struct {
	Entities []Entity `json:"entities"`
	Error    *Error   `json:"error,omitempty"`
}

EntitiesResult is the result of one query that either yields some set of entities or an error.

type EntitiesResults

type EntitiesResults struct {
	Results []EntitiesResult `json:"results"`
}

EntitiesResults contains multiple Entities results (where each Entities is the result of a query).

type EntitiesVersion

type EntitiesVersion struct {
	AgentTools []EntityVersion `json:"agent-tools"`
}

EntitiesVersion specifies what tools are being run for multiple entities.

type EntitiesWatchResult

type EntitiesWatchResult struct {
	// Note legacy serialization tag.
	EntitiesWatcherId string   `json:"watcher-id"`
	Changes           []string `json:"changes,omitempty"`
	Error             *Error   `json:"error,omitempty"`
}

EntitiesWatchResult holds a EntitiesWatcher id, changes and an error (if any).

type EntitiesWatchResults

type EntitiesWatchResults struct {
	Results []EntitiesWatchResult `json:"results"`
}

EntitiesWatchResults holds the results for any API call which ends up returning a list of EntitiesWatchers.

type Entity

type Entity struct {
	Tag string `json:"tag"`
}

Entity identifies a single entity.

type EntityAnnotations

type EntityAnnotations struct {
	EntityTag   string            `json:"entity"`
	Annotations map[string]string `json:"annotations"`
}

EntityAnnotations stores annotations for an entity.

type EntityCharmURL

type EntityCharmURL struct {
	Tag      string `json:"tag"`
	CharmURL string `json:"charm-url"`
}

EntityCharmURL holds an entity's tag and a charm URL.

type EntityMetrics

type EntityMetrics struct {
	Metrics []MetricResult `json:"metrics,omitempty"`
	Error   *Error         `json:"error,omitempty"`
}

EntityMetrics contains the results of a GetMetrics call for a single entity.

type EntityPassword

type EntityPassword struct {
	Tag      string `json:"tag"`
	Password string `json:"password"`
}

EntityPassword specifies a password change for the entity with the given tag.

type EntityPasswords

type EntityPasswords struct {
	Changes []EntityPassword `json:"changes"`
}

EntityPasswords holds the parameters for making a SetPasswords call.

type EntityPort

type EntityPort struct {
	Tag      string `json:"tag"`
	Protocol string `json:"protocol"`
	Port     int    `json:"port"`
}

EntityPort holds an entity's tag, a protocol and a port.

type EntityPortRange

type EntityPortRange struct {
	Tag      string `json:"tag"`
	Protocol string `json:"protocol"`
	FromPort int    `json:"from-port"`
	ToPort   int    `json:"to-port"`
}

EntityPortRange holds an entity's tag, a protocol and a port range.

type EntityStatus

type EntityStatus struct {
	Status status.Status          `json:"status"`
	Info   string                 `json:"info"`
	Data   map[string]interface{} `json:"data,omitempty"`
	Since  *time.Time             `json:"since"`
}

EntityStatus holds the status of an entity.

type EntityStatusArgs

type EntityStatusArgs struct {
	Tag    string                 `json:"tag"`
	Status string                 `json:"status"`
	Info   string                 `json:"info"`
	Data   map[string]interface{} `json:"data"`
}

EntityStatusArgs holds parameters for setting the status of a single entity.

type EntityVersion

type EntityVersion struct {
	Tag   string   `json:"tag"`
	Tools *Version `json:"tools"`
}

EntityVersion specifies the tools version to be set for an entity with the given tag. version.Binary directly.

type EntityWorkloadVersion

type EntityWorkloadVersion struct {
	Tag             string `json:"tag"`
	WorkloadVersion string `json:"workload-version"`
}

EntityWorkloadVersion holds the workload version for an entity.

type EntityWorkloadVersions

type EntityWorkloadVersions struct {
	Entities []EntityWorkloadVersion `json:"entities"`
}

EntityWorkloadVersions holds the parameters for setting the workload version for a set of entities.

type Error

type Error struct {
	Message string     `json:"message"`
	Code    string     `json:"code"`
	Info    *ErrorInfo `json:"info,omitempty"`
}

Error is the type of error returned by any call to the state API.

func (Error) Error

func (e Error) Error() string

func (Error) ErrorCode

func (e Error) ErrorCode() string

func (Error) GoString

func (e Error) GoString() string

GoString implements fmt.GoStringer. It means that a *Error shows its contents correctly when printed with %#v.

type ErrorInfo

type ErrorInfo struct {
	// Macaroon may hold a macaroon that, when
	// discharged, may allow access to the juju API.
	// This field is associated with the ErrDischargeRequired
	// error code.
	Macaroon *macaroon.Macaroon `json:"macaroon,omitempty"`

	// MacaroonPath holds the URL path to be associated
	// with the macaroon. The macaroon is potentially
	// valid for all URLs under the given path.
	// If it is empty, the macaroon will be associated with
	// the original URL from which the error was returned.
	MacaroonPath string `json:"macaroon-path,omitempty"`
}

ErrorInfo holds additional information provided by an error. Note that although these fields are compatible with the same fields in httpbakery.ErrorInfo, the Juju API server does not implement endpoints directly compatible with that protocol because the error response format varies according to the endpoint.

type ErrorResult

type ErrorResult struct {
	Error *Error `json:"error,omitempty"`
}

ErrorResult holds the error status of a single operation.

type ErrorResults

type ErrorResults struct {
	// Results contains the error results from each operation.
	Results []ErrorResult `json:"results"`
}

ErrorResults holds the results of calling a bulk operation which returns no data, only an error result. The order and number of elements matches the operations specified in the request.

func (ErrorResults) Combine

func (result ErrorResults) Combine() error

Combine returns one error from the result which is an accumulation of the errors. If there are no errors in the result, the return value is nil. Otherwise the error values are combined with new-line characters.

func (ErrorResults) OneError

func (result ErrorResults) OneError() error

OneError returns the error from the result of a bulk operation on a single value.

type FacadeVersions

type FacadeVersions struct {
	Name     string `json:"name"`
	Versions []int  `json:"versions"`
}

FacadeVersions describes the available Facades and what versions of each one are available

type Filesystem

type Filesystem struct {
	FilesystemTag string         `json:"filesystem-tag"`
	VolumeTag     string         `json:"volume-tag,omitempty"`
	Info          FilesystemInfo `json:"info"`
}

Filesystem identifies and describes a storage filesystem in the model.

type FilesystemAttachment

type FilesystemAttachment struct {
	FilesystemTag string                   `json:"filesystem-tag"`
	MachineTag    string                   `json:"machine-tag"`
	Info          FilesystemAttachmentInfo `json:"info"`
}

FilesystemAttachment identifies and describes a filesystem attachment.

type FilesystemAttachmentInfo

type FilesystemAttachmentInfo struct {
	MountPoint string `json:"mount-point,omitempty"`
	ReadOnly   bool   `json:"read-only,omitempty"`
}

FilesystemAttachmentInfo describes a filesystem attachment.

type FilesystemAttachmentParams

type FilesystemAttachmentParams struct {
	FilesystemTag string `json:"filesystem-tag"`
	MachineTag    string `json:"machine-tag"`
	FilesystemId  string `json:"filesystem-id,omitempty"`
	InstanceId    string `json:"instance-id,omitempty"`
	Provider      string `json:"provider"`
	MountPoint    string `json:"mount-point,omitempty"`
	ReadOnly      bool   `json:"read-only,omitempty"`
}

FilesystemAttachmentParams holds the parameters for creating a filesystem attachment.

type FilesystemAttachmentParamsResult

type FilesystemAttachmentParamsResult struct {
	Result FilesystemAttachmentParams `json:"result"`
	Error  *Error                     `json:"error,omitempty"`
}

FilesystemAttachmentParamsResults holds provisioning parameters for a filesystem attachment.

type FilesystemAttachmentParamsResults

type FilesystemAttachmentParamsResults struct {
	Results []FilesystemAttachmentParamsResult `json:"results,omitempty"`
}

FilesystemAttachmentParamsResults holds provisioning parameters for multiple filesystem attachments.

type FilesystemAttachmentResult

type FilesystemAttachmentResult struct {
	Result FilesystemAttachment `json:"result"`
	Error  *Error               `json:"error,omitempty"`
}

FilesystemAttachmentResult holds the details of a single filesystem attachment, or an error.

type FilesystemAttachmentResults

type FilesystemAttachmentResults struct {
	Results []FilesystemAttachmentResult `json:"results,omitempty"`
}

FilesystemAttachmentResults holds a set of FilesystemAttachmentResults.

type FilesystemAttachments

type FilesystemAttachments struct {
	FilesystemAttachments []FilesystemAttachment `json:"filesystem-attachments"`
}

FilesystemAttachments describes a set of storage filesystem attachments.

type FilesystemDetails

type FilesystemDetails struct {
	// FilesystemTag is the tag for the filesystem.
	FilesystemTag string `json:"filesystem-tag"`

	// VolumeTag is the tag for the volume backing the
	// filesystem, if any.
	VolumeTag string `json:"volume-tag,omitempty"`

	// Info contains information about the filesystem.
	Info FilesystemInfo `json:"info"`

	// Status contains the status of the filesystem.
	Status EntityStatus `json:"status"`

	// MachineAttachments contains a mapping from
	// machine tag to filesystem attachment information.
	MachineAttachments map[string]FilesystemAttachmentInfo `json:"machine-attachments,omitempty"`

	// Storage contains details about the storage instance
	// that the volume is assigned to, if any.
	Storage *StorageDetails `json:"storage,omitempty"`
}

FilesystemDetails describes a storage filesystem in the model for the purpose of filesystem CLI commands.

This is kept separate from Filesystem which contains only information specific to the filesystem model, whereas FilesystemDetails is intended to contain complete information about a filesystem and related information (status, attachments, storage).

type FilesystemDetailsListResult

type FilesystemDetailsListResult struct {
	Result []FilesystemDetails `json:"result,omitempty"`
	Error  *Error              `json:"error,omitempty"`
}

FilesystemDetailsListResult holds a collection of filesystem details.

type FilesystemDetailsListResults

type FilesystemDetailsListResults struct {
	Results []FilesystemDetailsListResult `json:"results,omitempty"`
}

FilesystemDetailsListResults holds a collection of collections of filesystem details.

type FilesystemDetailsResult

type FilesystemDetailsResult struct {
	Result *FilesystemDetails `json:"result,omitempty"`
	Error  *Error             `json:"error,omitempty"`
}

FilesystemDetailsResult contains details about a filesystem, its attachments or an error preventing retrieving those details.

type FilesystemDetailsResults

type FilesystemDetailsResults struct {
	Results []FilesystemDetailsResult `json:"results,omitempty"`
}

FilesystemDetailsResults holds filesystem details.

type FilesystemFilter

type FilesystemFilter struct {
	// Machines are machine tags to filter on.
	Machines []string `json:"machines,omitempty"`
}

FilesystemFilter holds a filter for filter list API call.

func (*FilesystemFilter) IsEmpty

func (f *FilesystemFilter) IsEmpty() bool

IsEmpty determines if filter is empty

type FilesystemFilters

type FilesystemFilters struct {
	Filters []FilesystemFilter `json:"filters,omitempty"`
}

FilesystemFilters holds a collection of filesystem filters.

type FilesystemInfo

type FilesystemInfo struct {
	FilesystemId string `json:"filesystem-id"`
	// Size is the size of the filesystem in MiB.
	Size uint64 `json:"size"`
}

Filesystem describes a storage filesystem in the model.

type FilesystemParams

type FilesystemParams struct {
	FilesystemTag string                      `json:"filesystem-tag"`
	VolumeTag     string                      `json:"volume-tag,omitempty"`
	Size          uint64                      `json:"size"`
	Provider      string                      `json:"provider"`
	Attributes    map[string]interface{}      `json:"attributes,omitempty"`
	Tags          map[string]string           `json:"tags,omitempty"`
	Attachment    *FilesystemAttachmentParams `json:"attachment,omitempty"`
}

FilesystemParams holds the parameters for creating a storage filesystem.

type FilesystemParamsResult

type FilesystemParamsResult struct {
	Result FilesystemParams `json:"result"`
	Error  *Error           `json:"error,omitempty"`
}

FilesystemParamsResults holds provisioning parameters for a filesystem.

type FilesystemParamsResults

type FilesystemParamsResults struct {
	Results []FilesystemParamsResult `json:"results,omitempty"`
}

FilesystemParamsResults holds provisioning parameters for multiple filesystems.

type FilesystemResult

type FilesystemResult struct {
	Result Filesystem `json:"result"`
	Error  *Error     `json:"error,omitempty"`
}

FilesystemResult holds information about a filesystem.

type FilesystemResults

type FilesystemResults struct {
	Results []FilesystemResult `json:"results,omitempty"`
}

FilesystemResults holds information about multiple filesystems.

type Filesystems

type Filesystems struct {
	Filesystems []Filesystem `json:"filesystems"`
}

Filesystems describes a set of storage filesystems in the model.

type FindActionsByNames

type FindActionsByNames struct {
	ActionNames []string `json:"names,omitempty"`
}

FindActionsByName finds actions given an action name.

type FindTags

type FindTags struct {
	Prefixes []string `json:"prefixes"`
}

FindTags wraps a slice of strings that are prefixes to use when searching for matching tags.

type FindTagsResults

type FindTagsResults struct {
	Matches map[string][]Entity `json:"matches"`
}

FindTagsResults wraps the mapping between the requested prefix and the matching tags for each requested prefix.

type FindToolsParams

type FindToolsParams struct {
	// Number will be used to match tools versions exactly if non-zero.
	Number version.Number `json:"number"`

	// MajorVersion will be used to match the major version if non-zero.
	MajorVersion int `json:"major"`

	// MinorVersion will be used to match the major version if greater
	// than or equal to zero, and Number is zero.
	MinorVersion int `json:"minor"`

	// Arch will be used to match tools by architecture if non-empty.
	Arch string `json:"arch"`

	// Series will be used to match tools by series if non-empty.
	Series string `json:"series"`
}

FindToolsParams defines parameters for the FindTools method.

type FindToolsResult

type FindToolsResult struct {
	List  tools.List `json:"list"`
	Error *Error     `json:"error,omitempty"`
}

FindToolsResult holds a list of tools from FindTools and any error.

type FullStatus

type FullStatus struct {
	Model        ModelStatusInfo              `json:"model"`
	Machines     map[string]MachineStatus     `json:"machines"`
	Applications map[string]ApplicationStatus `json:"applications"`
	Relations    []RelationStatus             `json:"relations"`
}

FullStatus holds information about the status of a juju model.

type GUIArchiveResponse

type GUIArchiveResponse struct {
	Versions []GUIArchiveVersion `json:"versions"`
}

GUIArchiveResponse holds the response to /gui-archive GET requests.

type GUIArchiveVersion

type GUIArchiveVersion struct {
	// Version holds the Juju GUI version number.
	Version version.Number `json:"version"`
	// SHA256 holds the SHA256 hash of the GUI tar.bz2 archive.
	SHA256 string `json:"sha256"`
	// Current holds whether this specific version is the current one served
	// by the controller.
	Current bool `json:"current"`
}

GUIArchiveVersion holds information on a specific GUI archive version.

type GUIVersionRequest

type GUIVersionRequest struct {
	// Version holds the Juju GUI version number.
	Version version.Number `json:"version"`
}

GUIVersionRequest holds the body for /gui-version PUT requests.

type GetAnnotations

type GetAnnotations struct {
	Tag string `json:"tag"`
}

GetAnnotations stores parameters for making the GetAnnotations call.

type GetAnnotationsResults

type GetAnnotationsResults struct {
	Annotations map[string]string `json:"annotations"`
}

GetAnnotationsResults holds annotations associated with an entity.

type GetApplicationConstraints

type GetApplicationConstraints struct {
	ApplicationName string `json:"application"`
}

GetApplicationConstraints stores parameters for making the GetApplicationConstraints call.

type GetBundleChangesParams

type GetBundleChangesParams struct {
	// BundleDataYAML is the YAML-encoded charm bundle data
	// (see "github.com/juju/charm.BundleData").
	BundleDataYAML string `json:"yaml"`
}

GetBundleChangesParams holds parameters for making GetBundleChanges calls.

type GetBundleChangesResults

type GetBundleChangesResults struct {
	// Changes holds the list of changes required to deploy the bundle.
	// It is omitted if the provided bundle YAML has verification errors.
	Changes []*BundleChangesChange `json:"changes,omitempty"`
	// Errors holds possible bundle verification errors.
	Errors []string `json:"errors,omitempty"`
}

GetBundleChangesResults holds results of the GetBundleChanges call.

type GetConstraintsResults

type GetConstraintsResults struct {
	Constraints constraints.Value `json:"constraints"`
}

GetConstraintsResults holds results of the GetConstraints call.

type GetLeadershipSettingsBulkResults

type GetLeadershipSettingsBulkResults struct {
	Results []GetLeadershipSettingsResult `json:"results"`
}

GetLeadershipSettingsBulkResults is the collection of results from a bulk request for leadership settings.

type GetLeadershipSettingsResult

type GetLeadershipSettingsResult struct {
	Settings Settings `json:"settings"`
	Error    *Error   `json:"error,omitempty"`
}

GetLeadershipSettingsResult is the results from requesting leadership settings.

type HAMember

type HAMember struct {
	Tag           string          `json:"tag"`
	PublicAddress network.Address `json:"public-address"`
	Series        string          `json:"series"`
}

HAMember holds information that identifies one member of HA.

type History

type History struct {
	Statuses []DetailedStatus `json:"statuses"`
	Error    *Error           `json:"error,omitempty"`
}

History holds many DetailedStatus,

type HostPort

type HostPort struct {
	Address
	Port int `json:"port"`
}

HostPort associates an address with a port. It's used in the API requests/responses. See also network.HostPort, from/to which this is transformed.

func FromNetworkHostPort

func FromNetworkHostPort(nhp network.HostPort) HostPort

FromNetworkHostPort is a convenience helper to create a parameter out of the network type, here for HostPort.

func FromNetworkHostPorts

func FromNetworkHostPorts(nhps []network.HostPort) []HostPort

FromNetworkHostPorts is a helper to create a parameter out of the network type, here for a slice of HostPort.

func (HostPort) NetworkHostPort

func (hp HostPort) NetworkHostPort() network.HostPort

NetworkHostPort is a convenience helper to return the parameter as network type, here for HostPort.

type HostedModelConfig

type HostedModelConfig struct {
	Name      string                 `json:"name"`
	OwnerTag  string                 `json:"owner"`
	Config    map[string]interface{} `json:"config,omitempty"`
	CloudSpec *CloudSpec             `json:"cloud-spec,omitempty"`
	Error     *Error                 `json:"error,omitempty"`
}

HostedModelConfig contains the model config and the cloud spec for the model, both things that a client needs to talk directly with the provider. This is used to take down mis-behaving models aggressively.

type HostedModelConfigsResults

type HostedModelConfigsResults struct {
	Models []HostedModelConfig `json:"models"`
}

HostedModelConfigsResults contains an entry for each hosted model in the controller.

type ImageFilterParams

type ImageFilterParams struct {
	Images []ImageSpec `json:"images"`
}

ImageFilterParams holds the parameters used to specify images to delete.

type ImageMetadata

type ImageMetadata struct {
	Kind    string    `json:"kind"`
	Arch    string    `json:"arch"`
	Series  string    `json:"series"`
	URL     string    `json:"url"`
	Created time.Time `json:"created"`
}

ImageMetadata represents an image in storage.

type ImageMetadataFilter

type ImageMetadataFilter struct {
	// Region stores metadata region.
	Region string `json:"region,omitempty"`

	// Series stores all desired series.
	Series []string `json:"series,omitempty"`

	// Arches stores all desired architectures.
	Arches []string `json:"arches,omitempty"`

	// Stream can be "" or "released" for the default "released" stream,
	// or "daily" for daily images, or any other stream that the available
	// simplestreams metadata supports.
	Stream string `json:"stream,omitempty"`

	// VirtType stores virtualisation type.
	VirtType string `json:"virt-type,omitempty"`

	// RootStorageType stores storage type.
	RootStorageType string `json:"root-storage-type,omitempty"`
}

ImageMetadataFilter holds filter properties used to search for image metadata. It amalgamates both simplestreams.MetadataLookupParams and simplestreams.LookupParams and adds additional properties to satisfy existing and new use cases.

type ImageSpec

type ImageSpec struct {
	Kind   string `json:"kind"`
	Arch   string `json:"arch"`
	Series string `json:"series"`
}

ImageSpec defines the parameters to select images list or delete.

type InitiateMigrationArgs

type InitiateMigrationArgs struct {
	Specs []MigrationSpec `json:"specs"`
}

InitiateMigrationArgs holds the details required to start one or more model migrations.

type InitiateMigrationResult

type InitiateMigrationResult struct {
	ModelTag    string `json:"model-tag"`
	Error       *Error `json:"error,omitempty"`
	MigrationId string `json:"migration-id"`
}

InitiateMigrationResult is used to return the result of one model migration initiation attempt.

type InitiateMigrationResults

type InitiateMigrationResults struct {
	Results []InitiateMigrationResult `json:"results"`
}

InitiateMigrationResults is used to return the result of one or more attempts to start model migrations.

type InstanceInfo

type InstanceInfo struct {
	Tag             string                            `json:"tag"`
	InstanceId      instance.Id                       `json:"instance-id"`
	Nonce           string                            `json:"nonce"`
	Characteristics *instance.HardwareCharacteristics `json:"characteristics"`
	Volumes         []Volume                          `json:"volumes"`
	// VolumeAttachments is a mapping from volume tag to
	// volume attachment info.
	VolumeAttachments map[string]VolumeAttachmentInfo `json:"volume-attachments"`

	NetworkConfig []NetworkConfig `json:"network-config"`
}

InstanceInfo holds a machine tag, provider-specific instance id, a nonce, and network config.

type InstancesInfo

type InstancesInfo struct {
	Machines []InstanceInfo `json:"machines"`
}

InstancesInfo holds the parameters for making a SetInstanceInfo call for multiple machines.

type IntResult

type IntResult struct {
	// Error holds the error (if any) of this call.
	Error *Error `json:"error,omitempty"`
	// Result holds the integer result of the call (if Error is nil).
	Result int `json:"result"`
}

IntResult holds the result of an API call that returns a int or an error.

type IntResults

type IntResults struct {
	// Results holds a list of results for calls that return an int or error.
	Results []IntResult `json:"results"`
}

IntResults holds multiple results with an int in each.

type IsMasterResult

type IsMasterResult struct {
	// Master reports whether the connected agent
	// lives on the same instance as the mongo replica
	// set master.
	Master bool `json:"master"`
}

IsMasterResult holds the result of an IsMaster API call.

type IsMeteredResult

type IsMeteredResult struct {
	Metered bool `json:"metered"`
}

IsMeteredResult stores result from a charms.IsMetered call

type JobsResult

type JobsResult struct {
	Jobs  []multiwatcher.MachineJob `json:"jobs"`
	Error *Error                    `json:"error,omitempty"`
}

JobsResult holds the jobs for a machine that are returned by a call to Jobs.

type JobsResults

type JobsResults struct {
	Results []JobsResult `json:"results"`
}

JobsResults holds the result of a call to Jobs.

type Life

type Life multiwatcher.Life

Life describes the lifecycle state of an entity ("alive", "dying" or "dead").

const (
	Alive Life = "alive"
	Dying Life = "dying"
	Dead  Life = "dead"
)

type LifeResult

type LifeResult struct {
	Life  Life   `json:"life"`
	Error *Error `json:"error,omitempty"`
}

LifeResult holds the life status of a single entity, or an error indicating why it is not available.

type LifeResults

type LifeResults struct {
	Results []LifeResult `json:"results"`
}

LifeResults holds the life or error status of multiple entities.

type ListCloudImageMetadataResult

type ListCloudImageMetadataResult struct {
	Result []CloudImageMetadata `json:"result"`
}

ListCloudImageMetadataResult holds the results of querying cloud image metadata.

type ListImageResult

type ListImageResult struct {
	Result []ImageMetadata `json:"result"`
}

ListImageResult holds the results of querying images.

type ListSSHKeys

type ListSSHKeys struct {
	Entities `json:"entities"`
	Mode     ssh.ListMode `json:"mode"`
}

ListSSHKeys stores parameters used for a KeyManager.ListKeys call.

type ListSpacesResults

type ListSpacesResults struct {
	Results []Space `json:"results"`
}

ListSpacesResults holds the list of all available spaces.

type ListSubnetsResults

type ListSubnetsResults struct {
	Results []Subnet `json:"results"`
}

ListSubnetsResults holds the result of a ListSubnets API call.

type LogForwardingGetLastSentParams

type LogForwardingGetLastSentParams struct {
	// IDs holds the list of IDs for which individual "last sent"
	// timestamps should be returned (in the same order).
	IDs []LogForwardingID `json:"ids"`
}

LogForwardingGetLastSentParams holds the arguments for a call to the GetLastSent method of the LogForwarding facade.

type LogForwardingGetLastSentResult

type LogForwardingGetLastSentResult struct {
	// RecordID is the ID of the last log record that was
	// forwarded for a given model and sink. If Error is set then the
	// meaning of this value is undefined.
	RecordID int64 `json:"record-id"`

	// RecordTimestamp is the timestamp of the last log record that was
	// forwarded for a given model and sink. If Error is set then the
	// meaning of this value is undefined.
	RecordTimestamp int64 `json:"record-timestamp"`

	// Error holds the error, if any, that resulted while handling the
	// request for a specific ID.
	Error *Error `json:"err"`
}

LogForwardingGetLastSentResult holds a single result from a call to the GetLastSent method of the LogForwarding facade.

type LogForwardingGetLastSentResults

type LogForwardingGetLastSentResults struct {
	// Results holds the list of results that correspond to the IDs
	// sent in a GetLastSent call.
	Results []LogForwardingGetLastSentResult `json:"results"`
}

LogForwardingGetLastSentResults holds the results of a call to the GetLastSent method of the LogForwarding facade.

type LogForwardingID

type LogForwardingID struct {
	// ModelTag identifies the model associated with the log record.
	ModelTag string `json:"model"`

	// Sink is the name of the log forwarding target to which a log
	// record was last sent.
	Sink string `json:"sink"`
}

LogForwardingID is the API data that identifies a log forwarding "last sent" value. The controller has a mapping from a set of IDs to a timestamp (for each ID). The timestamp corresponds to the last log record that the specific log forwarding machinery sent to the identified "sink" (for a given model).

type LogForwardingSetLastSentParam

type LogForwardingSetLastSentParam struct {
	LogForwardingID

	// RecordID identifies the record ID to set for the given ID.
	RecordID int64 `json:"record-id"`

	// RecordTimestamp identifies the record timestamp to set for the given ID.
	RecordTimestamp int64 `json:"record-timestamp"`
}

LogForwardingSetLastSentParams holds holds the info needed to set a new "last sent" value via a call to the SetLastSent method of the LogForwarding facade.

type LogForwardingSetLastSentParams

type LogForwardingSetLastSentParams struct {
	// Params holds the list of individual requests for "last sent" info.
	Params []LogForwardingSetLastSentParam `json:"params"`
}

LogForwardingSetLastSentParams holds the arguments for a call to the SetLastSent method of the LogForwarding facade.

type LogMessage

type LogMessage struct {
	Entity    string    `json:"tag"`
	Timestamp time.Time `json:"ts"`
	Severity  string    `json:"sev"`
	Module    string    `json:"mod"`
	Location  string    `json:"loc"`
	Message   string    `json:"msg"`
}

LogMessage is a structured logging entry.

type LogRecord

type LogRecord struct {
	Time     time.Time `json:"t"`
	Module   string    `json:"m"`
	Location string    `json:"l"`
	Level    string    `json:"v"`
	Message  string    `json:"x"`
}

LogRecord is used to transmit log messages to the logsink API endpoint. Single character field names are used for serialisation to keep the size down. These messages are going to be sent a lot.

type LogStreamConfig

type LogStreamConfig struct {
	// AllModels indicates whether logs for all the controller's models
	// should be included or just those of the connection's model.
	AllModels bool `schema:"all" url:"all,omitempty"`

	// Sink identifies the target to which log records will be streamed.
	// This is used as a bookmark for where to start the next time logs
	// are streamed for the same sink.
	Sink string `schema:"sink" url:"sink,omitempty"`

	// MaxLookbackDuration is the maximum time duration from the past to stream.
	// It must be a valid time duration string.
	MaxLookbackDuration string `schema:"maxlookbackduration" url:"maxlookbackduration,omitempty"`

	// MaxLookbackRecords is the maximum number of log records to stream from the past.
	MaxLookbackRecords int `schema:"maxlookbackrecords" url:"maxlookbackrecords,omitempty"`
}

LogStreamConfig holds all the information necessary to open a streaming connection to the API endpoint for reading log records.

The field tags relate to the following 2 libraries:

github.com/google/go-querystring/query (encoding)
github.com/gorilla/schema (decoding)

See apiserver/debuglog.go:debugLogParams for additional things we may consider supporting here.

type LogStreamRecord

type LogStreamRecord struct {
	ID        int64     `json:"id"`
	ModelUUID string    `json:"mid"`
	Entity    string    `json:"ent"`
	Version   string    `json:"ver,omitempty"`
	Timestamp time.Time `json:"ts"`
	Module    string    `json:"mod"`
	Location  string    `json:"lo"`
	Level     string    `json:"lv"`
	Message   string    `json:"msg"`
}

LogStreamRecord describes a single log record being streamed from the server.

type LogStreamRecords

type LogStreamRecords struct {
	Records []LogStreamRecord `json:"records"`
}

LogStreamRecord contains a slice of LogStreamRecords.

type LoginRequest

type LoginRequest struct {
	AuthTag     string           `json:"auth-tag"`
	Credentials string           `json:"credentials"`
	Nonce       string           `json:"nonce"`
	Macaroons   []macaroon.Slice `json:"macaroons"`
	UserData    string           `json:"user-data"`
}

LoginRequest holds credentials for identifying an entity to the Login v1 facade. AuthTag holds the tag of the user to connect as. If it is empty, then the provided macaroon slices will be used for authentication (if any one is valid, the authentication succeeds). If there are no valid macaroons and macaroon authentication is configured, the LoginResponse will contain a macaroon that when discharged, may allow access.

type LoginRequestCompat

type LoginRequestCompat struct {
	LoginRequest `json:"login-request"`
	Creds        `json:"creds"`
}

LoginRequestCompat holds credentials for identifying an entity to the Login v1 or earlier (v0 or even pre-facade).

type LoginResult

type LoginResult struct {
	// DischargeRequired implies that the login request has failed, and none of
	// the other fields are populated. It contains a macaroon which, when
	// discharged, will grant access on a subsequent call to Login.
	// Note: It is OK to use the Macaroon type here as it is explicitely
	// designed to provide stable serialisation of macaroons.  It's good
	// practice to only use primitives in types that will be serialised,
	// however because of the above it is suitable to use the Macaroon type
	// here.
	DischargeRequired *macaroon.Macaroon `json:"discharge-required,omitempty"`

	// DischargeRequiredReason holds the reason that the above discharge was
	// required.
	DischargeRequiredReason string `json:"discharge-required-error,omitempty"`

	// Servers is the list of API server addresses.
	Servers [][]HostPort `json:"servers,omitempty"`

	// ModelTag is the tag for the model that is being connected to.
	ModelTag string `json:"model-tag,omitempty"`

	// ControllerTag is the tag for the controller that runs the API servers.
	ControllerTag string `json:"controller-tag,omitempty"`

	// UserInfo describes the authenticated user, if any.
	UserInfo *AuthUserInfo `json:"user-info,omitempty"`

	// Facades describes all the available API facade versions to the
	// authenticated client.
	Facades []FacadeVersions `json:"facades,omitempty"`

	// ServerVersion is the string representation of the server version
	// if the server supports it.
	ServerVersion string `json:"server-version,omitempty"`
}

LoginResult holds the result of an Admin Login call.

type MacaroonResult

type MacaroonResult struct {
	Result *macaroon.Macaroon `json:"result,omitempty"`
	Error  *Error             `json:"error,omitempty"`
}

MacaroonResult contains a macaroon or an error.

type MacaroonResults

type MacaroonResults struct {
	Results []MacaroonResult `json:"results"`
}

MacaroonResults contains a set of MacaroonResults.

type MachineAddresses

type MachineAddresses struct {
	Tag       string    `json:"tag"`
	Addresses []Address `json:"addresses"`
}

MachineAddresses holds an machine tag and addresses.

type MachineAddressesResult

type MachineAddressesResult struct {
	Error     *Error    `json:"error,omitempty"`
	Addresses []Address `json:"addresses"`
}

MachineAddressesResult holds a list of machine addresses or an error.

type MachineAddressesResults

type MachineAddressesResults struct {
	Results []MachineAddressesResult `json:"results"`
}

MachineAddressesResults holds the results of calling an API method returning a list of addresses per machine.

type MachineBlockDevices

type MachineBlockDevices struct {
	Machine      string                `json:"machine"`
	BlockDevices []storage.BlockDevice `json:"block-devices,omitempty"`
}

MachineBlockDevices holds a machine tag and the block devices present on that machine.

type MachineContainers

type MachineContainers struct {
	MachineTag     string                   `json:"machine-tag"`
	ContainerTypes []instance.ContainerType `json:"container-types"`
}

MachineContainers holds the arguments for making an SetSupportedContainers call on a given machine.

type MachineContainersParams

type MachineContainersParams struct {
	Params []MachineContainers `json:"params"`
}

MachineContainersParams holds the arguments for making a SetSupportedContainers API call.

type MachineHardware

type MachineHardware struct {
	Arch             *string   `json:"arch,omitempty"`
	Mem              *uint64   `json:"mem,omitempty"`
	RootDisk         *uint64   `json:"root-disk,omitempty"`
	Cores            *uint64   `json:"cores,omitempty"`
	CpuPower         *uint64   `json:"cpu-power,omitempty"`
	Tags             *[]string `json:"tags,omitempty"`
	AvailabilityZone *string   `json:"availability-zone,omitempty"`
}

MachineHardware holds information about a machine's hardware characteristics.

type MachineNetworkConfigResult

type MachineNetworkConfigResult struct {
	Error *Error `json:"error,omitempty"`

	// Tagged to Info due to compatibility reasons.
	Config []NetworkConfig `json:"info"`
}

MachineNetworkConfigResult holds network configuration for a single machine.

type MachineNetworkConfigResults

type MachineNetworkConfigResults struct {
	Results []MachineNetworkConfigResult `json:"results"`
}

MachineNetworkConfigResults holds network configuration for multiple machines.

type MachinePortRange

type MachinePortRange struct {
	UnitTag     string    `json:"unit-tag"`
	RelationTag string    `json:"relation-tag"`
	PortRange   PortRange `json:"port-range"`
}

MachinePortRange holds a single port range open on a machine for the given unit and relation tags.

type MachinePorts

type MachinePorts struct {
	MachineTag string `json:"machine-tag"`
	SubnetTag  string `json:"subnet-tag"`
}

MachinePorts holds a machine and subnet tags. It's used when referring to opened ports on the machine for a subnet.

type MachinePortsParams

type MachinePortsParams struct {
	Params []MachinePorts `json:"params"`
}

MachinePortsParams holds the arguments for making a FirewallerAPIV1.GetMachinePorts() API call.

type MachinePortsResult

type MachinePortsResult struct {
	Error *Error             `json:"error,omitempty"`
	Ports []MachinePortRange `json:"ports"`
}

MachinePortsResult holds a single result of the FirewallerAPIV1.GetMachinePorts() and UniterAPI.AllMachinePorts() API calls.

type MachinePortsResults

type MachinePortsResults struct {
	Results []MachinePortsResult `json:"results"`
}

MachinePortsResults holds all the results of the FirewallerAPIV1.GetMachinePorts() and UniterAPI.AllMachinePorts() API calls.

type MachineStatus

type MachineStatus struct {
	AgentStatus    DetailedStatus `json:"agent-status"`
	InstanceStatus DetailedStatus `json:"instance-status"`

	DNSName    string                    `json:"dns-name"`
	InstanceId instance.Id               `json:"instance-id"`
	Series     string                    `json:"series"`
	Id         string                    `json:"id"`
	Containers map[string]MachineStatus  `json:"containers"`
	Hardware   string                    `json:"hardware"`
	Jobs       []multiwatcher.MachineJob `json:"jobs"`
	HasVote    bool                      `json:"has-vote"`
	WantsVote  bool                      `json:"wants-vote"`
}

MachineStatus holds status info about a machine.

type MachineStorageId

type MachineStorageId struct {
	MachineTag string `json:"machine-tag"`
	// AttachmentTag is the tag of the volume or filesystem whose
	// attachment to the machine is represented.
	AttachmentTag string `json:"attachment-tag"`
}

MachineStorageId identifies the attachment of a storage entity to a machine, by their tags.

type MachineStorageIds

type MachineStorageIds struct {
	Ids []MachineStorageId `json:"ids"`
}

MachineStorageIds holds a set of machine/storage-entity attachment identifiers.

type MachineStorageIdsWatchResult

type MachineStorageIdsWatchResult struct {
	MachineStorageIdsWatcherId string             `json:"watcher-id"`
	Changes                    []MachineStorageId `json:"changes"`
	Error                      *Error             `json:"error,omitempty"`
}

MachineStorageIdsWatchResult holds a MachineStorageIdsWatcher id, changes and an error (if any).

type MachineStorageIdsWatchResults

type MachineStorageIdsWatchResults struct {
	Results []MachineStorageIdsWatchResult `json:"results"`
}

MachineStorageIdsWatchResults holds the results for any API call which ends up returning a list of MachineStorageIdsWatchers.

type MapResult

type MapResult struct {
	Result map[string]interface{} `json:"result"`
	Error  *Error                 `json:"error,omitempty"`
}

MapResult holds a generic map or an error.

type MapResults

type MapResults struct {
	Results []MapResult `json:"results"`
}

MapResults holds the bulk operation result of an API call that returns a map or an error.

type MasterMigrationStatus

type MasterMigrationStatus struct {
	Spec             MigrationSpec `json:"spec"`
	MigrationId      string        `json:"migration-id"`
	Phase            string        `json:"phase"`
	PhaseChangedTime time.Time     `json:"phase-changed-time"`
}

MasterMigrationStatus is used to report the current status of a model migration for the migrationmaster. It includes authentication details for the remote controller.

type MergeLeadershipSettingsBulkParams

type MergeLeadershipSettingsBulkParams struct {

	// Params are the parameters for making a bulk leadership settings
	// merge.
	Params []MergeLeadershipSettingsParam `json:"params"`
}

MergeLeadershipSettingsBulkParams is a collection of parameters for making a bulk merge of leadership settings.

type MergeLeadershipSettingsParam

type MergeLeadershipSettingsParam struct {
	// ApplicationTag is the application for which you want to merge
	// leadership settings.
	ApplicationTag string `json:"application-tag"`

	// Settings are the Leadership settings you wish to merge in.
	Settings Settings `json:"settings"`
}

MergeLeadershipSettingsParam are the parameters needed for merging in leadership settings.

type MetadataImageIds

type MetadataImageIds struct {
	Ids []string `json:"image-ids"`
}

MetadataImageIds holds image ids and can be used to identify related image metadata.

type MetadataSaveParams

type MetadataSaveParams struct {
	Metadata []CloudImageMetadataList `json:"metadata,omitempty"`
}

MetadataSaveParams holds lists of cloud image metadata to save. Each list will be saved atomically.

type MeterStatus

type MeterStatus struct {
	Color   string `json:"color"`
	Message string `json:"message"`
}

MeterStatus represents the meter status of a unit.

type MeterStatusParam

type MeterStatusParam struct {
	Tag  string `json:"tag"`
	Code string `json:"code"`
	Info string `json:"info, omitempty"`
}

MeterStatusParam holds meter status information to be set for the specified tag.

type MeterStatusParams

type MeterStatusParams struct {
	Statuses []MeterStatusParam `json:"statues"`
}

MeterStatusParams holds parameters for making SetMeterStatus calls.

type MeterStatusResult

type MeterStatusResult struct {
	Code  string `json:"code"`
	Info  string `json:"info"`
	Error *Error `json:"error,omitempty"`
}

MeterStatusResult holds unit meter status or error.

type MeterStatusResults

type MeterStatusResults struct {
	Results []MeterStatusResult `json:"results"`
}

MeterStatusResults holds meter status results for multiple units.

type Metric

type Metric struct {
	Key   string    `json:"key"`
	Value string    `json:"value"`
	Time  time.Time `json:"time"`
}

Metric holds a single metric.

type MetricBatch

type MetricBatch struct {
	UUID     string    `json:"uuid"`
	CharmURL string    `json:"charm-url"`
	Created  time.Time `json:"created"`
	Metrics  []Metric  `json:"metrics"`
}

MetricBatch is a list of metrics with metadata.

type MetricBatchParam

type MetricBatchParam struct {
	Tag   string      `json:"tag"`
	Batch MetricBatch `json:"batch"`
}

MetricBatchParam contains a single metric batch.

type MetricBatchParams

type MetricBatchParams struct {
	Batches []MetricBatchParam `json:"batches"`
}

MetricBatchParams contains multiple metric batches.

type MetricResult

type MetricResult struct {
	Time  time.Time `json:"time"`
	Key   string    `json:"key"`
	Value string    `json:"value"`
	Unit  string    `json:"unit"`
}

MetricResult contains a single metric.

type MetricResults

type MetricResults struct {
	Results []EntityMetrics `json:"results"`
}

MetricResults contains results from a GetMetrics call, with one item per Entity given as an argument to the command.

func (*MetricResults) OneError

func (m *MetricResults) OneError() error

OneError returns the first error

type MetricsParam

type MetricsParam struct {
	Tag     string   `json:"tag"`
	Metrics []Metric `json:"metrics"`
}

MetricsParam contains the metrics for a single unit.

type MetricsParams

type MetricsParams struct {
	Metrics []MetricsParam `json:"metrics"`
}

MetricsParams contains the metrics for multiple units.

type MigrationModelInfo

type MigrationModelInfo struct {
	UUID         string         `json:"uuid"`
	Name         string         `json:"name"`
	OwnerTag     string         `json:"owner-tag"`
	AgentVersion version.Number `json:"agent-version"`
}

MigrationModelInfo is used to report basic model information to the migrationmaster worker.

type MigrationSpec

type MigrationSpec struct {
	ModelTag        string              `json:"model-tag"`
	TargetInfo      MigrationTargetInfo `json:"target-info"`
	ExternalControl bool                `json:"external-control"`

	// SkipInitialPrechecks allows the migration prechecks run during
	// handling of the InitiateMigration API call to be bypassed. It
	// is only honoured if ExternalControl is true.
	SkipInitialPrechecks bool `json:"skip-initial-prechecks"`
}

MigrationSpec holds the details required to start the migration of a single model.

type MigrationStatus

type MigrationStatus struct {
	MigrationId     string `json:"migration-id"`
	Attempt         int    `json:"attempt"`
	Phase           string `json:"phase"`
	ExternalControl bool   `json:"external-control"`

	// TODO(mjs): I'm not convinced these Source fields will get used.
	SourceAPIAddrs []string `json:"source-api-addrs"`
	SourceCACert   string   `json:"source-ca-cert"`

	TargetAPIAddrs []string `json:"target-api-addrs"`
	TargetCACert   string   `json:"target-ca-cert"`
}

MigrationStatus reports the current status of a model migration.

type MigrationTargetInfo

type MigrationTargetInfo struct {
	ControllerTag string   `json:"controller-tag"`
	Addrs         []string `json:"addrs"`
	CACert        string   `json:"ca-cert"`
	AuthTag       string   `json:"auth-tag"`
	Password      string   `json:"password,omitempty"`
	Macaroons     string   `json:"macaroons,omitempty"`
}

MigrationTargetInfo holds the details required to connect to and authenticate with a remote controller for model migration.

type MinionReport

type MinionReport struct {
	// MigrationId holds the id of the migration the agent is
	// reporting about.
	MigrationId string `json:"migration-id"`

	// Phase holds the phase of the migration the agent is
	// reporting about.
	Phase string `json:"phase"`

	// Success is true if the agent successfully completed its actions
	// for the migration phase, false otherwise.
	Success bool `json:"success"`
}

MinionReport holds the details of whether a migration minion succeeded or failed for a specific migration phase.

type MinionReports

type MinionReports struct {
	// MigrationId holds the id of the migration the reports related to.
	MigrationId string `json:"migration-id"`

	// Phase holds the phase of the migration the reports related to.
	Phase string `json:"phase"`

	// SuccessCount holds the number of agents which have successfully
	// completed a given migration phase.
	SuccessCount int `json:"success-count"`

	// UnknownCount holds the number of agents still to report for a
	// given migration phase.
	UnknownCount int `json:"unknown-count"`

	// UnknownSample holds the tags of a limited number of agents
	// that are still to report for a given migration phase (for
	// logging or showing in a user interface).
	UnknownSample []string `json:"unknown-sample"`

	// Failed contains the tags of all agents which have reported a
	// failed to complete a given migration phase.
	Failed []string `json:"failed"`
}

MinionReports holds the details of whether a migration minion succeeded or failed for a specific migration phase.

type Model

type Model struct {
	Name     string `json:"name"`
	UUID     string `json:"uuid"`
	OwnerTag string `json:"owner-tag"`
}

Model holds the result of an API call returning a name and UUID for a model and the tag of the server in which it is running.

type ModelAction

type ModelAction string

ModelAction is an action that can be performed on a model.

const (
	GrantModelAccess  ModelAction = "grant"
	RevokeModelAccess ModelAction = "revoke"
)

Actions that can be preformed on a model.

type ModelArgs

type ModelArgs struct {
	ModelTag string `json:"model-tag"`
}

ModelArgs wraps a simple model tag.

type ModelBlockInfo

type ModelBlockInfo struct {
	Name     string   `json:"name"`
	UUID     string   `json:"model-uuid"`
	OwnerTag string   `json:"owner-tag"`
	Blocks   []string `json:"blocks"`
}

ModelBlockInfo holds information about an model and its current blocks.

type ModelBlockInfoList

type ModelBlockInfoList struct {
	Models []ModelBlockInfo `json:"models,omitempty"`
}

ModelBlockInfoList holds information about the blocked models for a controller.

type ModelConfig

type ModelConfig map[string]interface{}

ModelConfig holds a model configuration.

type ModelConfigResult

type ModelConfigResult struct {
	Config ModelConfig `json:"config"`
}

ModelConfigResult holds model configuration.

type ModelConfigResults

type ModelConfigResults struct {
	Config map[string]ConfigValue `json:"config"`
}

ModelConfigResults contains the result of client API calls to get model config values.

type ModelCreateArgs

type ModelCreateArgs struct {
	// Name is the name for the new model.
	Name string `json:"name"`

	// OwnerTag represents the user that will own the new model.
	// The OwnerTag must be a valid user tag.  If the user tag represents
	// a local user, that user must exist.
	OwnerTag string `json:"owner-tag"`

	// Config defines the model config, which includes the name of the
	// model. A model UUID is allocated by the API server during the
	// creation of the model.
	Config map[string]interface{} `json:"config,omitempty"`

	// CloudTag is the tag of the cloud to create the model in.
	// If this is empty, the model will be created in the same
	// cloud as the controller model.
	CloudTag string `json:"cloud-tag,omitempty"`

	// CloudRegion is the name of the cloud region to create the
	// model in. If the cloud does not support regions, this must
	// be empty. If this is empty, and CloudTag is empty, the model
	// will be created in the same region as the controller model.
	CloudRegion string `json:"region,omitempty"`

	// CloudCredentialTag is the tag of the cloud credential to use
	// for managing the model's resources. If the cloud does not
	// require credentials, this may be empty. If this is empty,
	// and the owner is the controller owner, the same credential
	// used for the controller model will be used.
	CloudCredentialTag string `json:"credential,omitempty"`
}

ModelCreateArgs holds the arguments that are necessary to create a model.

type ModelDefaultValues

type ModelDefaultValues struct {
	CloudTag    string                 `json:"cloud-tag,omitempty"`
	CloudRegion string                 `json:"cloud-region,omitempty"`
	Config      map[string]interface{} `json:"config"`
}

ModelDefaultValues contains the default model values for a cloud/region.

type ModelDefaults

type ModelDefaults struct {
	Default    interface{}      `json:"default,omitempty"`
	Controller interface{}      `json:"controller,omitempty"`
	Regions    []RegionDefaults `json:"regions,omitempty"`
}

ModelDefaults holds the settings for a given ModelDefaultsResult config attribute.

type ModelDefaultsResult

type ModelDefaultsResult struct {
	Config map[string]ModelDefaults `json:"config"`
}

ModelDefaultsResult contains the result of client API calls to get the model default values.

type ModelInfo

type ModelInfo struct {
	Name               string `json:"name"`
	UUID               string `json:"uuid"`
	ControllerUUID     string `json:"controller-uuid"`
	ProviderType       string `json:"provider-type"`
	DefaultSeries      string `json:"default-series"`
	CloudTag           string `json:"cloud-tag"`
	CloudRegion        string `json:"cloud-region,omitempty"`
	CloudCredentialTag string `json:"cloud-credential-tag,omitempty"`

	// OwnerTag is the tag of the user that owns the model.
	OwnerTag string `json:"owner-tag"`

	// Life is the current lifecycle state of the model.
	Life Life `json:"life"`

	// Status is the current status of the model.
	Status EntityStatus `json:"status"`

	// Users contains information about the users that have access
	// to the model. Owners and administrators can see all users
	// that have access; other users can only see their own details.
	Users []ModelUserInfo `json:"users"`

	// Machines contains information about the machines in the model.
	// This information is available to owners and users with write
	// access or greater.
	Machines []ModelMachineInfo `json:"machines"`
}

ModelInfo holds information about the Juju model.

type ModelInfoList

type ModelInfoList struct {
	Models []ModelInfo `json:"models,omitempty"`
}

ModelInfoList holds a list of ModelInfo structures.

type ModelInfoListResult

type ModelInfoListResult struct {
	Result *ModelInfoList `json:"result,omitempty"`
	Error  *Error         `json:"error,omitempty"`
}

ModelInfoListResult holds the result of a call that returns a list of ModelInfo structures.

type ModelInfoListResults

type ModelInfoListResults struct {
	Results []ModelInfoListResult `json:"results"`
}

ModelInfoListResults holds the result of a bulk call that returns multiple lists of ModelInfo structures.

type ModelInfoResult

type ModelInfoResult struct {
	Result *ModelInfo `json:"result,omitempty"`
	Error  *Error     `json:"error,omitempty"`
}

ModelInfoResult holds the result of a ModelInfo call.

type ModelInfoResults

type ModelInfoResults struct {
	Results []ModelInfoResult `json:"results"`
}

ModelInfoResult holds the result of a bulk ModelInfo call.

type ModelMachineInfo

type ModelMachineInfo struct {
	Id         string           `json:"id"`
	Hardware   *MachineHardware `json:"hardware,omitempty"`
	InstanceId string           `json:"instance-id,omitempty"`
	Status     string           `json:"status,omitempty"`
	HasVote    bool             `json:"has-vote,omitempty"`
	WantsVote  bool             `json:"wants-vote,omitempty"`
}

ModelMachineInfo holds information about a machine in a model.

type ModelResult

type ModelResult struct {
	Error *Error `json:"error,omitempty"`
	Name  string `json:"name"`
	UUID  string `json:"uuid"`
}

ModelResult holds the result of an API call returning a name and UUID for a model.

type ModelSet

type ModelSet struct {
	Config map[string]interface{} `json:"config"`
}

ModelSet contains the arguments for ModelSet client API call.

type ModelStatus

type ModelStatus struct {
	ModelTag           string             `json:"model-tag"`
	Life               Life               `json:"life"`
	HostedMachineCount int                `json:"hosted-machine-count"`
	ApplicationCount   int                `json:"application-count"`
	OwnerTag           string             `json:"owner-tag"`
	Machines           []ModelMachineInfo `json:"machines,omitempty"`
}

ModelStatus holds information about the status of a juju model.

type ModelStatusInfo

type ModelStatusInfo struct {
	Name             string `json:"name"`
	CloudTag         string `json:"cloud-tag"`
	CloudRegion      string `json:"region,omitempty"`
	Version          string `json:"version"`
	AvailableVersion string `json:"available-version"`
	Migration        string `json:"migration,omitempty"`
}

ModelStatusInfo holds status information about the model itself.

type ModelStatusResults

type ModelStatusResults struct {
	Results []ModelStatus `json:"models"`
}

ModelStatusResults holds status information about a group of models.

type ModelUnset

type ModelUnset struct {
	Keys []string `json:"keys"`
}

ModelUnset contains the arguments for ModelUnset client API call.

type ModelUnsetKeys

type ModelUnsetKeys struct {
	CloudTag    string   `json:"cloud-tag,omitempty"`
	CloudRegion string   `json:"cloud-region,omitempty"`
	Keys        []string `json:"keys"`
}

ModelUnsetKeys contains the config keys to unset for a cloud/region.

type ModelUserInfo

type ModelUserInfo struct {
	UserName       string               `json:"user"`
	DisplayName    string               `json:"display-name"`
	LastConnection *time.Time           `json:"last-connection"`
	Access         UserAccessPermission `json:"access"`
}

ModelUserInfo holds information on a user who has access to a model. Owners of a model can see this information for all users who have access, so it should not include sensitive information.

type ModelUserInfoResult

type ModelUserInfoResult struct {
	Result *ModelUserInfo `json:"result,omitempty"`
	Error  *Error         `json:"error,omitempty"`
}

ModelUserInfoResult holds the result of an ModelUserInfo call.

type ModelUserInfoResults

type ModelUserInfoResults struct {
	Results []ModelUserInfoResult `json:"results"`
}

ModelUserInfoResults holds the result of a bulk ModelUserInfo API call.

type ModifyControllerAccess

type ModifyControllerAccess struct {
	UserTag string           `json:"user-tag"`
	Action  ControllerAction `json:"action"`
	Access  string           `json:"access"`
}

type ModifyControllerAccessRequest

type ModifyControllerAccessRequest struct {
	Changes []ModifyControllerAccess `json:"changes"`
}

ModifyControllerAccessRequest holds the parameters for making grant and revoke controller calls.

type ModifyModelAccess

type ModifyModelAccess struct {
	UserTag  string               `json:"user-tag"`
	Action   ModelAction          `json:"action"`
	Access   UserAccessPermission `json:"access"`
	ModelTag string               `json:"model-tag"`
}

type ModifyModelAccessRequest

type ModifyModelAccessRequest struct {
	Changes []ModifyModelAccess `json:"changes"`
}

ModifyModelAccessRequest holds the parameters for making grant and revoke model calls.

type ModifyUserSSHKeys

type ModifyUserSSHKeys struct {
	User string   `json:"user"`
	Keys []string `json:"ssh-keys"`
}

ModifyUserSSHKeys stores parameters used for a KeyManager.Add|Delete|Import call for a user.

type MongoUpgradeResults

type MongoUpgradeResults struct {
	RsMembers []replicaset.Member `json:"rs-members"`
	Master    HAMember            `json:"master"`
	Members   []HAMember          `json:"ha-members"`
}

MongoUpgradeResults holds the results of an attempt to enter upgrade mongo mode.

type MongoVersion

type MongoVersion struct {
	Major         int    `json:"major"`
	Minor         int    `json:"minor"`
	Patch         string `json:"patch"`
	StorageEngine string `json:"engine"`
}

type NetworkConfig

type NetworkConfig struct {
	// DeviceIndex specifies the order in which the network interface
	// appears on the host. The primary interface has an index of 0.
	DeviceIndex int `json:"device-index"`

	// MACAddress is the network interface's hardware MAC address
	// (e.g. "aa:bb:cc:dd:ee:ff").
	MACAddress string `json:"mac-address"`

	// CIDR of the network, in 123.45.67.89/24 format.
	CIDR string `json:"cidr"`

	// MTU is the Maximum Transmission Unit controlling the maximum size of the
	// protocol packats that the interface can pass through. It is only used
	// when > 0.
	MTU int `json:"mtu"`

	// ProviderId is a provider-specific network interface id.
	ProviderId string `json:"provider-id"`

	// ProviderSubnetId is a provider-specific subnet id, to which the
	// interface is attached to.
	ProviderSubnetId string `json:"provider-subnet-id"`

	// ProviderSpaceId is a provider-specific space id, to which the interface
	// is attached to, if known and supported.
	ProviderSpaceId string `json:"provider-space-id"`

	// ProviderAddressId is the provider-specific id of the assigned address, if
	// supported and known.
	ProviderAddressId string `json:"provider-address-id"`

	// ProviderVLANId is the provider-specific id of the assigned address's
	// VLAN, if supported and known.
	ProviderVLANId string `json:"provider-vlan-id"`

	// VLANTag needs to be between 1 and 4094 for VLANs and 0 for
	// normal networks. It's defined by IEEE 802.1Q standard.
	VLANTag int `json:"vlan-tag"`

	// InterfaceName is the raw OS-specific network device name (e.g.
	// "eth1", even for a VLAN eth1.42 virtual interface).
	InterfaceName string `json:"interface-name"`

	// ParentInterfaceName is the name of the parent interface to use, if known.
	ParentInterfaceName string `json:"parent-interface-name"`

	// InterfaceType is the type of the interface.
	InterfaceType string `json:"interface-type"`

	// Disabled is true when the interface needs to be disabled on the
	// machine, e.g. not to configure it at all or stop it if running.
	Disabled bool `json:"disabled"`

	// NoAutoStart is true when the interface should not be configured
	// to start automatically on boot. By default and for
	// backwards-compatibility, interfaces are configured to
	// auto-start.
	NoAutoStart bool `json:"no-auto-start,omitempty"`

	// ConfigType, if set, defines what type of configuration to use.
	// See network.InterfaceConfigType for more info. If not set, for
	// backwards-compatibility, "dhcp" is assumed.
	ConfigType string `json:"config-type,omitempty"`

	// Address contains an optional static IP address to configure for
	// this network interface. The subnet mask to set will be inferred
	// from the CIDR value.
	Address string `json:"address,omitempty"`

	// DNSServers contains an optional list of IP addresses and/or
	// hostnames to configure as DNS servers for this network
	// interface.
	DNSServers []string `json:"dns-servers,omitempty"`

	// DNSServers contains an optional list of IP addresses and/or
	// hostnames to configure as DNS servers for this network
	// interface.
	DNSSearchDomains []string `json:"dns-search-domains,omitempty"`

	// Gateway address, if set, defines the default gateway to
	// configure for this network interface. For containers this
	// usually (one of) the host address(es).
	GatewayAddress string `json:"gateway-address,omitempty"`
}

NetworkConfig describes the necessary information to configure a single network interface on a machine. This mostly duplicates network.InterfaceInfo type and it's defined here so it can be kept separate and stable as definition to ensure proper wire-format for the API.

type NetworkConfigs

type NetworkConfigs struct {
	Results []NetworkConfig `json:"results"`
	Errors  []error         `json:"errors,omitempty"`
}

NetworkConfigs holds the network configuration for multiple networks

type NotifyWatchResult

type NotifyWatchResult struct {
	NotifyWatcherId string
	Error           *Error `json:"error,omitempty"`
}

NotifyWatchResult holds a NotifyWatcher id and an error (if any).

type NotifyWatchResults

type NotifyWatchResults struct {
	Results []NotifyWatchResult `json:"results"`
}

NotifyWatchResults holds the results for any API call which ends up returning a list of NotifyWatchers

type PhaseResult

type PhaseResult struct {
	Phase string `json:"phase,omitempty"`
	Error *Error `json:"error,omitempty"`
}

PhaseResult holds the phase of a single model migration, or an error if the phase could not be determined.

type PhaseResults

type PhaseResults struct {
	Results []PhaseResult `json:"results"`
}

PhasesResults holds the phase of one or more model migrations.

type Port

type Port struct {
	Protocol string `json:"protocol"`
	Number   int    `json:"number"`
}

Port encapsulates a protocol and port number. It is used in API requests/responses. See also network.Port, from/to which this is transformed.

func FromNetworkPort

func FromNetworkPort(p network.Port) Port

FromNetworkPort is a convenience helper to create a parameter out of the network type, here for Port.

func (Port) NetworkPort

func (p Port) NetworkPort() network.Port

NetworkPort is a convenience helper to return the parameter as network type, here for Port.

type PortRange

type PortRange struct {
	FromPort int    `json:"from-port"`
	ToPort   int    `json:"to-port"`
	Protocol string `json:"protocol"`
}

PortRange represents a single range of ports. It is used in API requests/responses. See also network.PortRange, from/to which this is transformed.

func FromNetworkPortRange

func FromNetworkPortRange(pr network.PortRange) PortRange

FromNetworkPortRange is a convenience helper to create a parameter out of the network type, here for PortRange.

func (PortRange) NetworkPortRange

func (pr PortRange) NetworkPortRange() network.PortRange

NetworkPortRange is a convenience helper to return the parameter as network type, here for PortRange.

type PortsResult

type PortsResult struct {
	Error *Error `json:"error,omitempty"`
	Ports []Port `json:"ports"`
}

PortsResult holds the result of an API call that returns a slice of Port or an error.

type PortsResults

type PortsResults struct {
	Results []PortsResult `json:"results"`
}

PortsResults holds the bulk operation result of an API call that returns a slice of Port.

type PrivateAddress

type PrivateAddress struct {
	Target string `json:"target"`
}

PrivateAddress holds parameters for the PrivateAddress call.

type PrivateAddressResults

type PrivateAddressResults struct {
	PrivateAddress string `json:"private-address"`
}

PrivateAddressResults holds results of the PrivateAddress call.

type ProviderInterfaceInfo

type ProviderInterfaceInfo struct {
	InterfaceName string `json:"interface-name"`
	MACAddress    string `json:"mac-address"`
	ProviderId    string `json:"provider-id"`
}

ProviderInterfaceInfo stores the details needed to identify an interface to a provider. It's the params equivalent of network.ProviderInterfaceInfo, defined here separately to ensure that API structures aren't inadvertently changed by internal changes.

type ProviderInterfaceInfoResult

type ProviderInterfaceInfoResult struct {
	MachineTag string                  `json:"machine-tag"`
	Interfaces []ProviderInterfaceInfo `json:"interfaces"`
	Error      *Error                  `json:"error,omitempty"`
}

ProviderInterfaceInfoResult stores the provider interface information for one machine, or any error that occurred getting the information for that machine.

type ProviderInterfaceInfoResults

type ProviderInterfaceInfoResults struct {
	Results []ProviderInterfaceInfoResult `json:"results"`
}

ProviderInterfaceInfoResults holds the results of a GetProviderInterfaceInfo call.

type ProviderSpace

type ProviderSpace struct {
	Name       string   `json:"name"`
	ProviderId string   `json:"provider-id"`
	Subnets    []Subnet `json:"subnets"`
	Error      *Error   `json:"error,omitempty"`
}

ProviderSpace holds the information about a single space and its associated subnets.

type ProvisioningInfo

type ProvisioningInfo struct {
	Constraints      constraints.Value         `json:"constraints"`
	Series           string                    `json:"series"`
	Placement        string                    `json:"placement"`
	Jobs             []multiwatcher.MachineJob `json:"jobs"`
	Volumes          []VolumeParams            `json:"volumes,omitempty"`
	Tags             map[string]string         `json:"tags,omitempty"`
	SubnetsToZones   map[string][]string       `json:"subnets-to-zones,omitempty"`
	ImageMetadata    []CloudImageMetadata      `json:"image-metadata,omitempty"`
	EndpointBindings map[string]string         `json:"endpoint-bindings,omitempty"`
	ControllerConfig map[string]interface{}    `json:"controller-config,omitempty"`
}

ProvisioningInfo holds machine provisioning info.

type ProvisioningInfoResult

type ProvisioningInfoResult struct {
	Error  *Error            `json:"error,omitempty"`
	Result *ProvisioningInfo `json:"result"`
}

ProvisioningInfoResult holds machine provisioning info or an error.

type ProvisioningInfoResults

type ProvisioningInfoResults struct {
	Results []ProvisioningInfoResult `json:"results"`
}

ProvisioningInfoResults holds multiple machine provisioning info results.

type ProvisioningScriptParams

type ProvisioningScriptParams struct {
	MachineId string `json:"machine-id"`
	Nonce     string `json:"nonce"`

	// DataDir may be "", in which case the default will be used.
	DataDir string `json:"data-dir"`

	// DisablePackageCommands may be set to disable all
	// package-related commands. It is then the responsibility of the
	// provisioner to ensure that all the packages required by Juju
	// are available.
	DisablePackageCommands bool `json:"disable-package-commands"`
}

ProvisioningScriptParams contains the parameters for the ProvisioningScript client API call.

type ProvisioningScriptResult

type ProvisioningScriptResult struct {
	Script string `json:"script"`
}

ProvisioningScriptResult contains the result of the ProvisioningScript client API call.

type ProxyConfig

type ProxyConfig struct {
	HTTP    string `json:"http"`
	HTTPS   string `json:"https"`
	FTP     string `json:"ftp"`
	NoProxy string `json:"no-proxy"`
}

type ProxyConfigResult

type ProxyConfigResult struct {
	ProxySettings    ProxyConfig `json:"proxy-settings"`
	APTProxySettings ProxyConfig `json:"apt-proxy-settings"`
	Error            *Error      `json:"error,omitempty"`
}

ProxyConfigResult contains information needed to configure a clients proxy settings

type ProxyConfigResults

type ProxyConfigResults struct {
	Results []ProxyConfigResult `json:"results"`
}

ProxyConfigResults contains information needed to configure multiple clients proxy settings

type PublicAddress

type PublicAddress struct {
	Target string `json:"target"`
}

PublicAddress holds parameters for the PublicAddress call.

type PublicAddressResults

type PublicAddressResults struct {
	PublicAddress string `json:"public-address"`
}

PublicAddressResults holds results of the PublicAddress call.

type ReauthRequest

type ReauthRequest struct {
	Prompt string `json:"prompt"`
	Nonce  string `json:"nonce"`
}

ReauthRequest holds a challenge/response token meaningful to the identity provider.

type RebootAction

type RebootAction string

RebootAction defines the action a machine should take when a hook needs to reboot

const (
	// ShouldDoNothing instructs a machine agent that no action
	// is required on its part
	ShouldDoNothing RebootAction = "noop"
	// ShouldReboot instructs a machine to reboot
	// this happens when a hook running on a machine, requests
	// a reboot
	ShouldReboot RebootAction = "reboot"
	// ShouldShutdown instructs a machine to shut down. This usually
	// happens when running inside a container, and a hook on the parent
	// machine requests a reboot
	ShouldShutdown RebootAction = "shutdown"
)

type RebootActionResult

type RebootActionResult struct {
	Result RebootAction `json:"result,omitempty"`
	Error  *Error       `json:"error,omitempty"`
}

RebootActionResult holds the result of a single call to machine.ShouldRebootOrShutdown.

type RebootActionResults

type RebootActionResults struct {
	Results []RebootActionResult `json:"results,omitempty"`
}

RebootActionResults holds a list of RebootActionResult and any error.

type RedirectInfoResult

type RedirectInfoResult struct {
	// Servers holds an entry for each server that holds the
	// addresses for the server.
	Servers [][]HostPort `json:"servers"`

	// CACert holds the CA certificate for the server.
	// TODO(rogpeppe) allow this to be empty if the
	// server has a globally trusted certificate?
	CACert string `json:"ca-cert"`
}

RedirectInfoResult holds the result of a RedirectInfo call.

type RegionDefaults

type RegionDefaults struct {
	RegionName string      `json:"region-name"`
	Value      interface{} `json:"value"`
}

RegionDefaults contains the settings for regions in a ModelDefaults.

type RelationIds

type RelationIds struct {
	RelationIds []int `json:"relation-ids"`
}

RelationIds holds multiple relation ids.

type RelationResult

type RelationResult struct {
	Error    *Error                `json:"error,omitempty"`
	Life     Life                  `json:"life"`
	Id       int                   `json:"id"`
	Key      string                `json:"key"`
	Endpoint multiwatcher.Endpoint `json:"endpoint"`
}

RelationResult returns information about a single relation, or an error.

type RelationResults

type RelationResults struct {
	Results []RelationResult `json:"results"`
}

RelationResults holds the result of an API call that returns information about multiple relations.

type RelationStatus

type RelationStatus struct {
	Id        int              `json:"id"`
	Key       string           `json:"key"`
	Interface string           `json:"interface"`
	Scope     string           `json:"scope"`
	Endpoints []EndpointStatus `json:"endpoints"`
}

RelationStatus holds status info about a relation.

type RelationUnit

type RelationUnit struct {
	Relation string `json:"relation"`
	Unit     string `json:"unit"`
}

RelationUnit holds a relation and a unit tag.

type RelationUnitPair

type RelationUnitPair struct {
	Relation   string `json:"relation"`
	LocalUnit  string `json:"local-unit"`
	RemoteUnit string `json:"remote-unit"`
}

RelationUnitPair holds a relation tag, a local and remote unit tags.

type RelationUnitPairs

type RelationUnitPairs struct {
	RelationUnitPairs []RelationUnitPair `json:"relation-unit-pairs"`
}

RelationUnitPairs holds the parameters for API calls expecting multiple sets of a relation tag, a local and remote unit tags.

type RelationUnitSettings

type RelationUnitSettings struct {
	Relation string   `json:"relation"`
	Unit     string   `json:"unit"`
	Settings Settings `json:"settings"`
}

RelationUnitSettings holds a relation tag, a unit tag and local unit settings.

type RelationUnits

type RelationUnits struct {
	RelationUnits []RelationUnit `json:"relation-units"`
}

RelationUnits holds the parameters for API calls expecting a pair of relation and unit tags.

type RelationUnitsChange

type RelationUnitsChange struct {

	// Changed holds a set of units that are known to be in scope, and the
	// latest known settings version for each.
	Changed map[string]UnitSettings `json:"changed"`

	// Departed holds a set of units that have previously been reported to
	// be in scope, but which no longer are.
	Departed []string `json:"departed,omitempty"`
}

RelationUnitsChange describes the membership and settings of; or changes to; some relation scope.

type RelationUnitsSettings

type RelationUnitsSettings struct {
	RelationUnits []RelationUnitSettings `json:"relation-units"`
}

RelationUnitsSettings holds the arguments for making a EnterScope or WriteSettings API calls.

type RelationUnitsWatchResult

type RelationUnitsWatchResult struct {
	RelationUnitsWatcherId string              `json:"watcher-id"`
	Changes                RelationUnitsChange `json:"changes"`
	Error                  *Error              `json:"error,omitempty"`
}

RelationUnitsWatchResult holds a RelationUnitsWatcher id, baseline state (in the Changes field), and an error (if any).

type RelationUnitsWatchResults

type RelationUnitsWatchResults struct {
	Results []RelationUnitsWatchResult `json:"results"`
}

RelationUnitsWatchResults holds the results for any API call which ends up returning a list of RelationUnitsWatchers.

type ReleaseLeadershipBulkParams

type ReleaseLeadershipBulkParams struct {
	Params []ReleaseLeadershipParams `json:"params"`
}

ReleaseLeadershipBulkParams is a collection of parameters needed to make a bulk release leadership call.

type ReleaseLeadershipBulkResults

type ReleaseLeadershipBulkResults ErrorResults

ReleaseLeadershipBulkResults is a type which contains results from a bulk leadership call.

type ReleaseLeadershipParams

type ReleaseLeadershipParams struct {

	// ApplicationTag is the application for which you want to make a
	// leadership claim.
	ApplicationTag string `json:"application-tag"`

	// UnitTag is the unit which is making the leadership claim.
	UnitTag string `json:"unit-tag"`
}

ReleaseLeadershipParams are the parameters needed to release a leadership claim.

type RemoveBlocksArgs

type RemoveBlocksArgs struct {
	All bool `json:"all"`
}

RemoveBlocksArgs holds the arguments for the RemoveBlocks command. It is a struct to facilitate the easy addition of being able to remove blocks for individual models at a later date.

type ResolveCharmResult

type ResolveCharmResult struct {
	// URL is a string representation of charm.URL.
	URL   string `json:"url,omitempty"`
	Error string `json:"error,omitempty"`
}

ResolveCharmResult holds the result of resolving a charm reference to a URL, or any error that occurred.

type ResolveCharmResults

type ResolveCharmResults struct {
	URLs []ResolveCharmResult `json:"urls"`
}

ResolveCharmResults holds results of the ResolveCharms call.

type ResolveCharms

type ResolveCharms struct {
	References []string `json:"references"`
}

ResolveCharms stores charm references for a ResolveCharms call.

type Resolved

type Resolved struct {
	UnitName string `json:"unit-name"`
	Retry    bool   `json:"retry"`
}

Resolved holds parameters for the Resolved call.

type ResolvedMode

type ResolvedMode string

ResolvedMode describes the way state transition errors are resolved.

const (
	ResolvedNone       ResolvedMode = ""
	ResolvedRetryHooks ResolvedMode = "retry-hooks"
	ResolvedNoHooks    ResolvedMode = "no-hooks"
)

type ResolvedModeResult

type ResolvedModeResult struct {
	Error *Error       `json:"error,omitempty"`
	Mode  ResolvedMode `json:"mode"`
}

ResolvedModeResult holds a resolved mode or an error.

type ResolvedModeResults

type ResolvedModeResults struct {
	Results []ResolvedModeResult `json:"results"`
}

ResolvedModeResults holds the bulk operation result of an API call that returns a resolved mode or an error.

type ResolvedResults

type ResolvedResults struct {
	Application string                 `json:"application"`
	Charm       string                 `json:"charm"`
	Settings    map[string]interface{} `json:"settings"`
}

ResolvedResults holds results of the Resolved call.

type RestoreArgs

type RestoreArgs struct {
	// BackupId holds the id of the backup in server if any
	BackupId string `json:"backup-id"`
}

RestoreArgs Holds the backup file or id

type ResumeReplicationParams

type ResumeReplicationParams struct {
	Members []replicaset.Member `json:"members"`
}

ResumeReplicationParams holds the members of a HA that must be resumed.

type RetryStrategy

type RetryStrategy struct {
	ShouldRetry     bool          `json:"should-retry"`
	MinRetryTime    time.Duration `json:"min-retry-time"`
	MaxRetryTime    time.Duration `json:"max-retry-time"`
	JitterRetryTime bool          `json:"jitter-retry-time"`
	RetryTimeFactor int64         `json:"retry-time-factor"`
}

RetryStrategy holds the necessary information to configure retries.

type RetryStrategyResult

type RetryStrategyResult struct {
	Error  *Error         `json:"error,omitempty"`
	Result *RetryStrategy `json:"result,omitempty"`
}

RetryStrategyResult holds a RetryStrategy or an error.

type RetryStrategyResults

type RetryStrategyResults struct {
	Results []RetryStrategyResult `json:"results"`
}

RetryStrategyResults holds the bulk operation result of an API call that returns a RetryStrategy or an error.

type RunParams

type RunParams struct {
	Commands     string        `json:"commands"`
	Timeout      time.Duration `json:"timeout"`
	Machines     []string      `json:"machines,omitempty"`
	Applications []string      `json:"applications,omitempty"`
	Units        []string      `json:"units,omitempty"`
}

RunParams is used to provide the parameters to the Run method. Commands and Timeout are expected to have values, and one or more values should be in the Machines, Applications, or Units slices.

type RunResult

type RunResult struct {
	Code   int    `json:"code-id"`
	Stdout []byte `json:"stdout,omitempty"`
	Stderr []byte `json:"stderr,omitempty"`
	// FIXME: should be tags not id strings
	MachineId string `json:"machine-id"`
	UnitId    string `json:"unit-id"`
	Error     string `json:"error"`
}

RunResult contains the result from an individual run call on a machine. UnitId is populated if the command was run inside the unit context.

type RunResults

type RunResults struct {
	Results []RunResult `json:"results"`
}

RunResults is used to return the slice of results. API server side calls need to return single structure values.

type SSHAddressResult

type SSHAddressResult struct {
	Error   *Error `json:"error,omitempty"`
	Address string `json:"address,omitempty"`
}

SSHAddressResult defines a single SSH address result (see SSHAddressResults).

type SSHAddressResults

type SSHAddressResults struct {
	Results []SSHAddressResult `json:"results"`
}

SSHAddressResults defines the response from various APIs on the SSHClient facade.

type SSHHostKeySet

type SSHHostKeySet struct {
	EntityKeys []SSHHostKeys `json:"entity-keys"`
}

SSHHostKeySet defines SSH host keys for one or more entities (typically machines).

type SSHHostKeys

type SSHHostKeys struct {
	Tag        string   `json:"tag"`
	PublicKeys []string `json:"public-keys"`
}

SSHHostKeys defines the SSH host keys for one entity.

type SSHProxyResult

type SSHProxyResult struct {
	UseProxy bool `json:"use-proxy"`
}

SSHProxyResult defines the response from the SSHClient.Proxy API.

type SSHPublicKeysResult

type SSHPublicKeysResult struct {
	Error      *Error   `json:"error,omitempty"`
	PublicKeys []string `json:"public-keys,omitempty"`
}

SSHPublicKeysResult is used to return the SSH public host keys for one SSH target (see SSHPublicKeysResults).

type SSHPublicKeysResults

type SSHPublicKeysResults struct {
	Results []SSHPublicKeysResult `json:"results"`
}

SSHPublicKeysResults is used to return SSH public host keys for one or more target for the SSHClient.PublicKeys API.

type SecretKeyLoginRequest

type SecretKeyLoginRequest struct {
	// User is the tag-representation of the user that the
	// requester wishes to authenticate as.
	User string `json:"user"`

	// Nonce is the nonce used by the client to encrypt
	// and authenticate PayloadCiphertext.
	Nonce []byte `json:"nonce"`

	// PayloadCiphertext is the encrypted and authenticated
	// payload. The payload is encrypted/authenticated using
	// NaCl Secretbox.
	PayloadCiphertext []byte `json:"cipher-text"`
}

SecretKeyLoginRequest contains the parameters for completing the registration of a user. The request contains the tag of the user, and an encrypted and authenticated payload that proves that the requester has a secret key recorded on the controller.

type SecretKeyLoginRequestPayload

type SecretKeyLoginRequestPayload struct {
	// Password is the new password to set for the user.
	Password string `json:"password"`
}

SecretKeyLoginRequestPayload is JSON-encoded and then encrypted and authenticated with the NaCl Secretbox algorithm.

type SecretKeyLoginResponse

type SecretKeyLoginResponse struct {
	// Nonce is the nonce used by the server to encrypt and
	// authenticate PayloadCiphertext.
	Nonce []byte `json:"nonce"`

	// PayloadCiphertext is the encrypted and authenticated
	// payload, which is a JSON-encoded SecretKeyLoginResponsePayload.
	PayloadCiphertext []byte `json:"cipher-text"`
}

SecretKeyLoginResponse contains the result of completing a user registration. This contains an encrypted and authenticated payload, containing the information necessary to securely log into the controller via the standard password authentication method.

type SecretKeyLoginResponsePayload

type SecretKeyLoginResponsePayload struct {
	// CACert is the CA certificate, required to establish a secure
	// TLS connection to the Juju controller
	CACert string `json:"ca-cert"`

	// ControllerUUID is the UUID of the Juju controller.
	ControllerUUID string `json:"controller-uuid"`
}

SecretKeyLoginResponsePayload is JSON-encoded and then encrypted and authenticated with the NaCl Secretbox algorithm.

type SerializedModel

type SerializedModel struct {
	Bytes  []byte                 `json:"bytes"`
	Charms []string               `json:"charms"`
	Tools  []SerializedModelTools `json:"tools"`
}

SerializedModel wraps a buffer contain a serialised Juju model. It also contains lists of the charms and tools used in the model.

type SerializedModelTools

type SerializedModelTools struct {
	Version string `json:"version"`

	// URI holds the URI were a client can download the tools
	// (e.g. "/tools/1.2.3-xenial-amd64"). It will need to prefixed
	// with the API server scheme, address and model prefix before it
	// can be used.
	URI string `json:"uri"`
}

SerializedModelTools holds the version and URI for a given tools version.

type SetAnnotations

type SetAnnotations struct {
	Tag   string            `json:"tag"`
	Pairs map[string]string `json:"annotations"`
}

SetAnnotations stores parameters for making the SetAnnotations call.

type SetConstraints

type SetConstraints struct {
	ApplicationName string            `json:"application"` //optional, if empty, model constraints are set.
	Constraints     constraints.Value `json:"constraints"`
}

SetConstraints stores parameters for making the SetConstraints call.

type SetMachineBlockDevices

type SetMachineBlockDevices struct {
	MachineBlockDevices []MachineBlockDevices `json:"machine-block-devices"`
}

SetMachineBlockDevices holds the arguments for recording the block devices present on a set of machines.

type SetMachineNetworkConfig

type SetMachineNetworkConfig struct {
	Tag    string          `json:"tag"`
	Config []NetworkConfig `json:"config"`
}

SetMachineNetworkConfig holds the parameters for making an API call to update machine network config.

type SetMachinesAddresses

type SetMachinesAddresses struct {
	MachineAddresses []MachineAddresses `json:"machine-addresses"`
}

SetMachinesAddresses holds the parameters for making an API call to update machine addresses.

type SetMigrationPhaseArgs

type SetMigrationPhaseArgs struct {
	Phase string `json:"phase"`
}

SetMigrationPhaseArgs provides a migration phase to the migrationmaster.SetPhase API method.

type SetMigrationStatusMessageArgs

type SetMigrationStatusMessageArgs struct {
	Message string `json:"message"`
}

SetMigrationStatusMessageArgs provides a migration status message to the migrationmaster.SetStatusMessage API method.

type SetModelAgentVersion

type SetModelAgentVersion struct {
	Version version.Number `json:"version"`
}

SetModelAgentVersion contains the arguments for SetModelAgentVersion client API call.

type SetModelDefaults

type SetModelDefaults struct {
	Config []ModelDefaultValues `json:"config"`
}

SetModelDefaults contains the arguments for SetModelDefaults client API call.

type SetStatus

type SetStatus struct {
	Entities []EntityStatusArgs `json:"entities"`
}

SetStatus holds the parameters for making a SetStatus/UpdateStatus call.

type Settings

type Settings map[string]string

Settings holds relation settings names and values.

type SettingsResult

type SettingsResult struct {
	Error    *Error   `json:"error,omitempty"`
	Settings Settings `json:"settings"`
}

SettingsResult holds a relation settings map or an error.

type SettingsResults

type SettingsResults struct {
	Results []SettingsResult `json:"results"`
}

SettingsResults holds the result of an API calls that returns settings for multiple relations.

type SingularClaim

type SingularClaim struct {
	ModelTag      string        `json:"model-tag"`
	ControllerTag string        `json:"controller-tag"`
	Duration      time.Duration `json:"duration"`
}

SingularClaim represents a request for exclusive model administration access on the part of some controller.

type SingularClaims

type SingularClaims struct {
	Claims []SingularClaim `json:"claims"`
}

SingularClaims holds any number of SingularClaim~s.

type Space

type Space struct {
	Name    string   `json:"name"`
	Subnets []Subnet `json:"subnets"`
	Error   *Error   `json:"error,omitempty"`
}

Space holds the information about a single space and its associated subnets.

type SpaceResult

type SpaceResult struct {
	Error *Error `json:"error,omitempty"`
	Tag   string `json:"tag"`
}

SpaceResult holds a single space tag or an error.

type SpaceResults

type SpaceResults struct {
	Results []SpaceResult `json:"results"`
}

SpaceResults holds the bulk operation result of an API call that returns space tags or an errors.

type StateServingInfo

type StateServingInfo struct {
	APIPort   int `json:"api-port"`
	StatePort int `json:"state-port"`
	// The controller cert and corresponding private key.
	Cert       string `json:"cert"`
	PrivateKey string `json:"private-key"`
	// The private key for the CA cert so that a new controller
	// cert can be generated when needed.
	CAPrivateKey string `json:"ca-private-key"`
	// this will be passed as the KeyFile argument to MongoDB
	SharedSecret   string `json:"shared-secret"`
	SystemIdentity string `json:"system-identity"`
}

StateServingInfo holds information needed by a state server.

type StatusHistoryFilter

type StatusHistoryFilter struct {
	Size  int            `json:"size"`
	Date  *time.Time     `json:"date"`
	Delta *time.Duration `json:"delta"`
}

StatusHistoryFilter holds arguments that can be use to filter a status history backlog.

type StatusHistoryPruneArgs

type StatusHistoryPruneArgs struct {
	MaxHistoryTime time.Duration `json:"max-history-time"`
	MaxHistoryMB   int           `json:"max-history-mb"`
}

StatusHistoryPruneArgs holds arguments for status history prunning process.

type StatusHistoryRequest

type StatusHistoryRequest struct {
	Kind   string              `json:"historyKind"`
	Size   int                 `json:"size"`
	Filter StatusHistoryFilter `json:"filter"`
	Tag    string              `json:"tag"`
}

StatusHistoryRequest holds the parameters to filter a status history query.

type StatusHistoryRequests

type StatusHistoryRequests struct {
	Requests []StatusHistoryRequest `json:"requests"`
}

StatusHistoryRequests holds a slice of StatusHistoryArgs

type StatusHistoryResult

type StatusHistoryResult struct {
	History History `json:"history"`
	Error   *Error  `json:"error,omitempty"`
}

StatusHistoryResult holds a slice of statuses.

type StatusHistoryResults

type StatusHistoryResults struct {
	Results []StatusHistoryResult `json:"results"`
}

StatusHistoryResults holds a slice of StatusHistoryResult.

type StatusParams

type StatusParams struct {
	Patterns []string `json:"patterns"`
}

StatusParams holds parameters for the Status call.

type StatusResult

type StatusResult struct {
	Error  *Error                 `json:"error,omitempty"`
	Id     string                 `json:"id"`
	Life   Life                   `json:"life"`
	Status string                 `json:"status"`
	Info   string                 `json:"info"`
	Data   map[string]interface{} `json:"data"`
	Since  *time.Time             `json:"since"`
}

StatusResult holds an entity status, extra information, or an error.

type StatusResults

type StatusResults struct {
	Results []StatusResult `json:"results"`
}

StatusResults holds multiple status results.

type StorageAddParams

type StorageAddParams struct {
	// UnitTag  is unit name.
	UnitTag string `json:"unit"`

	// StorageName is the name of the storage as specified in the charm.
	StorageName string `json:"name"`

	// Constraints are specified storage constraints.
	Constraints StorageConstraints `json:"storage"`
}

StorageAddParams holds storage details to add to a unit dynamically.

type StorageAttachment

type StorageAttachment struct {
	StorageTag string `json:"storage-tag"`
	OwnerTag   string `json:"owner-tag"`
	UnitTag    string `json:"unit-tag"`

	Kind     StorageKind `json:"kind"`
	Location string      `json:"location"`
	Life     Life        `json:"life"`
}

StorageAttachment describes a unit's attached storage instance.

type StorageAttachmentDetails

type StorageAttachmentDetails struct {
	// StorageTag is the tag of the storage instance.
	StorageTag string `json:"storage-tag"`

	// UnitTag is the tag of the unit attached to the storage instance.
	UnitTag string `json:"unit-tag"`

	// MachineTag is the tag of the machine that the attached unit is assigned to.
	MachineTag string `json:"machine-tag"`

	// Location holds location (mount point/device path) of
	// the attached storage.
	Location string `json:"location,omitempty"`
}

StorageAttachmentDetails holds detailed information about a storage attachment.

type StorageAttachmentId

type StorageAttachmentId struct {
	StorageTag string `json:"storage-tag"`
	UnitTag    string `json:"unit-tag"`
}

StorageAttachmentId identifies a storage attachment by the tags of the related unit and storage instance.

type StorageAttachmentIds

type StorageAttachmentIds struct {
	Ids []StorageAttachmentId `json:"ids"`
}

StorageAttachmentIds holds a set of storage attachment identifiers.

type StorageAttachmentIdsResult

type StorageAttachmentIdsResult struct {
	Result StorageAttachmentIds `json:"result"`
	Error  *Error               `json:"error,omitempty"`
}

StorageAttachmentIdsResult holds the result of an API call to retrieve the IDs of a unit's attached storage instances.

type StorageAttachmentIdsResults

type StorageAttachmentIdsResults struct {
	Results []StorageAttachmentIdsResult `json:"results,omitempty"`
}

StorageAttachmentIdsResult holds the result of an API call to retrieve the IDs of multiple units attached storage instances.

type StorageAttachmentResult

type StorageAttachmentResult struct {
	Result StorageAttachment `json:"result"`
	Error  *Error            `json:"error,omitempty"`
}

StorageAttachmentResult holds the result of an API call to retrieve details of a storage attachment.

type StorageAttachmentResults

type StorageAttachmentResults struct {
	Results []StorageAttachmentResult `json:"results,omitempty"`
}

StorageAttachmentResults holds the result of an API call to retrieve details of multiple storage attachments.

type StorageAttachmentsResult

type StorageAttachmentsResult struct {
	Result []StorageAttachment `json:"result"`
	Error  *Error              `json:"error,omitempty"`
}

StorageAttachmentsResult holds the result of an API call to retrieve details of a unit's attached storage instances.

type StorageAttachmentsResults

type StorageAttachmentsResults struct {
	Results []StorageAttachmentsResult `json:"results,omitempty"`
}

StorageAttachmentsResults holds the result of an API call to retrieve details of multiple units' attached storage instances.

type StorageConstraints

type StorageConstraints struct {
	// Pool is the name of the storage pool from which to provision the
	// storage instance.
	Pool string `json:"pool,omitempty"`

	// Size is the required size of the storage instance, in MiB.
	Size *uint64 `json:"size,omitempty"`

	// Count is the required number of storage instances.
	Count *uint64 `json:"count,omitempty"`
}

StorageConstraints contains constraints for storage instance.

type StorageDetails

type StorageDetails struct {
	// StorageTag holds tag for this storage.
	StorageTag string `json:"storage-tag"`

	// OwnerTag holds tag for the owner of this storage, unit or application.
	OwnerTag string `json:"owner-tag"`

	// Kind holds what kind of storage this instance is.
	Kind StorageKind `json:"kind"`

	// Status contains the status of the storage instance.
	Status EntityStatus `json:"status"`

	// Persistent reports whether or not the underlying volume or
	// filesystem is persistent; i.e. whether or not it outlives
	// the machine that it is attached to.
	Persistent bool `json:"persistent"`

	// Attachments contains a mapping from unit tag to
	// storage attachment details.
	Attachments map[string]StorageAttachmentDetails `json:"attachments,omitempty"`
}

StorageDetails holds information about storage.

type StorageDetailsListResult

type StorageDetailsListResult struct {
	Result []StorageDetails `json:"result,omitempty"`
	Error  *Error           `json:"error,omitempty"`
}

StorageDetailsListResult holds a collection of storage details.

type StorageDetailsListResults

type StorageDetailsListResults struct {
	Results []StorageDetailsListResult `json:"results,omitempty"`
}

StorageDetailsListResults holds a collection of collections of storage details.

type StorageDetailsResult

type StorageDetailsResult struct {
	Result *StorageDetails `json:"result,omitempty"`
	Error  *Error          `json:"error,omitempty"`
}

StorageDetailsResult holds information about a storage instance or error related to its retrieval.

type StorageDetailsResults

type StorageDetailsResults struct {
	Results []StorageDetailsResult `json:"results,omitempty"`
}

StorageDetailsResults holds results for storage details or related storage error.

type StorageFilter

type StorageFilter struct {
}

StorageFilter holds filter terms for listing storage details.

type StorageFilters

type StorageFilters struct {
	Filters []StorageFilter `json:"filters,omitempty"`
}

StorageFilters holds a set of storage filters.

type StorageInstance

type StorageInstance struct {
	StorageTag string      `json:"storage-tag"`
	OwnerTag   string      `json:"owner-tag"`
	Kind       StorageKind `json:"kind"`
}

StorageInstance describes a storage instance.

type StorageInstanceResult

type StorageInstanceResult struct {
	Result StorageInstance `json:"result"`
	Error  *Error          `json:"error,omitempty"`
}

StorageInstanceResult holds the result of an API call to retrieve details of a storage instance.

type StorageInstanceResults

type StorageInstanceResults struct {
	Results []StorageInstanceResult `json:"results,omitempty"`
}

StorageInstanceResults holds the result of an API call to retrieve details of multiple storage instances.

type StorageKind

type StorageKind int

StorageKind is the kind of a storage instance.

const (
	StorageKindUnknown StorageKind = iota
	StorageKindBlock
	StorageKindFilesystem
)

func (*StorageKind) String

func (k *StorageKind) String() string

String returns representation of StorageKind for readability.

type StoragePool

type StoragePool struct {
	// Name is the pool's name.
	Name string `json:"name"`

	// Provider is the type of storage provider this pool represents, eg "loop", "ebs".
	Provider string `json:"provider"`

	// Attrs are the pool's configuration attributes.
	Attrs map[string]interface{} `json:"attrs"`
}

StoragePool holds data for a pool instance.

type StoragePoolFilter

type StoragePoolFilter struct {
	// Names are pool's names to filter on.
	Names []string `json:"names,omitempty"`

	// Providers are pool's storage provider types to filter on.
	Providers []string `json:"providers,omitempty"`
}

StoragePoolFilter holds a filter for matching storage pools.

type StoragePoolFilters

type StoragePoolFilters struct {
	Filters []StoragePoolFilter `json:"filters,omitempty"`
}

StoragePoolFilters holds a collection of storage pool filters.

type StoragePoolsResult

type StoragePoolsResult struct {
	Result []StoragePool `json:"storage-pools,omitempty"`
	Error  *Error        `json:"error,omitempty"`
}

StoragePoolsResult holds a collection of storage pools.

type StoragePoolsResults

type StoragePoolsResults struct {
	Results []StoragePoolsResult `json:"results,omitempty"`
}

StoragePoolsResults holds a collection of storage pools results.

type StoragesAddParams

type StoragesAddParams struct {
	Storages []StorageAddParams `json:"storages"`
}

StoragesAddParams holds storage details to add to units dynamically.

type StringBoolResult

type StringBoolResult struct {
	Error  *Error `json:"error,omitempty"`
	Result string `json:"result"`
	Ok     bool   `json:"ok"`
}

StringBoolResult holds the result of an API call that returns a string and a boolean.

type StringBoolResults

type StringBoolResults struct {
	Results []StringBoolResult `json:"results"`
}

StringBoolResults holds multiple results with a string and a bool each.

type StringResult

type StringResult struct {
	Error  *Error `json:"error,omitempty"`
	Result string `json:"result"`
}

StringResult holds a string or an error.

type StringResults

type StringResults struct {
	Results []StringResult `json:"results"`
}

StringResults holds the bulk operation result of an API call that returns a string or an error.

type StringsResult

type StringsResult struct {
	Error  *Error   `json:"error,omitempty"`
	Result []string `json:"result,omitempty"`
}

StringsResult holds the result of an API call that returns a slice of strings or an error.

type StringsResults

type StringsResults struct {
	Results []StringsResult `json:"results"`
}

StringsResults holds the bulk operation result of an API call that returns a slice of strings or an error.

type StringsWatchResult

type StringsWatchResult struct {
	StringsWatcherId string   `json:"watcher-id"`
	Changes          []string `json:"changes,omitempty"`
	Error            *Error   `json:"error,omitempty"`
}

StringsWatchResult holds a StringsWatcher id, changes and an error (if any).

type StringsWatchResults

type StringsWatchResults struct {
	Results []StringsWatchResult `json:"results"`
}

StringsWatchResults holds the results for any API call which ends up returning a list of StringsWatchers.

type Subnet

type Subnet struct {
	// CIDR of the subnet in IPv4 or IPv6 notation.
	CIDR string `json:"cidr"`

	// ProviderId is the provider-specific subnet ID (if applicable).
	ProviderId string `json:"provider-id,omitempty"`

	// VLANTag needs to be between 1 and 4094 for VLANs and 0 for
	// normal networks. It's defined by IEEE 802.1Q standard.
	VLANTag int `json:"vlan-tag"`

	// Life is the subnet's life cycle value - Alive means the subnet
	// is in use by one or more machines, Dying or Dead means the
	// subnet is about to be removed.
	Life Life `json:"life"`

	// SpaceTag is the Juju network space this subnet is associated
	// with.
	SpaceTag string `json:"space-tag"`

	// Zones contain one or more availability zones this subnet is
	// associated with.
	Zones []string `json:"zones"`

	// Status returns the status of the subnet, whether it is in use, not
	// in use or terminating.
	Status string `json:"status,omitempty"`
}

Subnet describes a single subnet within a network.

type SubnetsFilters

type SubnetsFilters struct {
	SpaceTag string `json:"space-tag,omitempty"`
	Zone     string `json:"zone,omitempty"`
}

SubnetsFilters holds an optional SpaceTag and Zone for filtering the subnets returned by a ListSubnets call.

type ToolsResult

type ToolsResult struct {
	ToolsList                      tools.List `json:"tools"`
	DisableSSLHostnameVerification bool       `json:"disable-ssl-hostname-verification"`
	Error                          *Error     `json:"error,omitempty"`
}

ToolsResult holds the tools and possibly error for a given Tools() API call.

type ToolsResults

type ToolsResults struct {
	Results []ToolsResult `json:"results"`
}

ToolsResults is a list of tools for various requested agents.

type UndertakerModelInfo

type UndertakerModelInfo struct {
	UUID       string `json:"uuid"`
	Name       string `json:"name"`
	GlobalName string `json:"global-name"`
	IsSystem   bool   `json:"is-system"`
	Life       Life   `json:"life"`
}

UndertakerModelInfo returns information on an model needed by the undertaker worker.

type UndertakerModelInfoResult

type UndertakerModelInfoResult struct {
	Error  *Error              `json:"error,omitempty"`
	Result UndertakerModelInfo `json:"result"`
}

UndertakerModelInfoResult holds the result of an API call that returns an UndertakerModelInfoResult or an error.

type UnitNetworkConfig

type UnitNetworkConfig struct {
	UnitTag     string `json:"unit-tag"`
	BindingName string `json:"binding-name"`
}

UnitNetworkConfig holds a unit tag and an endpoint binding name.

type UnitNetworkConfigResult

type UnitNetworkConfigResult struct {
	Error *Error `json:"error,omitempty"`

	// Tagged to Info due to compatibility reasons.
	Config []NetworkConfig `json:"info"`
}

UnitNetworkConfigResult holds network configuration for a single unit.

type UnitNetworkConfigResults

type UnitNetworkConfigResults struct {
	Results []UnitNetworkConfigResult `json:"results"`
}

UnitNetworkConfigResults holds network configuration for multiple machines.

type UnitSettings

type UnitSettings struct {
	Version int64 `json:"version"`
}

UnitSettings specifies the version of some unit's settings in some relation.

type UnitStatus

type UnitStatus struct {
	// AgentStatus holds the status for a unit's agent.
	AgentStatus DetailedStatus `json:"agent-status"`

	// WorkloadStatus holds the status for a unit's workload
	WorkloadStatus  DetailedStatus `json:"workload-status"`
	WorkloadVersion string         `json:"workload-version"`

	Machine       string                `json:"machine"`
	OpenedPorts   []string              `json:"opened-ports"`
	PublicAddress string                `json:"public-address"`
	Charm         string                `json:"charm"`
	Subordinates  map[string]UnitStatus `json:"subordinates"`
	Leader        bool                  `json:"leader,omitempty"`
}

UnitStatus holds status info about a unit.

type UnitsNetworkConfig

type UnitsNetworkConfig struct {
	Args []UnitNetworkConfig `json:"args"`
}

UnitsNetworkConfig holds the parameters for calling Uniter.NetworkConfig() API.

type UnsetModelDefaults

type UnsetModelDefaults struct {
	Keys []ModelUnsetKeys `json:"keys"`
}

UnsetModelDefaults contains the arguments for UnsetModelDefaults client API call.

type UpdateBehavior

type UpdateBehavior struct {
	EnableOSRefreshUpdate bool `json:"enable-os-refresh-update"`
	EnableOSUpgrade       bool `json:"enable-os-upgrade"`
}

UpdateBehavior contains settings that are duplicated in several places. Let's just embed this instead.

type UpdateCloudCredential

type UpdateCloudCredential struct {
	Tag        string          `json:"tag"`
	Credential CloudCredential `json:"credential"`
}

UpdateCloudCredential contains a cloud credential and its tag, for updating in state.

type UpdateCloudCredentials

type UpdateCloudCredentials struct {
	Credentials []UpdateCloudCredential `json:"credentials,omitempty"`
}

UpdateCloudCredentials contains a set of tagged cloud credentials.

type UpgradeMongoParams

type UpgradeMongoParams struct {
	Target MongoVersion `json:"target"`
}

UpgradeMongoParams holds the arguments required to enter upgrade mongo mode.

type UserAccess

type UserAccess struct {
	UserTag string `json:"user-tag"`
	Access  string `json:"access"`
}

UserAccess holds the level of access a user has on a controller or model.

type UserAccessPermission

type UserAccessPermission string

UserAccessPermission is the type of permission that a user has to access a model.

const (
	ModelAdminAccess UserAccessPermission = "admin"
	ModelReadAccess  UserAccessPermission = "read"
	ModelWriteAccess UserAccessPermission = "write"
)

Model access permissions that may be set on a user.

type UserAccessResult

type UserAccessResult struct {
	Result *UserAccess `json:"result,omitempty"`
	Error  *Error      `json:"error,omitempty"`
}

UserAccessResult holds an access level for a user, or an error.

type UserAccessResults

type UserAccessResults struct {
	Results []UserAccessResult `json:"results,omitempty"`
}

UserAccessResults holds the results of an api call to look up access for users.

type UserCloud

type UserCloud struct {
	UserTag  string `json:"user-tag"`
	CloudTag string `json:"cloud-tag"`
}

UserCloud contains a user/cloud tag pair, typically used for identifying a user's credentials for a cloud.

type UserClouds

type UserClouds struct {
	UserClouds []UserCloud `json:"user-clouds,omitempty"`
}

UserClouds contains a set of UserClouds.

type UserInfo

type UserInfo struct {
	Username       string     `json:"username"`
	DisplayName    string     `json:"display-name"`
	Access         string     `json:"access"`
	CreatedBy      string     `json:"created-by"`
	DateCreated    time.Time  `json:"date-created"`
	LastConnection *time.Time `json:"last-connection,omitempty"`
	Disabled       bool       `json:"disabled"`
}

UserInfo holds information on a user.

type UserInfoRequest

type UserInfoRequest struct {
	Entities        []Entity `json:"entities"`
	IncludeDisabled bool     `json:"include-disabled"`
}

UserInfoRequest defines the users to return. An empty Entities list indicates that all matching users should be returned.

type UserInfoResult

type UserInfoResult struct {
	Result *UserInfo `json:"result,omitempty"`
	Error  *Error    `json:"error,omitempty"`
}

UserInfoResult holds the result of a UserInfo call.

type UserInfoResults

type UserInfoResults struct {
	Results []UserInfoResult `json:"results"`
}

UserInfoResults holds the result of a bulk UserInfo API call.

type UserModel

type UserModel struct {
	Model          `json:"model"`
	LastConnection *time.Time `json:"last-connection"`
}

UserModel holds information about a model and the last time the model was accessed for a particular user.

type UserModelList

type UserModelList struct {
	UserModels []UserModel `json:"user-models"`
}

UserModelList holds information about a list of models for a particular user.

type Version

type Version struct {
	Version version.Binary `json:"version"`
}

Version holds a specific binary version.

type VersionResult

type VersionResult struct {
	Version *version.Number `json:"version,omitempty"`
	Error   *Error          `json:"error,omitempty"`
}

VersionResult holds the version and possibly error for a given DesiredVersion() API call.

type VersionResults

type VersionResults struct {
	Results []VersionResult `json:"results"`
}

VersionResults is a list of versions for the requested entities.

type Volume

type Volume struct {
	VolumeTag string     `json:"volume-tag"`
	Info      VolumeInfo `json:"info"`
}

Volume identifies and describes a storage volume in the model.

type VolumeAttachment

type VolumeAttachment struct {
	VolumeTag  string               `json:"volume-tag"`
	MachineTag string               `json:"machine-tag"`
	Info       VolumeAttachmentInfo `json:"info"`
}

VolumeAttachment identifies and describes a volume attachment.

type VolumeAttachmentInfo

type VolumeAttachmentInfo struct {
	DeviceName string `json:"device-name,omitempty"`
	DeviceLink string `json:"device-link,omitempty"`
	BusAddress string `json:"bus-address,omitempty"`
	ReadOnly   bool   `json:"read-only,omitempty"`
}

VolumeAttachmentInfo describes a volume attachment.

type VolumeAttachmentParams

type VolumeAttachmentParams struct {
	VolumeTag  string `json:"volume-tag"`
	MachineTag string `json:"machine-tag"`
	VolumeId   string `json:"volume-id,omitempty"`
	InstanceId string `json:"instance-id,omitempty"`
	Provider   string `json:"provider"`
	ReadOnly   bool   `json:"read-only,omitempty"`
}

VolumeAttachmentParams holds the parameters for creating a volume attachment.

type VolumeAttachmentParamsResult

type VolumeAttachmentParamsResult struct {
	Result VolumeAttachmentParams `json:"result"`
	Error  *Error                 `json:"error,omitempty"`
}

VolumeAttachmentParamsResults holds provisioning parameters for a volume attachment.

type VolumeAttachmentParamsResults

type VolumeAttachmentParamsResults struct {
	Results []VolumeAttachmentParamsResult `json:"results,omitempty"`
}

VolumeAttachmentParamsResults holds provisioning parameters for multiple volume attachments.

type VolumeAttachmentResult

type VolumeAttachmentResult struct {
	Result VolumeAttachment `json:"result"`
	Error  *Error           `json:"error,omitempty"`
}

VolumeAttachmentResult holds the details of a single volume attachment, or an error.

type VolumeAttachmentResults

type VolumeAttachmentResults struct {
	Results []VolumeAttachmentResult `json:"results,omitempty"`
}

VolumeAttachmentResults holds a set of VolumeAttachmentResults.

type VolumeAttachments

type VolumeAttachments struct {
	VolumeAttachments []VolumeAttachment `json:"volume-attachments"`
}

VolumeAttachments describes a set of storage volume attachments.

type VolumeAttachmentsResult

type VolumeAttachmentsResult struct {
	Attachments []VolumeAttachment `json:"attachments,omitempty"`
	Error       *Error             `json:"error,omitempty"`
}

VolumeAttachmentsResult holds the volume attachments for a single machine, or an error.

type VolumeAttachmentsResults

type VolumeAttachmentsResults struct {
	Results []VolumeAttachmentsResult `json:"results,omitempty"`
}

VolumeAttachmentsResults holds a set of VolumeAttachmentsResults for a set of machines.

type VolumeDetails

type VolumeDetails struct {
	// VolumeTag is the tag for the volume.
	VolumeTag string `json:"volume-tag"`

	// Info contains information about the volume.
	Info VolumeInfo `json:"info"`

	// Status contains the status of the volume.
	Status EntityStatus `json:"status"`

	// MachineAttachments contains a mapping from
	// machine tag to volume attachment information.
	MachineAttachments map[string]VolumeAttachmentInfo `json:"machine-attachments,omitempty"`

	// Storage contains details about the storage instance
	// that the volume is assigned to, if any.
	Storage *StorageDetails `json:"storage,omitempty"`
}

VolumeDetails describes a storage volume in the model for the purpose of volume CLI commands.

This is kept separate from Volume which contains only information specific to the volume model, whereas VolumeDetails is intended to contain complete information about a volume and related information (status, attachments, storage).

type VolumeDetailsListResult

type VolumeDetailsListResult struct {
	Result []VolumeDetails `json:"result,omitempty"`
	Error  *Error          `json:"error,omitempty"`
}

VolumeDetailsListResult holds a collection of volume details.

type VolumeDetailsListResults

type VolumeDetailsListResults struct {
	Results []VolumeDetailsListResult `json:"results,omitempty"`
}

VolumeDetailsListResults holds a collection of collections of volume details.

type VolumeDetailsResult

type VolumeDetailsResult struct {
	// Result describes the volume in detail.
	Result *VolumeDetails `json:"details,omitempty"`

	// Error contains volume retrieval error.
	Error *Error `json:"error,omitempty"`
}

VolumeDetailsResult contains details about a volume, its attachments or an error preventing retrieving those details.

type VolumeDetailsResults

type VolumeDetailsResults struct {
	Results []VolumeDetailsResult `json:"results,omitempty"`
}

VolumeDetailsResults holds volume details.

type VolumeFilter

type VolumeFilter struct {
	// Machines are machine tags to filter on.
	Machines []string `json:"machines,omitempty"`
}

VolumeFilter holds a filter for volume list API call.

func (*VolumeFilter) IsEmpty

func (f *VolumeFilter) IsEmpty() bool

IsEmpty determines if filter is empty

type VolumeFilters

type VolumeFilters struct {
	Filters []VolumeFilter `json:"filters,omitempty"`
}

VolumeFilters holds a collection of volume filters.

type VolumeInfo

type VolumeInfo struct {
	VolumeId   string `json:"volume-id"`
	HardwareId string `json:"hardware-id,omitempty"`
	// Size is the size of the volume in MiB.
	Size       uint64 `json:"size"`
	Persistent bool   `json:"persistent"`
}

Volume describes a storage volume in the model.

type VolumeParams

type VolumeParams struct {
	VolumeTag  string                  `json:"volume-tag"`
	Size       uint64                  `json:"size"`
	Provider   string                  `json:"provider"`
	Attributes map[string]interface{}  `json:"attributes,omitempty"`
	Tags       map[string]string       `json:"tags,omitempty"`
	Attachment *VolumeAttachmentParams `json:"attachment,omitempty"`
}

VolumeParams holds the parameters for creating a storage volume.

type VolumeParamsResult

type VolumeParamsResult struct {
	Result VolumeParams `json:"result"`
	Error  *Error       `json:"error,omitempty"`
}

VolumeParamsResults holds provisioning parameters for a volume.

type VolumeParamsResults

type VolumeParamsResults struct {
	Results []VolumeParamsResult `json:"results,omitempty"`
}

VolumeParamsResults holds provisioning parameters for multiple volumes.

type VolumeResult

type VolumeResult struct {
	Result Volume `json:"result"`
	Error  *Error `json:"error,omitempty"`
}

VolumeResult holds information about a volume.

type VolumeResults

type VolumeResults struct {
	Results []VolumeResult `json:"results,omitempty"`
}

VolumeResults holds information about multiple volumes.

type Volumes

type Volumes struct {
	Volumes []Volume `json:"volumes"`
}

Volumes describes a set of storage volumes in the model.

type WatchContainer

type WatchContainer struct {
	MachineTag    string `json:"machine-tag"`
	ContainerType string `json:"container-type"`
}

WatchContainer identifies a single container type within a machine.

type WatchContainers

type WatchContainers struct {
	Params []WatchContainer `json:"params"`
}

WatchContainers holds the arguments for making a WatchContainers API call.

type ZoneResult

type ZoneResult struct {
	Error     *Error `json:"error,omitempty"`
	Name      string `json:"name"`
	Available bool   `json:"available"`
}

ZoneResult holds the result of an API call that returns an availability zone name and whether it's available for use.

type ZoneResults

type ZoneResults struct {
	Results []ZoneResult `json:"results"`
}

ZoneResults holds multiple ZoneResult results

Jump to

Keyboard shortcuts

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