juju: github.com/juju/juju/apiserver/params Index | Files

package params

import "github.com/juju/juju/apiserver/params"

Index

Package Files

actions.go annotations.go apierror.go applications.go backups.go block.go charms.go cloud.go constants.go controller.go crossmodel.go firewall.go http.go image_metadata.go instance_information.go internal.go kubernetes.go leadership.go logfwd.go logstream.go metrics.go migration.go model.go network.go params.go payloads.go payloads_unit.go registration.go resources.go resources_unit.go retrystrategy.go ssh.go status.go storage.go undertaker.go usermanager.go

Constants

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"
)
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"
    CodeHasPersistentStorage      = "controller/model has persistent storage"
    CodeModelNotEmpty             = "model not empty"
    CodeMachineHasAttachedStorage = "machine has attached storage"
    CodeStorageAttached           = "storage is attached"
    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"
    CodeMigrationInProgress       = "model migration 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"
    CodeIncompatibleSeries        = "incompatible series"
    CodeCloudRegionRequired       = "cloud region required"
    CodeIncompatibleClouds        = "incompatible clouds"
)

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

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"
)
const MachineNonceHeader = "X-Juju-Nonce"
const MigrationModelHTTPHeader = "X-Juju-Migration-Model-UUID"

MigrationModelHTTPHeader is the key for the HTTP header value that is used to specify the model UUID for the model being migrated for the uploading of the binaries for that model.

Variables

var MigrationInProgressError = errors.New(CodeMigrationInProgress)

MigrationInProgressError signifies a migration is in progress.

var UpgradeInProgressError = errors.New(CodeUpgradeInProgress)

UpgradeInProgressError signifies an upgrade is in progress.

func EncodeChecksum Uses

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 Uses

func ErrCode(err error) string

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

func FromProviderHostsPorts Uses

func FromProviderHostsPorts(nhpm []network.ProviderHostPorts) [][]HostPort

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

func IsBadRequest Uses

func IsBadRequest(err error) bool

func IsCodeActionNotAvailable Uses

func IsCodeActionNotAvailable(err error) bool

func IsCodeAlreadyExists Uses

func IsCodeAlreadyExists(err error) bool

func IsCodeCannotEnterScope Uses

func IsCodeCannotEnterScope(err error) bool

func IsCodeCannotEnterScopeYet Uses

func IsCodeCannotEnterScopeYet(err error) bool

func IsCodeCloudRegionRequired Uses

func IsCodeCloudRegionRequired(err error) bool

func IsCodeDead Uses

func IsCodeDead(err error) bool

func IsCodeExcessiveContention Uses

func IsCodeExcessiveContention(err error) bool

func IsCodeForbidden Uses

func IsCodeForbidden(err error) bool

func IsCodeHasAssignedUnits Uses

func IsCodeHasAssignedUnits(err error) bool

func IsCodeHasHostedModels Uses

func IsCodeHasHostedModels(err error) bool

func IsCodeHasPersistentStorage Uses

func IsCodeHasPersistentStorage(err error) bool

func IsCodeIncompatibleSeries Uses

func IsCodeIncompatibleSeries(err error) bool

func IsCodeLeadershipClaimDenied Uses

func IsCodeLeadershipClaimDenied(err error) bool

func IsCodeLeaseClaimDenied Uses

func IsCodeLeaseClaimDenied(err error) bool

func IsCodeLoginExpired Uses

func IsCodeLoginExpired(err error) bool

func IsCodeMachineHasAttachedStorage Uses

func IsCodeMachineHasAttachedStorage(err error) bool

func IsCodeModelNotEmpty Uses

func IsCodeModelNotEmpty(err error) bool

func IsCodeModelNotFound Uses

func IsCodeModelNotFound(err error) bool

func IsCodeNoAddressSet Uses

func IsCodeNoAddressSet(err error) bool

func IsCodeNoCreds Uses

func IsCodeNoCreds(err error) bool

func IsCodeNotAssigned Uses

func IsCodeNotAssigned(err error) bool

func IsCodeNotFound Uses

func IsCodeNotFound(err error) bool

func IsCodeNotFoundOrCodeUnauthorized Uses

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 Uses

func IsCodeNotImplemented(err error) bool

func IsCodeNotProvisioned Uses

func IsCodeNotProvisioned(err error) bool

func IsCodeNotSupported Uses

func IsCodeNotSupported(err error) bool

func IsCodeOperationBlocked Uses

func IsCodeOperationBlocked(err error) bool

func IsCodeStopped Uses

func IsCodeStopped(err error) bool

func IsCodeStorageAttached Uses

func IsCodeStorageAttached(err error) bool

func IsCodeTryAgain Uses

func IsCodeTryAgain(err error) bool

func IsCodeUnauthorized Uses

func IsCodeUnauthorized(err error) bool

func IsCodeUnitHasSubordinates Uses

func IsCodeUnitHasSubordinates(err error) bool

func IsCodeUpgradeInProgress Uses

func IsCodeUpgradeInProgress(err error) bool

func IsCodeUserNotFound Uses

func IsCodeUserNotFound(err error) bool

func IsMethodNotAllowed Uses

func IsMethodNotAllowed(err error) bool

func IsRedirect Uses

func IsRedirect(err error) bool

func ToMachineHostPorts Uses

func ToMachineHostPorts(hps []HostPort) network.MachineHostPorts

ToMachineHostPorts transforms multiple Addresses into a MachineHostPort collection.

func ToMachineHostsPorts Uses

func ToMachineHostsPorts(hpm [][]HostPort) []network.MachineHostPorts

ToMachineHostsPorts transforms slices of HostPort grouped by server into a slice of MachineHostPorts collections.

func ToProviderAddresses Uses

func ToProviderAddresses(addrs ...Address) network.ProviderAddresses

ToProviderAddresses transforms multiple Addresses into a ProviderAddresses collection.

func ToProviderHostPorts Uses

func ToProviderHostPorts(hps []HostPort) network.ProviderHostPorts

ToProviderHostPorts transforms multiple Addresses into a ProviderHostPorts collection.

func ToProviderHostsPorts Uses

func ToProviderHostsPorts(hpm [][]HostPort) []network.ProviderHostPorts

ToProviderHostsPorts transforms slices of HostPort grouped by server into a slice of ProviderHostPort collections.

type APIHostPortsResult Uses

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) MachineHostsPorts Uses

func (r APIHostPortsResult) MachineHostsPorts() []network.MachineHostPorts

MachineHostPorts transforms the APIHostPortsResult into a slice of MachineHostPorts.

type Action Uses

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 Uses

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 Uses

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

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

type ActionMessage Uses

type ActionMessage struct {
    Timestamp time.Time `json:"timestamp"`
    Message   string    `json:"message"`
}

ActionMessage represents a logged message on an action.

type ActionMessageParams Uses

type ActionMessageParams struct {
    Messages []EntityString `json:"messages"`
}

ActionMessageParams holds the arguments for logging progress messages for some actions.

type ActionPruneArgs Uses

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

type ActionResult Uses

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"`
    Log       []ActionMessage        `json:"log,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 Uses

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

ActionResults is a slice of ActionResult for bulk requests.

type ActionSpec Uses

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 Uses

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

Actions is a slice of Action for bulk requests.

type ActionsByName Uses

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 Uses

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

ActionsByNames wrap a slice of Actions for API calls.

type ActionsByReceiver Uses

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 parameters or as results.

type ActionsByReceivers Uses

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

ActionsByReceivers wrap a slice of Actions for API calls.

type ActionsQueryResult Uses

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 Uses

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

ActionsQueryResults holds a slice of responses from the Actions query.

type AddApplicationOffer Uses

type AddApplicationOffer struct {
    ModelTag               string            `json:"model-tag"`
    OfferName              string            `json:"offer-name"`
    ApplicationName        string            `json:"application-name"`
    ApplicationDescription string            `json:"application-description"`
    Endpoints              map[string]string `json:"endpoints"`
}

AddApplicationOffer values are used to create an application offer.

type AddApplicationOffers Uses

type AddApplicationOffers struct {
    Offers []AddApplicationOffer
}

AddApplicationOffers is used when adding offers to a application directory.

type AddApplicationUnits Uses

type AddApplicationUnits struct {
    ApplicationName string                `json:"application"`
    NumUnits        int                   `json:"num-units"`
    Placement       []*instance.Placement `json:"placement"`
    Policy          string                `json:"policy,omitempty"`
    AttachStorage   []string              `json:"attach-storage,omitempty"`
}

AddApplicationUnits holds parameters for the AddUnits call.

type AddApplicationUnitsResults Uses

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

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

type AddApplicationUnitsV5 Uses

type AddApplicationUnitsV5 struct {
    ApplicationName string                `json:"application"`
    NumUnits        int                   `json:"num-units"`
    Placement       []*instance.Placement `json:"placement"`
    AttachStorage   []string              `json:"attach-storage,omitempty"`
}

AddApplicationUnitsV5 holds parameters for the AddUnits call. V5 is missing the new policy arg.

type AddCharm Uses

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

AddCharm holds the arguments for making an AddCharm API call.

type AddCharmWithAuthorization Uses

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

AddCharmWithAuthorization holds the arguments for making an AddCharmWithAuthorization API call.

type AddCloudArgs Uses

type AddCloudArgs struct {
    Cloud Cloud  `json:"cloud"`
    Name  string `json:"name"`
    Force *bool  `json:"force,omitempty"`
}

AddCloudArgs holds a cloud to be added with its name

type AddMachineParams Uses

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 Uses

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

AddMachines holds the parameters for making the AddMachines call.

type AddMachinesResult Uses

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 Uses

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

AddMachinesResults holds the results of an AddMachines call.

type AddPendingResourcesArgs Uses

type AddPendingResourcesArgs struct {
    Entity
    AddCharmWithAuthorization

    // Resources is the list of resources to add as pending.
    Resources []CharmResource `json:"resources"`
}

AddPendingResourcesArgs holds the arguments to the AddPendingResources API endpoint.

type AddPendingResourcesResult Uses

type AddPendingResourcesResult struct {
    ErrorResult

    // PendingIDs holds the "pending ID" for each of the requested
    // resources.
    PendingIDs []string `json:"pending-ids"`
}

AddPendingResourcesResult holds the result of the AddPendingResources API endpoint.

type AddRelation Uses

type AddRelation struct {
    Endpoints []string `json:"endpoints"`
    ViaCIDRs  []string `json:"via-cidrs,omitempty"`
}

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

type AddRelationResults Uses

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 AddStorageDetails Uses

type AddStorageDetails struct {
    // StorageTags contains the string representation of the storage tags
    // of the added storage instances.
    StorageTags []string `json:"storage-tags"`
}

AddStorageDetails contains the details of added storage.

type AddStorageResult Uses

type AddStorageResult struct {
    Result *AddStorageDetails `json:"result,omitempty"`
    Error  *Error             `json:"error,omitempty"`
}

AddStorageResult contains the result of adding storage to a unit.

type AddStorageResults Uses

type AddStorageResults struct {
    Results []AddStorageResult `json:"results"`
}

AddStorageResults contains the results of adding storage to units.

type AddSubnetParams Uses

type AddSubnetParams struct {
    CIDR              string   `json:"cidr,omitempty"`
    SubnetProviderId  string   `json:"subnet-provider-id,omitempty"`
    ProviderNetworkId string   `json:"provider-network-id,omitempty"`
    SpaceTag          string   `json:"space-tag"`
    VLANTag           int      `json:"vlan-tag,omitempty"`
    Zones             []string `json:"zones,omitempty"`
}

AddSubnetParams holds a cidr 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 AddSubnetParamsV2 Uses

type AddSubnetParamsV2 struct {
    SubnetTag         string   `json:"subnet-tag,omitempty"`
    SubnetProviderId  string   `json:"subnet-provider-id,omitempty"`
    ProviderNetworkId string   `json:"provider-network-id,omitempty"`
    SpaceTag          string   `json:"space-tag"`
    VLANTag           int      `json:"vlan-tag,omitempty"`
    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 Uses

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

AddSubnetsParams holds the arguments of AddSubnets API call.

type AddSubnetsParamsV2 Uses

type AddSubnetsParamsV2 struct {
    Subnets []AddSubnetParamsV2 `json:"subnets"`
}

AddSubnetsParams holds the arguments of AddSubnets APIv2 call.

type AddUser Uses

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 Uses

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 Uses

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

AddUserResults holds the results of the bulk AddUser API call.

type AddUsers Uses

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

AddUsers holds the parameters for adding new users.

type Address Uses

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

Address represents the location of a machine, including metadata about what kind of location the address describes. See also the address types in core/network which this type can be transformed to/from.

func FromMachineAddress Uses

func FromMachineAddress(addr network.MachineAddress) Address

FromMachineAddress returns an Address for the input MachineAddress.

func FromMachineAddresses Uses

func FromMachineAddresses(mAddrs ...network.MachineAddress) []Address

FromMachineAddresses transforms multiple MachineAddresses into a slice of Address.

func FromProviderAddress Uses

func FromProviderAddress(addr network.ProviderAddress) Address

FromProviderAddress returns an Address for the input ProviderAddress.

func FromProviderAddresses Uses

func FromProviderAddresses(pAddrs ...network.ProviderAddress) []Address

FromProviderAddresses transforms multiple ProviderAddresses into a slice of Address.

func (Address) MachineAddress Uses

func (addr Address) MachineAddress() network.MachineAddress

MachineAddress transforms the Address to a MachineAddress, effectively ignoring the space fields.

func (Address) ProviderAddress Uses

func (addr Address) ProviderAddress() network.ProviderAddress

ProviderAddress transforms the Address to a ProviderAddress.

type AdoptResourcesArgs Uses

type AdoptResourcesArgs struct {
    // ModelTag identifies the model that owns the resources.
    ModelTag string `json:"model-tag"`

    // SourceControllerVersion indicates the version of the calling
    // controller. This is needed in case the way the resources are
    // tagged has changed between versions - the provider should
    // ensure it looks for the original tags in the correct format for
    // that version.
    SourceControllerVersion version.Number `json:"source-controller-version"`
}

AdoptResourcesArgs holds the information required to ask the provider to update the controller tags for a model's resources.

type AgentGetEntitiesResult Uses

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 Uses

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

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

type AgentVersionResult Uses

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 Uses

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

AllWatcherId holds the id of an AllWatcher.

type AllWatcherNextResults Uses

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

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

type AnnotationsGetResult Uses

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 Uses

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

AnnotationsGetResults holds annotations associated with entities.

type AnnotationsSet Uses

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

AnnotationsSet stores parameters for making Set call on Annotations client.

type ApplicationCharm Uses

type ApplicationCharm struct {
    // URL holds the URL of the charm assigned to the
    // application.
    URL string `json:"url"`

    // ForceUpgrade indicates whether or not application
    // units should upgrade to the charm even if they
    // are in an error state.
    ForceUpgrade bool `json:"force-upgrade,omitempty"`

    // SHA256 holds the SHA256 hash of the charm archive.
    SHA256 string `json:"sha256"`

    // CharmModifiedVersion increases when the charm changes in some way.
    CharmModifiedVersion int `json:"charm-modified-version"`
}

ApplicationCharmInfo contains information about an application's charm.

type ApplicationCharmActionsResult Uses

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 Uses

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

ApplicationCharmRelations holds parameters for making the application CharmRelations call.

type ApplicationCharmRelationsResults Uses

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

ApplicationCharmRelationsResults holds the results of the application CharmRelations call.

type ApplicationCharmResult Uses

type ApplicationCharmResult struct {
    Result *ApplicationCharm `json:"result,omitempty"`
    Error  *Error            `json:"error,omitempty"`
}

ApplicationCharmResult contains an ApplicationCharm or an error.

type ApplicationCharmResults Uses

type ApplicationCharmResults struct {
    Results []ApplicationCharmResult `json:"results"`
}

ApplicationCharmResults contains a set of ApplicationCharmResults.

type ApplicationConfigSet Uses

type ApplicationConfigSet struct {
    ApplicationName string `json:"application"`

    // Generation is the generation version that this request
    // will set application configuration for.
    Generation string `json:"generation"`

    Config map[string]string `json:"config"`
}

ApplicationConfigSet holds the parameters for an application config set command.

type ApplicationConfigSetArgs Uses

type ApplicationConfigSetArgs struct {
    Args []ApplicationConfigSet
}

ApplicationConfigSetArgs holds the parameters for setting application config values for specified applications.

type ApplicationConfigUnsetArgs Uses

type ApplicationConfigUnsetArgs struct {
    Args []ApplicationUnset
}

ApplicationConfigUnsetArgs holds the parameters for resetting application config values for specified applications.

type ApplicationConstraint Uses

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

ApplicationConstraint holds the constraints value for a single application, or an error for trying to get it.

type ApplicationDeploy Uses

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"`
    Policy           string                         `json:"policy,omitempty"`
    Storage          map[string]storage.Constraints `json:"storage,omitempty"`
    Devices          map[string]devices.Constraints `json:"devices,omitempty"`
    AttachStorage    []string                       `json:"attach-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 ApplicationDeployV5 Uses

type ApplicationDeployV5 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"`
    AttachStorage    []string                       `json:"attach-storage,omitempty"`
    EndpointBindings map[string]string              `json:"endpoint-bindings,omitempty"`
    Resources        map[string]string              `json:"resources,omitempty"`
}

ApplicationDeployV5 holds the parameters for making the application Deploy call for application facades older than v6. Missing the newer Policy arg.

type ApplicationDeployV6 Uses

type ApplicationDeployV6 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"`
    Policy           string                         `json:"policy,omitempty"`
    Storage          map[string]storage.Constraints `json:"storage,omitempty"`
    AttachStorage    []string                       `json:"attach-storage,omitempty"`
    EndpointBindings map[string]string              `json:"endpoint-bindings,omitempty"`
    Resources        map[string]string              `json:"resources,omitempty"`
}

ApplicationDeployV6 holds the parameters for making the application Deploy call for application facades older than v6. Missing the newer Device arg.

type ApplicationDestroy Uses

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

ApplicationDestroy holds the parameters for making the deprecated Application.Destroy call.

type ApplicationExpose Uses

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

ApplicationExpose holds the parameters for making the application Expose call.

type ApplicationGet Uses

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

    // BranchName identifies the "in-flight" branch that this
    // request will retrieve application data for.
    BranchName string `json:"branch"`
}

ApplicationGet holds parameters for making the singular Get or GetCharmURL calls, and bulk calls to CharmConfig in the V9 API.

type ApplicationGetArgs Uses

type ApplicationGetArgs struct {
    Args []ApplicationGet `json:"args"`
}

ApplicationGetArgs is used to request config for multiple application/generation pairs.

type ApplicationGetConfigResults Uses

type ApplicationGetConfigResults struct {
    Results []ConfigResult
}

ApplicationGetConfigResults holds the return values for application GetConfig.

type ApplicationGetConstraintsResults Uses

type ApplicationGetConstraintsResults struct {
    Results []ApplicationConstraint `json:"results"`
}

ApplicationGetConstraintsResults holds the multiple return values for GetConstraints call.

type ApplicationGetResults Uses

type ApplicationGetResults struct {
    Application       string                 `json:"application"`
    Charm             string                 `json:"charm"`
    CharmConfig       map[string]interface{} `json:"config"`
    ApplicationConfig map[string]interface{} `json:"application-config,omitempty"`
    Constraints       constraints.Value      `json:"constraints"`
    Series            string                 `json:"series"`
    Channel           string                 `json:"channel"`
    EndpointBindings  map[string]string      `json:"endpoint-bindings,omitempty"`
}

ApplicationGetResults holds results of the application Get call.

type ApplicationInfo Uses

type ApplicationInfo struct {
    Tag              string            `json:"tag"`
    Charm            string            `json:"charm,omitempty"`
    Series           string            `json:"series,omitempty"`
    Channel          string            `json:"channel,omitempty"`
    Constraints      constraints.Value `json:"constraints,omitempty"`
    Principal        bool              `json:"principal"`
    Exposed          bool              `json:"exposed"`
    Remote           bool              `json:"remote"`
    EndpointBindings map[string]string `json:"endpoint-bindings,omitempty"`
}

ApplicationInfo holds an application info.

type ApplicationInfoResult Uses

type ApplicationInfoResult struct {
    Result *ApplicationInfo `json:"result,omitempty"`
    Error  *Error           `json:"error,omitempty"`
}

ApplicationInfoResults holds an application info result or a retrieval error.

type ApplicationInfoResults Uses

type ApplicationInfoResults struct {
    Results []ApplicationInfoResult `json:"results"`
}

ApplicationInfoResults holds applications associated with entities.

type ApplicationMetricCredential Uses

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

ApplicationMetricCredential holds parameters for the SetApplicationCredentials call.

type ApplicationMetricCredentials Uses

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

ApplicationMetricCredentials holds multiple ApplicationMetricCredential parameters.

type ApplicationOfferAdminDetails Uses

type ApplicationOfferAdminDetails struct {
    ApplicationOfferDetails
    ApplicationName string            `json:"application-name"`
    CharmURL        string            `json:"charm-url"`
    Connections     []OfferConnection `json:"connections,omitempty"`
}

ApplicationOfferAdminDetails represents an application offering, including details about how it has been deployed.

type ApplicationOfferDetails Uses

type ApplicationOfferDetails struct {
    SourceModelTag         string             `json:"source-model-tag"`
    OfferUUID              string             `json:"offer-uuid"`
    OfferURL               string             `json:"offer-url"`
    OfferName              string             `json:"offer-name"`
    ApplicationDescription string             `json:"application-description"`
    Endpoints              []RemoteEndpoint   `json:"endpoints,omitempty"`
    Spaces                 []RemoteSpace      `json:"spaces,omitempty"`
    Bindings               map[string]string  `json:"bindings,omitempty"`
    Users                  []OfferUserDetails `json:"users,omitempty"`
}

ApplicationOfferDetails represents an application offering from an external model.

type ApplicationOfferResult Uses

type ApplicationOfferResult struct {
    // Result contains application offer information.
    Result *ApplicationOfferAdminDetails `json:"result,omitempty"`

    // Error contains related error.
    Error *Error `json:"error,omitempty"`
}

ApplicationOfferResult is a result of querying a remote application offer based on its URL.

type ApplicationOfferStatus Uses

type ApplicationOfferStatus struct {
    Err                  *Error                    `json:"err,omitempty"`
    OfferName            string                    `json:"offer-name"`
    ApplicationName      string                    `json:"application-name"`
    CharmURL             string                    `json:"charm"`
    Endpoints            map[string]RemoteEndpoint `json:"endpoints"`
    ActiveConnectedCount int                       `json:"active-connected-count"`
    TotalConnectedCount  int                       `json:"total-connected-count"`
}

ApplicationOfferStatus holds status info about an application offer.

type ApplicationOffersResults Uses

type ApplicationOffersResults struct {
    // Results contains collection of remote application results.
    Results []ApplicationOfferResult `json:"results,omitempty"`
}

ApplicationOffersResults is a result of listing remote application offers.

type ApplicationSet Uses

type ApplicationSet struct {
    ApplicationName string `json:"application"`

    // BranchName identifies the "in-flight" branch that this
    // request will set configuration for.
    BranchName string `json:"branch"`

    Options map[string]string `json:"options"`
}

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

type ApplicationSetCharm Uses

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

    // Generation is the generation version that this
    // request will set the application charm for.
    Generation string `json:"generation"`

    // 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"`

    // Force forces the lxd profile validation overriding even if it's fails.
    Force bool `json:"force"`

    // 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"`

    // EndpointBindings is a map of operator-defined endpoint names to
    // space names to be merged with any existing endpoint bindings. This
    // field is only understood by Application facade version 10 and greater.
    EndpointBindings map[string]string `json:"endpoint-bindings,omitempty"`
}

ApplicationSetCharm sets the charm for a given application.

type ApplicationStatus Uses

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"`
    CharmVersion     string                 `json:"charm-verion"`
    CharmProfile     string                 `json:"charm-profile"`
    EndpointBindings map[string]string      `json:"endpoint-bindings"`

    // The following are for CAAS models.
    Scale         int    `json:"int,omitempty"`
    ProviderId    string `json:"provider-id,omitempty"`
    PublicAddress string `json:"public-address"`
}

ApplicationStatus holds status info about an application.

type ApplicationStatusResult Uses

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 Uses

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

ApplicationStatusResults holds multiple StatusResult.

type ApplicationUnexpose Uses

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

ApplicationUnexpose holds parameters for the application Unexpose call.

type ApplicationUnitParams Uses

type ApplicationUnitParams struct {
    ProviderId     string                     `json:"provider-id"`
    UnitTag        string                     `json:"unit-tag"`
    Address        string                     `json:"address"`
    Ports          []string                   `json:"ports"`
    Stateful       bool                       `json:"stateful,omitempty"`
    FilesystemInfo []KubernetesFilesystemInfo `json:"filesystem-info,omitempty"`
    Status         string                     `json:"status"`
    Info           string                     `json:"info"`
    Data           map[string]interface{}     `json:"data,omitempty"`
}

ApplicationUnitParams holds unit parameters used to update a unit.

type ApplicationUnset Uses

type ApplicationUnset struct {
    ApplicationName string `json:"application"`

    // BranchName identifies the "in-flight" branch that this
    // request will unset configuration for.
    BranchName string `json:"branch"`

    Options []string `json:"options"`
}

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

type ApplicationUpdate Uses

type ApplicationUpdate struct {
    ApplicationName string             `json:"application"`
    CharmURL        string             `json:"charm-url"`
    ForceCharmURL   bool               `json:"force-charm-url"`
    ForceSeries     bool               `json:"force-series"`
    Force           bool               `json:"force"`
    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"`

    // Generation is the generation version in which this
    // request will update the application.
    Generation string `json:"generation"`
}

ApplicationUpdate holds the parameters for making the application Update call.

type ApplicationsCharmActionsResults Uses

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 Uses

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

ApplicationsDeploy holds the parameters for deploying one or more applications.

type ApplicationsDeployV5 Uses

type ApplicationsDeployV5 struct {
    Applications []ApplicationDeployV5 `json:"applications"`
}

ApplicationsDeployV5 holds the parameters for deploying one or more applications.

type ApplicationsDeployV6 Uses

type ApplicationsDeployV6 struct {
    Applications []ApplicationDeployV6 `json:"applications"`
}

ApplicationsDeployV6 holds the parameters for deploying one or more applications.

type AuthUserInfo Uses

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.
    // It will be empty if the user has no access to the 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 Uses

type BackupsCreateArgs struct {
    Notes      string `json:"notes"`
    KeepCopy   bool   `json:"keep-copy"`
    NoDownload bool   `json:"no-download"`
}

BackupsCreateArgs holds the args for the API Create method.

type BackupsDownloadArgs Uses

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

BackupsDownloadArgs holds the args for the API Download method.

type BackupsInfoArgs Uses

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

BackupsInfoArgs holds the args for the API Info method.

type BackupsListArgs Uses

type BackupsListArgs struct {
}

BackupsListArgs holds the args for the API List method.

type BackupsListResult Uses

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

BackupsListResult holds the list of all stored backups.

type BackupsMetadataResult Uses

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"`
    Filename     string `json:"filename"`
}

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

type BackupsRemoveArgs Uses

type BackupsRemoveArgs struct {
    IDs []string `json:"ids"`
}

BackupsRemoveArgs holds the args for the API Remove method.

type BackupsUploadArgs Uses

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

BackupsUploadArgs holds the args for the API Upload method.

type BackupsUploadResult Uses

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

BackupsListResult holds the list of all stored backups.

type Block Uses

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 Uses

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 Uses

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 Uses

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 Uses

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 Uses

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 Uses

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

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

type BlockSwitchParams Uses

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 Uses

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 Uses

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

BoolResults holds multiple results with BoolResult each.

type BranchArg Uses

type BranchArg struct {
    BranchName string `json:"branch"`
}

BranchArg represents an in-flight branch via its model and branch name.

type BranchInfoArgs Uses

type BranchInfoArgs struct {
    // BranchNames is the names of branches for which info is being requested.
    BranchNames []string `json:"branches"`

    // Detailed indicates whether full unit tracking detail should returned,
    // or a summary.
    Detailed bool `json:"detailed"`
}

BranchInfoArgs transports arguments to the BranchInfo method

type BranchStatus Uses

type BranchStatus struct {
    AssignedUnits map[string][]string `json:"assigned-units"`
    Created       int64               `json:"created"`
}

BranchStatus holds the results for an branch Full Status.

type BranchTrackArg Uses

type BranchTrackArg struct {
    BranchName string   `json:"branch"`
    Entities   []Entity `json:"entities"`
}

BranchTrackArg identifies an in-flight branch and a collection of entities that should be set to track changes made under the branch.

type BulkImportStorageParams Uses

type BulkImportStorageParams struct {
    Storage []ImportStorageParams `json:"storage"`
}

BulkImportStorageParams contains the parameters for importing a collection of storage entities.

type BundleChange Uses

type BundleChange 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"`
}

BundleChange holds a single change required to deploy a bundle.

type BundleChangesMapArgs Uses

type BundleChangesMapArgs 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 map[string]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"`
}

BundleChangesMapArgs holds a single change required to deploy a bundle. BundleChangesMapArgs has Args represented as a map of arguments rather than a series.

type BundleChangesMapArgsResults Uses

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

BundleChangesMapArgsResults holds results of the Bundle.GetChanges call.

type BundleChangesParams Uses

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

BundleChangesParams holds parameters for making Bundle.GetChanges calls.

type BundleChangesResults Uses

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

BundleChangesResults holds results of the Bundle.GetChanges call.

type BytesResult Uses

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

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

type ChangeModelCredentialParams Uses

type ChangeModelCredentialParams struct {
    // ModelTag is a tag for the model where cloud credential change takes place.
    ModelTag string `json:"model-tag"`

    // CloudCredentialTag is the tag for the new cloud credential.
    CloudCredentialTag string `json:"credential-tag"`
}

ChangeModelCredentialParams holds the argument to replace cloud credential used by a model.

type ChangeModelCredentialsParams Uses

type ChangeModelCredentialsParams struct {
    Models []ChangeModelCredentialParams `json:"model-credentials"`
}

ChangeModelCredentialsParams holds the arguments for changing cloud credentials on models.

type CharmActionSpec Uses

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

CharmActionSpec mirrors charm.ActionSpec.

type CharmActions Uses

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

CharmActions mirrors charm.Actions.

type CharmDevice Uses

type CharmDevice struct {
    Name        string `bson:"name"`
    Description string `bson:"description"`
    Type        string `bson:"type"`
    CountMin    int64  `bson:"count-min"`
    CountMax    int64  `bson:"count-max"`
}

CharmDevice mirrors charm.Device.

type CharmInfo Uses

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"`
    LXDProfile *CharmLXDProfile       `json:"lxd-profile,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 CharmLXDProfile Uses

type CharmLXDProfile struct {
    Config      map[string]string            `json:"config"`
    Description string                       `json:"description"`
    Devices     map[string]map[string]string `json:"devices"`
}

CharmLXDProfile mirrors charm.LXDProfile

type CharmLXDProfileResult Uses

type CharmLXDProfileResult struct {
    LXDProfile *CharmLXDProfile `json:"lxd-profile"`
}

CharmLXDProfileResult returns the result of finding the CharmLXDProfile

type CharmMeta Uses

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"`
    Devices        map[string]CharmDevice       `json:"devices,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 Uses

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

CharmMetric mirrors charm.Metric.

type CharmMetrics Uses

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

CharmMetrics mirrors charm.Metrics.

type CharmOption Uses

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

CharmOption mirrors charm.Option

type CharmPayloadClass Uses

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

CharmPayloadClass mirrors charm.PayloadClass.

type CharmPlan Uses

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

CharmPlan mirrors charm.Plan

type CharmProfilingInfoResult Uses

type CharmProfilingInfoResult struct {
    InstanceId      instance.Id         `json:"instance-id"`
    ModelName       string              `json:"model-name"`
    ProfileChanges  []ProfileInfoResult `json:"profile-changes"`
    CurrentProfiles []string            `json:"current-profiles"`
    Error           *Error              `json:"error"`
}

CharmProfilingInfoResult contains the result based on ProfileInfoArg values to update profiles on a machine.

type CharmRelation Uses

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 CharmResource Uses

type CharmResource struct {
    // Name identifies the resource.
    Name string `json:"name"`

    // Type is the name of the resource type.
    Type string `json:"type"`

    // Path is where the resource will be stored.
    Path string `json:"path"`

    // Description contains user-facing info about the resource.
    Description string `json:"description,omitempty"`

    // Origin is where the resource will come from.
    Origin string `json:"origin"`

    // Revision is the revision, if applicable.
    Revision int `json:"revision"`

    // Fingerprint is the SHA-384 checksum for the resource blob.
    Fingerprint []byte `json:"fingerprint"`

    // Size is the size of the resource, in bytes.
    Size int64 `json:"size"`
}

CharmResource contains the definition for a resource.

type CharmResourceMeta Uses

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 Uses

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 Uses

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

CharmURL identifies a single charm URL.

type CharmURLs Uses

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

CharmURLs identifies multiple charm URLs.

type CharmsList Uses

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

CharmsList stores parameters for a charms.List call

type CharmsListResult Uses

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

CharmsListResult stores result from a charms.List call

type CharmsResponse Uses

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.
    ErrorInfo map[string]interface{} `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 Uses

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 Uses

type ClaimLeadershipBulkResults ErrorResults

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

type ClaimLeadershipParams Uses

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 Uses

type Cloud struct {
    Type             string                            `json:"type"`
    HostCloudRegion  string                            `json:"host-cloud-region,omitempty"`
    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"`
    CACertificates   []string                          `json:"ca-certificates,omitempty"`
    Config           map[string]interface{}            `json:"config,omitempty"`
    RegionConfig     map[string]map[string]interface{} `json:"region-config,omitempty"`
}

Cloud holds information about a cloud.

type CloudAction Uses

type CloudAction string

CloudAction is an action that can be performed on a cloud.

const (
    GrantCloudAccess  CloudAction = "grant"
    RevokeCloudAccess CloudAction = "revoke"
)

Actions that can be preformed on a cloud.

type CloudCredential Uses

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 CloudCredentialArg Uses

type CloudCredentialArg struct {
    CloudName      string `json:"cloud-name"`
    CredentialName string `json:"credential-name"`
}

CloudCredentialArg defines a credential in terms of its cloud and name. It is used to request detailed content for the credential stored on the controller.

func (CloudCredentialArg) IsEmpty Uses

func (p CloudCredentialArg) IsEmpty() bool

IsEmpty returns whether a cloud credential argument is empty.

type CloudCredentialArgs Uses

type CloudCredentialArgs struct {
    Credentials    []CloudCredentialArg `json:"credentials,omitempty"`
    IncludeSecrets bool                 `json:"include-secrets"`
}

CloudCredentialArgs defines an input required to make a valid call to get credentials content stored on the controller.

type CloudCredentialResult Uses

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

CloudCredentialResult contains a CloudCredential or an error.

type CloudCredentialResults Uses

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

CloudCredentialResults contains a set of CloudCredentialResults.

type CloudDetails Uses

type CloudDetails 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"`
}

CloudDetails holds information about a cloud.

type CloudImageMetadata Uses

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 Uses

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

CloudImageMetadataList holds a list of cloud image metadata.

type CloudInfo Uses

type CloudInfo struct {
    CloudDetails `json:",inline"`

    // Users contains information about the users that have access
    // to the cloud. Administrators can see all users that have access;
    // other users can only see their own details.
    Users []CloudUserInfo `json:"users"`
}

CloudInfo holds information about a cloud and user who can access it.

type CloudInfoResult Uses

type CloudInfoResult struct {
    Result *CloudInfo `json:"result,omitempty"`
    Error  *Error     `json:"error,omitempty"`
}

CloudInfoResult holds the result of a CloudInfo call.

type CloudInfoResults Uses

type CloudInfoResults struct {
    Results []CloudInfoResult `json:"results"`
}

CloudInfoResults holds the result of a bulk CloudInfo call.

type CloudInstanceTypesConstraint Uses

type CloudInstanceTypesConstraint struct {
    // CloudTag is the tag of the cloud for which instances types
    // should be returned.
    CloudTag string `json:"cloud-tag"`

    // CloudRegion is the name of the region for which instance
    // types should be returned.
    CloudRegion string `json:"region"`

    // Constraints, if specified, contains the constraints to filter
    // the instance types by. If Constraints is not specified, then
    // no filtering by constraints will take place: all instance
    // types supported by the region will be returned.
    Constraints *constraints.Value `json:"constraints,omitempty"`
}

CloudInstanceTypesConstraint contains the cloud information and constraints necessary to query for instance types on a given cloud.

type CloudInstanceTypesConstraints Uses

type CloudInstanceTypesConstraints struct {
    Constraints []CloudInstanceTypesConstraint `json:"constraints"`
}

CloudInstanceTypesConstraints contains a slice of CloudInstanceTypesConstraint.

type CloudRegion Uses

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 Uses

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

CloudResult contains a cloud definition or an error.

type CloudResults Uses

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

CloudResults contains a set of CloudResults.

type CloudSpec Uses

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"`
    CACertificates   []string         `json:"cacertificates,omitempty"`
}

CloudSpec holds a cloud specification.

type CloudSpecResult Uses

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

CloudSpecResult contains a CloudSpec or an error.

type CloudSpecResults Uses

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

CloudSpecResults contains a set of CloudSpecResults.

type CloudUserInfo Uses

type CloudUserInfo struct {
    UserName    string `json:"user"`
    DisplayName string `json:"display-name"`
    Access      string `json:"access"`
}

CloudUserInfo holds information on a user who has access to a cloud. Cloud admins can see this information for all users who have access, so it should not include sensitive information.

type CloudsResult Uses

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 ConfigResult Uses

type ConfigResult struct {
    Config map[string]interface{} `json:"config"`
    Error  *Error                 `json:"error,omitempty"`
}

ConfigResults holds configuration values for an entity.

type ConfigSettings Uses

type ConfigSettings map[string]interface{}

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

type ConfigSettingsResult Uses

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

ConfigSettingsResult holds a configuration map or an error.

type ConfigSettingsResults Uses

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

ConfigSettingsResults holds multiple configuration maps or errors.

type ConfigValue Uses

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

ConfigValue encapsulates a configuration value and its source.

type ConstraintsResult Uses

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

ConstraintsResult holds machine constraints or an error.

type ConstraintsResults Uses

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

ConstraintsResults holds multiple constraints results.

type ConsumeApplicationArg Uses

type ConsumeApplicationArg struct {
    // The offer to be consumed.
    ApplicationOfferDetails

    // Macaroon is used for authentication.
    Macaroon *macaroon.Macaroon `json:"macaroon,omitempty"`

    // ControllerInfo contains connection details to the controller
    // hosting the offer.
    ControllerInfo *ExternalControllerInfo `json:"external-controller,omitempty"`

    // ApplicationAlias is the name of the alias to use for the application name.
    ApplicationAlias string `json:"application-alias,omitempty"`
}

ConsumeApplicationArg holds the arguments for consuming a remote application.

type ConsumeApplicationArgs Uses

type ConsumeApplicationArgs struct {
    Args []ConsumeApplicationArg `json:"args,omitempty"`
}

ConsumeApplicationArgs is a collection of arg for consuming applications.

type ConsumeOfferDetails Uses

type ConsumeOfferDetails struct {
    Offer          *ApplicationOfferDetails `json:"offer,omitempty"`
    Macaroon       *macaroon.Macaroon       `json:"macaroon,omitempty"`
    ControllerInfo *ExternalControllerInfo  `json:"external-controller,omitempty"`
}

ConsumeOfferDetails contains the details necessary to consume an application offer.

type ConsumeOfferDetailsResult Uses

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

ConsumeOfferDetailsResult contains the details necessary to consume an application offer or an error.

type ConsumeOfferDetailsResults Uses

type ConsumeOfferDetailsResults struct {
    Results []ConsumeOfferDetailsResult `json:"results,omitempty"`
}

ConsumeOfferDetailsResults represents the result of a ConsumeOfferDetails call.

type ContainerConfig Uses

type ContainerConfig struct {
    ProviderType               string                 `json:"provider-type"`
    AuthorizedKeys             string                 `json:"authorized-keys"`
    SSLHostnameVerification    bool                   `json:"ssl-hostname-verification"`
    LegacyProxy                proxy.Settings         `json:"legacy-proxy"`
    JujuProxy                  proxy.Settings         `json:"juju-proxy"`
    AptProxy                   proxy.Settings         `json:"apt-proxy"`
    SnapProxy                  proxy.Settings         `json:"snap-proxy"`
    SnapStoreAssertions        string                 `json:"snap-store-assertions"`
    SnapStoreProxyID           string                 `json:"snap-store-proxy-id"`
    SnapStoreProxyURL          string                 `json:"snap-store-proxy-url"`
    AptMirror                  string                 `json:"apt-mirror"`
    CloudInitUserData          map[string]interface{} `json:"cloudinit-userdata,omitempty"`
    ContainerInheritProperties string                 `json:"container-inherit-properties,omitempty"`
    *UpdateBehavior
}

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

type ContainerConfigV5 Uses

type ContainerConfigV5 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"`
    CloudInitUserData          map[string]interface{} `json:"cloudinit-userdata,omitempty"`
    ContainerInheritProperties string                 `json:"container-inherit-properties,omitempty"`
    *UpdateBehavior
}

ContainerConfigV5 contains information from the model config that is needed for container cloud-init for version 5 provisioner api calls.

type ContainerLXDProfile Uses

type ContainerLXDProfile struct {
    Profile CharmLXDProfile `json:"profile" yaml:"profile"`
    Name    string          `json:"name" yaml:"name"`
}

ContainerLXDProfile contains the charm.LXDProfile information in addition to the name of the profile.

type ContainerManagerConfig Uses

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 Uses

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

ContainerManagerConfigParams contains the parameters for the ContainerManagerConfig provisioner API call.

type ContainerProfileResult Uses

type ContainerProfileResult struct {
    Error       *Error                 `json:"error,omitempty"`
    LXDProfiles []*ContainerLXDProfile `json:"lxd-profiles,omitempty"`
}

ContainerProfileResult returns the result of finding the CharmLXDProfile and name of the lxd profile to be used for 1 unit on the container

type ContainerProfileResults Uses

type ContainerProfileResults struct {
    Results []ContainerProfileResult `json:"results"`
}

ContainerProfileResults returns the ContainerProfileResult for each unit to be placed on the container.

type ContainerTypeResult Uses

type ContainerTypeResult struct {
    Type  instance.ContainerType `json:"container-type"`
    Error *Error                 `json:"error"`
}

ContainerTypeResult holds the result of a machine's ContainerType.

type ControllerAPIInfoResult Uses

type ControllerAPIInfoResult struct {
    Addresses []string `json:"addresses"`
    CACert    string   `json:"cacert"`
    Error     *Error   `json:"error,omitempty"`
}

ControllerAPIInfoResult holds controller api address details.

type ControllerAPIInfoResults Uses

type ControllerAPIInfoResults struct {
    Results []ControllerAPIInfoResult `json:"results"`
}

ControllerAPIInfoResults holds controller api address details results.

type ControllerAction Uses

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 Uses

type ControllerConfig map[string]interface{}

ControllerConfig holds a controller configuration.

type ControllerConfigResult Uses

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

ControllerConfigResult holds controller configuration.

type ControllerConfigSet Uses

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

ControllerConfigSet holds new config values for Controller.ConfigSet.

type ControllerCredentialInfo Uses

type ControllerCredentialInfo struct {
    // Content has comprehensive credential content.
    Content CredentialContent `json:"content,omitempty"`

    // Models contains models that are using ths credential.
    Models []ModelAccess `json:"models,omitempty"`
}

ControllerCredentialInfo contains everything Juju stores on the controller about the credential - its contents as well as what models use it and what access currently logged in user, a credential owner, has to these models.

type ControllerVersionResults Uses

type ControllerVersionResults struct {
    Version   string `json:"version"`
    GitCommit string `json:"git-commit"`
}

ControllerVersionResults holds the results from an api call to get the controller's version information.

type ControllersChangeResult Uses

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 Uses

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

ControllersChangeResults contains the results of the EnableHA API call.

type ControllersChanges Uses

type ControllersChanges struct {
    Added      []string `json:"added,omitempty"`
    Maintained []string `json:"maintained,omitempty"`
    Removed    []string `json:"removed,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 Uses

type ControllersSpec struct {
    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 Uses

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

ControllersServersSpecs contains all the arguments for the EnableHA API call.

type CountedEntity Uses

type CountedEntity string

CountedEntity identifies an entity that has a count.

const (
    Machines CountedEntity = "machines"
    Cores    CountedEntity = "cores"
    Units    CountedEntity = "units"
)

type CreateSpaceParams Uses

type CreateSpaceParams struct {
    CIDRs      []string `json:"cidrs"`
    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 CreateSpaceParamsV4 Uses

type CreateSpaceParamsV4 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 Uses

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

CreateSpacesParams olds the arguments of the AddSpaces API call.

type CreateSpacesParamsV4 Uses

type CreateSpacesParamsV4 struct {
    Spaces []CreateSpaceParamsV4 `json:"spaces"`
}

CreateSpacesParams holds the arguments of the AddSpaces API call.

type CreateSubnetParams Uses

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 Uses

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

CreateSubnetsParams holds the arguments of CreateSubnets API call.

type CredentialContent Uses

type CredentialContent struct {
    // Name is the short name of the credential.
    Name string `json:"name"`

    // Cloud is the cloud name to which this credential belongs.
    Cloud string `json:"cloud"`

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

    // Valid indicates whether credential is valid.
    Valid *bool `json:"valid,omitempty"`

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

CredentialContent contains a cloud credential content.

type CredentialContentResult Uses

type CredentialContentResult struct {
    Result *ControllerCredentialInfo `json:"result,omitempty"`
    Error  *Error                    `json:"error,omitempty"`
}

CredentialContentResult contains comprehensive information about stored credential or an error.

type CredentialContentResults Uses

type CredentialContentResults struct {
    Results []CredentialContentResult `json:"results,omitempty"`
}

CredentialContentResults contains a set of CredentialContentResults.

type Creds Uses

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 Uses

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

DeployerConnectionValues containers the result of deployer.ConnectionInfo API call.

type DestroyApplicationInfo Uses

type DestroyApplicationInfo struct {
    // DetachedStorage is the tags of storage instances that will be
    // detached from the application's units, and will remain in the
    // model after the units are removed.
    DetachedStorage []Entity `json:"detached-storage,omitempty"`

    // DestroyedStorage is the tags of storage instances that will be
    // destroyed as a result of destroying the application.
    DestroyedStorage []Entity `json:"destroyed-storage,omitempty"`

    // DestroyedUnits is the tags of units that will be destroyed
    // as a result of destroying the application.
    DestroyedUnits []Entity `json:"destroyed-units,omitempty"`
}

DestroyApplicationInfo contains information related to the removal of an application.

type DestroyApplicationOffers Uses

type DestroyApplicationOffers struct {
    OfferURLs []string `json:"offer-urls"`
    Force     bool     `json:"force,omitempty"`
}

DestroyApplicationOffers holds parameters for the DestroyOffers call.

type DestroyApplicationParams Uses

type DestroyApplicationParams struct {
    // ApplicationTag holds the tag of the application to destroy.
    ApplicationTag string `json:"application-tag"`

    // DestroyStorage controls whether or not storage attached to
    // units of the application should be destroyed.
    DestroyStorage bool `json:"destroy-storage,omitempty"`

    // Force controls whether or not the destruction of an application
    // will be forced, i.e. ignore operational errors.
    Force bool `json:"force"`

    // MaxWait specifies the amount of time that each step in application removal
    // will wait before forcing the next step to kick-off. This parameter
    // only makes sense in combination with 'force' set to 'true'.
    MaxWait *time.Duration `json:"max-wait,omitempty"`
}

DestroyApplicationParams holds parameters for the Application.DestroyApplication call.

type DestroyApplicationResult Uses

type DestroyApplicationResult struct {
    Error *Error                  `json:"error,omitempty"`
    Info  *DestroyApplicationInfo `json:"info,omitempty"`
}

DestroyApplicationResult contains one of the results of a DestroyApplication API request.

type DestroyApplicationResults Uses

type DestroyApplicationResults struct {
    Results []DestroyApplicationResult `json:"results,omitempty"`
}

DestroyApplicationResults contains the results of a DestroyApplication API request.

type DestroyApplicationUnits Uses

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

DestroyApplicationUnits holds parameters for the deprecated Application.DestroyUnits call.

type DestroyApplicationsParams Uses

type DestroyApplicationsParams struct {
    Applications []DestroyApplicationParams `json:"applications"`
}

DestroyApplicationsParams holds bulk parameters for the Application.DestroyApplication call.

type DestroyConsumedApplicationParams Uses

type DestroyConsumedApplicationParams struct {
    ApplicationTag string `json:"application-tag"`

    // Force controls whether or not the destruction process ignores
    // operational errors. When true, the process will ignore them.
    Force *bool `json:"force,omitempty"`

    // MaxWait specifies the amount of time that each step in application removal
    // will wait before forcing the next step to kick-off. This parameter
    // only makes sense in combination with 'force' set to 'true'.
    MaxWait *time.Duration `json:"max-wait,omitempty"`
}

DestroyConsumedApplicationParams holds the parameters for the RemoteApplication.Destroy call.

type DestroyConsumedApplicationsParams Uses

type DestroyConsumedApplicationsParams struct {
    Applications []DestroyConsumedApplicationParams `json:"applications"`
}

DestroyConsumedApplicationsParams holds bulk parameters for the Application.DestroyConsumedApplication call.

type DestroyControllerArgs Uses

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"`

    // DestroyStorage controls whether or not storage in the model (and
    // hosted models, if DestroyModels is true) should be destroyed.
    //
    // This is ternary: nil, false, or true. If nil and there is persistent
    // storage in the model (or hosted models), an error with the code
    // params.CodeHasPersistentStorage will be returned.
    DestroyStorage *bool `json:"destroy-storage,omitempty"`
}

DestroyControllerArgs holds the arguments for destroying a controller.

type DestroyMachineInfo Uses

type DestroyMachineInfo struct {
    // DetachedStorage is the tags of storage instances that will be
    // detached from the machine (assigned units) as a result of
    // destroying the machine, and will remain in the model after
    // the machine and unit are removed.
    DetachedStorage []Entity `json:"detached-storage,omitempty"`

    // DestroyedStorage is the tags of storage instances that will be
    // destroyed as a result of destroying the machine.
    DestroyedStorage []Entity `json:"destroyed-storage,omitempty"`

    // DestroyedStorage is the tags of units that will be destroyed
    // as a result of destroying the machine.
    DestroyedUnits []Entity `json:"destroyed-units,omitempty"`
}

DestroyMachineInfo contains information related to the removal of a machine.

type DestroyMachineResult Uses

type DestroyMachineResult struct {
    Error *Error              `json:"error,omitempty"`
    Info  *DestroyMachineInfo `json:"info,omitempty"`
}

DestroyMachineResult contains one of the results of a MachineManager.Destroy API request.

type DestroyMachineResults Uses

type DestroyMachineResults struct {
    Results []DestroyMachineResult `json:"results,omitempty"`
}

DestroyMachineResults contains the results of a MachineManager.Destroy API request.

type DestroyMachines Uses

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

DestroyMachines holds parameters for the DestroyMachines call. This is the legacy params struct used with the client facade. TODO(wallyworld) - remove in Juju 3.0

type DestroyMachinesParams Uses

type DestroyMachinesParams struct {
    MachineTags []string `json:"machine-tags"`
    Force       bool     `json:"force,omitempty"`
    Keep        bool     `json:"keep,omitempty"`

    // MaxWait specifies the amount of time that each step in machine destroy process
    // will wait before forcing the next step to kick-off. This parameter
    // only makes sense in combination with 'force' set to 'true'.
    MaxWait *time.Duration `json:"max-wait,omitempty"`
}

DestroyMachinesParams holds parameters for the DestroyMachinesWithParams call.

type DestroyModelParams Uses

type DestroyModelParams struct {
    // ModelTag is the tag of the model to destroy.
    ModelTag string `json:"model-tag"`

    // DestroyStorage controls whether or not storage in the model.
    //
    // This is ternary: nil, false, or true. If nil and there is persistent
    // storage in the model, an error with the code
    // params.CodeHasPersistentStorage will be returned.
    DestroyStorage *bool `json:"destroy-storage,omitempty"`

    // Force specifies whether model destruction will be forced, i.e.
    // keep going despite operational errors.
    Force *bool `json:"force,omitempty"`

    // MaxWait specifies the amount of time that each step in model destroy process
    // will wait before forcing the next step to kick-off. This parameter
    // only makes sense in combination with 'force' set to 'true'.
    MaxWait *time.Duration `json:"max-wait,omitempty"`
}

DestroyModelParams holds the arguments for destroying a model.

type DestroyModelsParams Uses

type DestroyModelsParams struct {
    Models []DestroyModelParams `json:"models"`
}

DestroyModelsParams holds the arguments for destroying models.

type DestroyRelation Uses

type DestroyRelation struct {
    Endpoints  []string `json:"endpoints,omitempty"`
    RelationId int      `json:"relation-id"`

    // Force specifies whether relation destruction will be forced, i.e.
    // keep going despite operational errors.
    Force *bool `json:"force,omitempty"`

    // MaxWait specifies the amount of time that each step in relation destroy process
    // will wait before forcing the next step to kick-off. This parameter
    // only makes sense in combination with 'force' set to 'true'.
    MaxWait *time.Duration `json:"max-wait,omitempty"`
}

DestroyRelation holds the parameters for making the DestroyRelation call. A relation is identified by either endpoints or id. The endpoints, if specified, are unordered.

type DestroyUnitInfo Uses

type DestroyUnitInfo struct {
    // DetachedStorage is the tags of storage instances that will be
    // detached from the unit, and will remain in the model after
    // the unit is removed.
    DetachedStorage []Entity `json:"detached-storage,omitempty"`

    // DestroyedStorage is the tags of storage instances that will be
    // destroyed as a result of destroying the unit.
    DestroyedStorage []Entity `json:"destroyed-storage,omitempty"`
}

DestroyUnitInfo contains information related to the removal of an application unit.

type DestroyUnitParams Uses

type DestroyUnitParams struct {
    // UnitTag holds the tag of the unit to destroy.
    UnitTag string `json:"unit-tag"`

    // DestroyStorage controls whether or not storage
    // attached to the unit should be destroyed.
    DestroyStorage bool `json:"destroy-storage,omitempty"`

    // Force controls whether or not the destruction of an application
    // will be forced, i.e. ignore operational errors.
    Force bool `json:"force"`

    // MaxWait specifies the amount of time that each step in unit removal
    // will wait before forcing the next step to kick-off. This parameter
    // only makes sense in combination with 'force' set to 'true'.
    MaxWait *time.Duration `json:"max-wait,omitempty"`
}

DestroyUnitParams holds parameters for the Application.DestroyUnit call.

type DestroyUnitResult Uses

type DestroyUnitResult struct {
    Error *Error           `json:"error,omitempty"`
    Info  *DestroyUnitInfo `json:"info,omitempty"`
}

DestroyUnitResult contains one of the results of a DestroyUnit API request.

type DestroyUnitResults Uses

type DestroyUnitResults struct {
    Results []DestroyUnitResult `json:"results,omitempty"`
}

DestroyUnitResults contains the results of a DestroyUnit API request.

type DestroyUnitsParams Uses

type DestroyUnitsParams struct {
    Units []DestroyUnitParams `json:"units"`
}

DestroyUnitsParams holds bulk parameters for the Application.DestroyUnit call.

type DetailedStatus Uses

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 DeviceBridgeInfo Uses

type DeviceBridgeInfo struct {
    HostDeviceName string `json:"host-device-name"`
    BridgeName     string `json:"bridge-name"`
    MACAddress     string `json:"mac-address"`
}

DeviceBridgeInfo lists the host device and the expected bridge to be created.

type DeviceType Uses

type DeviceType string

DeviceType defines a device type.

type DigestAlgorithm Uses

type DigestAlgorithm string

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

type DischargeRequiredErrorInfo Uses

type DischargeRequiredErrorInfo 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"`
}

DischargeRequiredErrorInfo provides additional macaroon information for DischargeRequired errors. 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.

func (DischargeRequiredErrorInfo) AsMap Uses

func (e DischargeRequiredErrorInfo) AsMap() map[string]interface{}

AsMap encodes the error info as a map that can be attached to an Error.

type DistributionGroupResult Uses

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 Uses

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

DistributionGroupResults is the bulk form of DistributionGroupResult.

type DumpModelRequest Uses

type DumpModelRequest struct {
    Entities   []Entity `json:"entities"`
    Simplified bool     `json:"simplified"`
}

DumpModelRequest wraps the request for a dump-model call. A simplified dump will not contain a complete export, but instead a reduced set that is determined by the server.

type EndpointFilterAttributes Uses

type EndpointFilterAttributes struct {
    Role      charm.RelationRole `json:"role"`
    Interface string             `json:"interface"`
    Name      string             `json:"name"`
}

EndpointFilterAttributes is used to filter offers matching the specified endpoint criteria.

type EndpointStatus Uses

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 Uses

func (epStatus *EndpointStatus) String() string

type Entities Uses

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

Entities identifies multiple entities.

type EntitiesCharmURL Uses

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

EntitiesCharmURL holds the parameters for making a SetCharmURL API call.

type EntitiesPortRanges Uses

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

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

type EntitiesPorts Uses

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

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

type EntitiesResult Uses

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 Uses

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

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

type EntitiesVersion Uses

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

EntitiesVersion specifies what tools are being run for multiple entities.

type EntitiesWatchResult Uses

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 Uses

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 Uses

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

Entity identifies a single entity.

type EntityAnnotations Uses

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

EntityAnnotations stores annotations for an entity.

type EntityCharmURL Uses

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

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

type EntityMacaroonArg Uses

type EntityMacaroonArg struct {
    Macaroon *macaroon.Macaroon `json:"macaroon"`
    Tag      string             `json:"tag"`
}

EntityMacaroonArg holds a macaroon and entity which we want to save.

type EntityMacaroonArgs Uses

type EntityMacaroonArgs struct {
    Args []EntityMacaroonArg
}

EntityMacaroonArgs holds the arguments to a SaveMacaroons API call.

type EntityMetrics Uses

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 Uses

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 Uses

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

EntityPasswords holds the parameters for making a SetPasswords call.

type EntityPort Uses

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 Uses

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 Uses

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 Uses

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 EntityString Uses

type EntityString struct {
    Tag   string `json:"tag"`
    Value string `json:"value"`
}

EntityString holds an entity tag and a string value.

type EntityVersion Uses

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 Uses

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

EntityWorkloadVersion holds the workload version for an entity.

type EntityWorkloadVersions Uses

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

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

type Error Uses

type Error struct {
    Message string                 `json:"message"`
    Code    string                 `json:"code"`
    Info    map[string]interface{} `json:"info,omitempty"`
}

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

func (Error) Error Uses

func (e Error) Error() string

func (Error) ErrorCode Uses

func (e Error) ErrorCode() string

func (Error) ErrorInfo Uses

func (e Error) ErrorInfo() map[string]interface{}

ErrorInfo implements the rpc.ErrorInfoProvider interface which enables API error attachments to be returned as part of RPC error responses.

func (Error) GoString Uses

func (e Error) GoString() string

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

func (Error) UnmarshalInfo Uses

func (e Error) UnmarshalInfo(to interface{}) error

UnmarshalInfo attempts to unmarshal the information contained in the Info field of a RequestError into an AdditionalErrorInfo instance a pointer to which is passed via the to argument. The method will return an error if a non-pointer arg is provided.

type ErrorResult Uses

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

ErrorResult holds the error status of a single operation.

type ErrorResults Uses

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 Uses

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 Uses

func (result ErrorResults) OneError() error

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

type ExternalControllerInfo Uses

type ExternalControllerInfo struct {
    ControllerTag string   `json:"controller-tag"`
    Alias         string   `json:"controller-alias"`
    Addrs         []string `json:"addrs"`
    CACert        string   `json:"ca-cert"`
}

ExternalControllerInfo holds addressed and other information needed to make a connection to an external controller.

type ExternalControllerInfoResult Uses

type ExternalControllerInfoResult struct {
    Result *ExternalControllerInfo `json:"result"`
    Error  *Error                  `json:"error"`
}

ExternalControllerInfoResult contains the result of querying the information of external controllers.

type ExternalControllerInfoResults Uses

type ExternalControllerInfoResults struct {
    Results []ExternalControllerInfoResult `json:"results"`
}

ExternalControllerInfoResults contains the results of querying the information for a set of external controllers.

type FacadeVersions Uses

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 FanConfigEntry Uses

type FanConfigEntry struct {
    Underlay string `json:"underlay"`
    Overlay  string `json:"overlay"`
}

FanConfigEntry holds configuration for a single fan.

type FanConfigResult Uses

type FanConfigResult struct {
    Fans []FanConfigEntry `json:"fans"`
}

FanConfigResult holds configuration for all fans in a model

type Filesystem Uses

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 Uses

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 FilesystemAttachmentDetails Uses

type FilesystemAttachmentDetails struct {
    // NOTE(axw) for backwards-compatibility, this must not be given a
    // json tag. This ensures that we collapse FilesystemAttachmentInfo.
    //
    // TODO(axw) when we can break backwards-compatibility (Juju 3.0),
    // give this a field name of "info", like we have in FilesystemDetails
    // above.
    FilesystemAttachmentInfo

    // Life contains the lifecycle state of the filesystem attachment.
    // Juju controllers older than 2.2 do not populate this
    // field, so it may be omitted.
    Life Life `json:"life,omitempty"`
}

FilesystemAttachmentDetails describes a filesystem attachment.

type FilesystemAttachmentInfo Uses

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

FilesystemAttachmentInfo describes a filesystem attachment.

type FilesystemAttachmentParams Uses

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 Uses

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

FilesystemAttachmentParamsResults holds provisioning parameters for a filesystem attachment.

type FilesystemAttachmentParamsResults Uses

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

FilesystemAttachmentParamsResults holds provisioning parameters for multiple filesystem attachments.

type FilesystemAttachmentResult Uses

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 Uses

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

FilesystemAttachmentResults holds a set of FilesystemAttachmentResults.

type FilesystemAttachments Uses

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

FilesystemAttachments describes a set of storage filesystem attachments.

type FilesystemDetails Uses

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"`

    // Life contains the lifecycle state of the filesystem.
    // Juju controllers older than 2.2 do not populate this
    // field, so it may be omitted.
    Life Life `json:"life,omitempty"`

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

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

    // UnitAttachments contains a mapping from
    // unit tag to filesystem attachment information (CAAS models).
    UnitAttachments map[string]FilesystemAttachmentDetails `json:"unit-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 Uses

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

FilesystemDetailsListResult holds a collection of filesystem details.

type FilesystemDetailsListResults Uses

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

FilesystemDetailsListResults holds a collection of collections of filesystem details.

type FilesystemDetailsResult Uses

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 Uses

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

FilesystemDetailsResults holds filesystem details.

type FilesystemFilter Uses

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 Uses

func (f *FilesystemFilter) IsEmpty() bool

IsEmpty determines if filter is empty

type FilesystemFilters Uses

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

FilesystemFilters holds a collection of filesystem filters.

type FilesystemInfo Uses

type FilesystemInfo struct {
    FilesystemId string `json:"filesystem-id"`
    // Pool is the name of the storage pool used to
    // allocate the filesystem. Juju controllers older
    // than 2.2 do not populate this field, so it may
    // be omitted.
    Pool string `json:"pool"`
    // Size is the size of the filesystem in MiB.
    Size uint64 `json:"size"`
}

Filesystem describes a storage filesystem in the model.

type FilesystemParams Uses

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 Uses

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

FilesystemParamsResults holds provisioning parameters for a filesystem.

type FilesystemParamsResults Uses

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

FilesystemParamsResults holds provisioning parameters for multiple filesystems.

type FilesystemResult Uses

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

FilesystemResult holds information about a filesystem.

type FilesystemResults Uses

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

FilesystemResults holds information about multiple filesystems.

type Filesystems Uses

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

Filesystems describes a set of storage filesystems in the model.

type FindActionsByNames Uses

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

FindActionsByName finds actions given an action name.

type FindTags Uses

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 Uses

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 Uses

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"`

    // AgentStream will be used to set agent stream to search
    AgentStream string `json:"agentstream"`
}

FindToolsParams defines parameters for the FindTools method.

type FindToolsResult Uses

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 FirewallRule Uses

type FirewallRule struct {
    // KnownService is the well known service for a firewall rule.
    KnownService KnownServiceValue `json:"known-service"`

    // WhitelistCIDRS is the ist of subnets allowed access.
    WhitelistCIDRS []string `json:"whitelist-cidrs,omitempty"`
}

FirewallRule is a rule for ingress through a firewall.

type FirewallRuleArgs Uses

type FirewallRuleArgs struct {
    // Args holds the parameters for updating a firewall rule.
    Args []FirewallRule `json:"args"`
}

FirewallRuleArgs holds the parameters for updating one or more firewall rules.

type FullStatus Uses

type FullStatus struct {
    Model               ModelStatusInfo                    `json:"model"`
    Machines            map[string]MachineStatus           `json:"machines"`
    Applications        map[string]ApplicationStatus       `json:"applications"`
    RemoteApplications  map[string]RemoteApplicationStatus `json:"remote-applications"`
    Offers              map[string]ApplicationOfferStatus  `json:"offers"`
    Relations           []RelationStatus                   `json:"relations"`
    ControllerTimestamp *time.Time                         `json:"controller-timestamp"`
    Branches            map[string]BranchStatus            `json:"branches"`
}

FullStatus holds information about the status of a juju model.

func (*FullStatus) IsEmpty Uses

func (fs *FullStatus) IsEmpty() bool

IsEmpty checks all collections on FullStatus to determine if the status is empty. Note that only the collections are checked here as Model information will always be populated.

type GUIArchiveResponse Uses

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

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

type GUIArchiveVersion Uses

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 Uses

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 Generation Uses

type Generation struct {
    // BranchName uniquely identifies a branch *amongst in-flight branches*.
    BranchName string `json:"branch"`

    // Created is the Unix timestamp at generation creation.
    Created int64 `json:"created"`

    // Created is the user who created the generation.
    CreatedBy string `json:"created-by"`

    // Applications holds the collection of application changes
    // made under this generation.
    Applications []GenerationApplication `json:"applications"`
}

Generation represents a model generation's details including config changes.

type GenerationApplication Uses

type GenerationApplication struct {
    // ApplicationsName is the name of the application.
    ApplicationName string `json:"application"`

    // UnitProgress is summary information about units tracking the branch.
    UnitProgress string `json:"progress"`

    // UnitsTracking is the names of application units that have been set to
    // track the branch.
    UnitsTracking []string `json:"tracking,omitempty"`

    // UnitsPending is the names of application units that are still tracking
    // the master generation.
    UnitsPending []string `json:"pending,omitempty"`

    // Config changes are the effective new configuration values resulting from
    // changes made under this branch.
    ConfigChanges map[string]interface{} `json:"config"`
}

GenerationApplication represents changes to an application made under a branch.

type GenerationResults Uses

type GenerationResults struct {
    // Generations holds the details of the requested generations.
    Generations []Generation `json:"generations"`

    // Error holds the value of any error that occurred processing the request.
    Error *Error `json:"error,omitempty"`
}

GenerationResults transports a collection of generation details.

type GetAnnotations Uses

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

GetAnnotations stores parameters for making the GetAnnotations call.

type GetAnnotationsResults Uses

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

GetAnnotationsResults holds annotations associated with an entity.

type GetApplicationConstraints Uses

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

GetApplicationConstraints stores parameters for making the GetApplicationConstraints call.

type GetConstraintsResults Uses

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

GetConstraintsResults holds results of the GetConstraints call.

type GetLeadershipSettingsBulkResults Uses

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

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

type GetLeadershipSettingsResult Uses

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

GetLeadershipSettingsResult is the results from requesting leadership settings.

type GetTokenArg Uses

type GetTokenArg struct {
    // Tag is the tag of the entity for which we want the token.
    Tag string `json:"tag"`
}

GetTokenArg holds the model and entity for which we want a token.

type GetTokenArgs Uses

type GetTokenArgs struct {
    Args []GetTokenArg
}

GetTokenArgs holds the arguments to a GetTokens API call.

type GoalState Uses

type GoalState struct {
    Units     UnitsGoalState            `json:"units"`
    Relations map[string]UnitsGoalState `json:"relations"`
}

GoalState goal-state at application level, stores Units and Units-Relations

type GoalStateResult Uses

type GoalStateResult struct {
    Result *GoalState `json:"result"`
    Error  *Error     `json:"error"`
}

GoalStateResult the result of GoalStates per entity.

type GoalStateResults Uses

type GoalStateResults struct {
    Results []GoalStateResult `json:"results"`
}

GoalStateResults holds the results of GoalStates API call

type GoalStateStatus Uses

type GoalStateStatus struct {
    Status string     `json:"status"`
    Since  *time.Time `json:"since"`
}

GoalStateStatus goal-state at unit level

type History Uses

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

History holds many DetailedStatus.

type HostNetworkChange Uses

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

    // NewBridges lists the bridges that need to be created and what host
    // device they should be connected to.
    NewBridges []DeviceBridgeInfo `json:"new-bridges"`

    // ReconfigureDelay is the duration in seconds to sleep before
    // raising the bridged interface
    ReconfigureDelay int `json:"reconfigure-delay"`
}

HostNetworkChange holds the information about how a host machine should be modified to prepare for a container.

type HostNetworkChangeResults Uses

type HostNetworkChangeResults struct {
    Results []HostNetworkChange `json:"results"`
}

HostNetworkChangeResults holds the network changes that are necessary for multiple containers to be created.

type HostPort Uses

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 FromProviderHostPort Uses

func FromProviderHostPort(nhp network.ProviderHostPort) HostPort

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

func FromProviderHostPorts Uses

func FromProviderHostPorts(nhps network.ProviderHostPorts) []HostPort

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

func (HostPort) MachineHostPort Uses

func (hp HostPort) MachineHostPort() network.MachineHostPort

MachineHostPort transforms the HostPort to a MachineHostPort.

func (HostPort) ProviderHostPort Uses

func (hp HostPort) ProviderHostPort() network.ProviderHostPort

ProviderHostPort transforms the HostPort to a ProviderHostPort.

type HostedModelConfig Uses

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 Uses

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

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

type ImageFilterParams Uses

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

ImageFilterParams holds the parameters used to specify images to delete.

type ImageMetadata Uses

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 Uses

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 Uses

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 ImportStorageDetails Uses

type ImportStorageDetails struct {
    // StorageTag contains the string representation of the storage tag
    // assigned to the imported storage entity.
    StorageTag string `json:"storage-tag"`
}

ImportStorageDetails contains the details of an imported storage entity.

type ImportStorageParams Uses

type ImportStorageParams struct {
    // Kind is the kind of the storage entity to import.
    Kind StorageKind `json:"kind"`

    // Pool is the name of the storage pool into which the storage is to
    // be imported.
    Pool string `json:"pool"`

    // ProviderId is the storage provider's unique ID for the storage,
    // e.g. the EBS volume ID.
    ProviderId string `json:"provider-id"`

    // StorageName is the name of the storage to assign to the entity.
    StorageName string `json:"storage-name"`
}

ImportStorageParams contains the parameters for importing a storage entity.

type ImportStorageResult Uses

type ImportStorageResult struct {
    Result *ImportStorageDetails `json:"result,omitempty"`
    Error  *Error                `json:"error,omitempty"`
}

ImportStorageResult contains the result of importing a storage entity.

type ImportStorageResults Uses

type ImportStorageResults struct {
    Results []ImportStorageResult `json:"results"`
}

ImportStorageResults contains the results of importing a collection of storage entities.

type IngressNetworksChangeEvent Uses

type IngressNetworksChangeEvent struct {
    // RelationToken is the token of the relation.
    RelationToken string `json:"relation-token"`

    // ApplicationToken is the token of the application.
    ApplicationToken string `json:"application-token"`

    // Networks are the CIDRs for which ingress is required.
    Networks []string `json:"networks,omitempty"`

    // IngressRequired is true if ingress is needed, otherwise
    // ingress should be disabled.
    IngressRequired bool `json:"ingress-required"`

    // Macaroons are used for authentication.
    Macaroons macaroon.Slice `json:"macaroons,omitempty"`
}

type IngressNetworksChanges Uses

type IngressNetworksChanges struct {
    Changes []IngressNetworksChangeEvent `json:"changes,omitempty"`
}

IngressNetworksChanges holds a set of IngressNetworksChangeEvent structures.

type InitiateMigrationArgs Uses

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

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

type InitiateMigrationResult Uses

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 Uses

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 Uses

type InstanceInfo struct {
    Tag             string                            `json:"tag"`
    InstanceId      instance.Id                       `json:"instance-id"`
    DisplayName     string                            `json:"display-name"`
    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"`
    CharmProfiles []string        `json:"charm-profiles"`
}

InstanceInfo holds information about an instance. Instances are typically virtual machines hosted by a cloud provider but may also be a container.

The InstanceInfo struct contains three categories of information:

- interal data, as the machine's tag and the tags of any attached
  storage volumes
- naming and other provider-specific information, including the
  instance id and display name
- configuration information, including its attached storage volumes,
  charm profiles and networking

type InstanceType Uses

type InstanceType struct {
    Name         string   `json:"name,omitempty"`
    Arches       []string `json:"arches"`
    CPUCores     int      `json:"cpu-cores"`
    Memory       int      `json:"memory"`
    RootDiskSize int      `json:"root-disk,omitempty"`
    VirtType     string   `json:"virt-type,omitempty"`
    Deprecated   bool     `json:"deprecated,omitempty"`
    Cost         int      `json:"cost,omitempty"`
}

InstanceType represents an available instance type in a cloud.

type InstanceTypesResult Uses

type InstanceTypesResult struct {
    InstanceTypes []InstanceType `json:"instance-types,omitempty"`
    CostUnit      string         `json:"cost-unit,omitempty"`
    CostCurrency  string         `json:"cost-currency,omitempty"`
    // CostDivisor Will be present only when the Cost is not expressed in CostUnit.
    CostDivisor uint64 `json:"cost-divisor,omitempty"`
    Error       *Error `json:"error,omitempty"`
}

InstanceTypesResult contains the result of prompting a cloud for its instance types.

type InstanceTypesResults Uses

type InstanceTypesResults struct {
    Results []InstanceTypesResult `json:"results"`
}

InstanceTypesResults contains the bulk result of prompting a cloud for its instance types.

type InstancesInfo Uses

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

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

type IntResult Uses

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 Uses

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 InterfaceAddress Uses

type InterfaceAddress struct {
    Hostname string `json:"hostname"`
    Address  string `json:"value"`
    CIDR     string `json:"cidr"`
}

InterfaceAddress represents a single address attached to the interface.

type InvalidateCredentialArg Uses

type InvalidateCredentialArg struct {
    // Reason is the description of why we are invalidating credential.
    Reason string `json:"reason,omitempty"`
}

InvalidateCredentialArg is used to invalidate a controller credential.

type IsMasterResult Uses

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 Uses

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

IsMeteredResult stores result from a charms.IsMetered call

type IssueOperatorCertificateResult Uses

type IssueOperatorCertificateResult struct {
    CACert     string `json:"ca-cert"`
    Cert       string `json:"cert"`
    PrivateKey string `json:"private-key"`
    Error      *Error `json:"error,omitempty"`
}

IssueOperatorCertificateResult contains an x509 certificate for a CAAS Operator.

type IssueOperatorCertificateResults Uses

type IssueOperatorCertificateResults struct {
    Results []IssueOperatorCertificateResult `json:"results"`
}

IssueOperatorCertificateResults holds IssueOperatorCertificate results.

type JobsResult Uses

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 Uses

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

JobsResults holds the result of a call to Jobs.

type KnownServiceArgs Uses

type KnownServiceArgs struct {
    // KnownServices are the well known services for a firewall rule.
    KnownServices []KnownServiceValue `json:"known-services"`
}

KnownServiceArgs holds the parameters for retrieving firewall rules.

type KnownServiceValue Uses

type KnownServiceValue string

KnownServiceValue describes a well known service for which a firewall rule can be set up.

const (

    // SSHRule is a rule for SSH connections.
    SSHRule KnownServiceValue = "ssh"

    // JujuControllerRule is a rule for connections to the Juju controller.
    JujuControllerRule KnownServiceValue = "juju-controller"

    // JujuApplicationOfferRule is a rule for connections to a Juju offer.
    JujuApplicationOfferRule KnownServiceValue = "juju-application-offer"
)

func (KnownServiceValue) Validate Uses

func (v KnownServiceValue) Validate() error

Validate returns an error if the service value is not valid.

type KubernetesDeploymentInfo Uses

type KubernetesDeploymentInfo struct {
    DeploymentType string `json:"deployment-type"`
    ServiceType    string `json:"service-type"`
}

KubernetesDeploymentInfo holds deployment info from charm metadata.

type KubernetesDeviceParams Uses

type KubernetesDeviceParams struct {
    Type       DeviceType        `bson:"type"`
    Count      int64             `bson:"count"`
    Attributes map[string]string `bson:"attributes,omitempty"`
}

KubernetesDeviceParams holds a set of device constraints.

type KubernetesFilesystemAttachmentParams Uses

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

KubernetesFilesystemAttachmentParams holds the parameters for creating a filesystem attachment.

type KubernetesFilesystemInfo Uses

type KubernetesFilesystemInfo struct {
    StorageName  string                 `json:"storagename"`
    Pool         string                 `json:"pool"`
    Size         uint64                 `json:"size"`
    MountPoint   string                 `json:"mount-point,omitempty"`
    ReadOnly     bool                   `json:"read-only,omitempty"`
    FilesystemId string                 `json:"filesystem-id"`
    Status       string                 `json:"status"`
    Info         string                 `json:"info"`
    Data         map[string]interface{} `json:"data,omitempty"`
    Volume       KubernetesVolumeInfo   `json:"volume"`
}

KubernetesFilesystemInfo describes a storage filesystem in the cloud as reported to the model.

type KubernetesFilesystemParams Uses

type KubernetesFilesystemParams struct {
    StorageName string                                `json:"storagename"`
    Size        uint64                                `json:"size"`
    Provider    string                                `json:"provider"`
    Attributes  map[string]interface{}                `json:"attributes,omitempty"`
    Tags        map[string]string                     `json:"tags,omitempty"`
    Attachment  *KubernetesFilesystemAttachmentParams `json:"attachment,omitempty"`
}

KubernetesFilesystemParams holds the parameters for creating a storage filesystem.

type KubernetesProvisioningInfo Uses

type KubernetesProvisioningInfo struct {
    DeploymentInfo *KubernetesDeploymentInfo    `json:"deployment-info,omitempty"`
    PodSpec        string                       `json:"pod-spec"`
    Constraints    constraints.Value            `json:"constraints"`
    Tags           map[string]string            `json:"tags,omitempty"`
    Filesystems    []KubernetesFilesystemParams `json:"filesystems,omitempty"`
    Volumes        []KubernetesVolumeParams     `json:"volumes,omitempty"`
    Devices        []KubernetesDeviceParams     `json:"devices,omitempty"`
}

KubernetesProvisioningInfo holds unit provisioning info.

type KubernetesProvisioningInfoResult Uses

type KubernetesProvisioningInfoResult struct {
    Error  *Error                      `json:"error,omitempty"`
    Result *KubernetesProvisioningInfo `json:"result"`
}

KubernetesProvisioningInfoResult holds unit provisioning info or an error.

type KubernetesProvisioningInfoResults Uses

type KubernetesProvisioningInfoResults struct {
    Results []KubernetesProvisioningInfoResult `json:"results"`
}

KubernetesProvisioningInfoResults holds multiple provisioning info results.

type KubernetesUpgradeArg Uses

type KubernetesUpgradeArg struct {
    AgentTag string         `json:"agent-tag"`
    Version  version.Number `json:"version"`
}

KubernetesUpgradeArg holds args used to upgrade an operator.

type KubernetesVolumeAttachmentParams Uses

type KubernetesVolumeAttachmentParams struct {
    Provider string `json:"provider"`
    ReadOnly bool   `json:"read-only,omitempty"`
}

KubernetesVolumeAttachmentParams holds the parameters for creating a volume attachment.

type KubernetesVolumeInfo Uses

type KubernetesVolumeInfo struct {
    VolumeId   string                 `json:"volume-id"`
    Pool       string                 `json:"pool,omitempty"`
    Size       uint64                 `json:"size"`
    Persistent bool                   `json:"persistent"`
    Status     string                 `json:"status"`
    Info       string                 `json:"info"`
    Data       map[string]interface{} `json:"data,omitempty"`
}

Volume describes a storage volume in the cloud as reported to the model.

type KubernetesVolumeParams Uses

type KubernetesVolumeParams struct {
    StorageName string                            `json:"storagename"`
    Size        uint64                            `json:"size"`
    Provider    string                            `json:"provider"`
    Attributes  map[string]interface{}            `json:"attributes,omitempty"`
    Tags        map[string]string                 `json:"tags,omitempty"`
    Attachment  *KubernetesVolumeAttachmentParams `json:"attachment,omitempty"`
}

KubernetesVolumeParams holds the parameters for creating a storage volume.

type LXDProfile Uses

type LXDProfile struct {
    Config      map[string]string            `json:"config"`
    Description string                       `json:"description"`
    Devices     map[string]map[string]string `json:"devices"`
}

LXDProfile holds status info about a LXDProfile

type LXDProfileUpgrade Uses

type LXDProfileUpgrade struct {
    Entities        []Entity `json:"entities"`
    ApplicationName string   `json:"application-name"`
}

LXDProfileUpgrade holds the parameters for an application lxd profile machines

type Life Uses

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 Uses

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 Uses

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

LifeResults holds the life or error status of multiple entities.

type ListCloudImageMetadataResult Uses

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

ListCloudImageMetadataResult holds the results of querying cloud image metadata.

type ListCloudInfo Uses

type ListCloudInfo struct {
    CloudDetails `json:",inline"`

    // Access is the access level for the user.
    Access string `json:"user-access"`
}

ListCloudInfo holds information about a cloud for a user.

type ListCloudInfoResult Uses

type ListCloudInfoResult struct {
    Result *ListCloudInfo `json:"result,omitempty"`
    Error  *Error         `json:"error,omitempty"`
}

ListCloudInfoResult holds the result of a ListCloudInfo call.

type ListCloudInfoResults Uses

type ListCloudInfoResults struct {
    Results []ListCloudInfoResult `json:"results"`
}

ListCloudInfoResults holds the result of a bulk ListCloudInfo call.

type ListCloudsRequest Uses

type ListCloudsRequest struct {
    UserTag string `json:"user-tag"`
    All     bool   `json:"all,omitempty"`
}

ListCloudsRequest encapsulates how we request a list of cloud details for a user.

type ListFirewallRulesResults Uses

type ListFirewallRulesResults struct {
    // Rules is a list of firewall rules.
    Rules []FirewallRule
}

ListFirewallRulesResults holds the results of listing firewall rules.

type ListImageResult Uses

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

ListImageResult holds the results of querying images.

type ListResourcesArgs Uses

type ListResourcesArgs Entities

ListResourcesArgs are the arguments for the ListResources endpoint.

type ListSSHKeys Uses

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

ListSSHKeys stores parameters used for a KeyManager.ListKeys call.

type ListSpacesResults Uses

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

ListSpacesResults holds the list of all available spaces.

type ListSubnetsResults Uses

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

ListSubnetsResults holds the result of a ListSubnets API call.

type ListUnitResourcesArgs Uses

type ListUnitResourcesArgs struct {
    // ResourceNames holds the names of the application's resources for
    // which information should be provided.
    ResourceNames []string `json:"resource-names"`
}

ListResourcesArgs holds the arguments for an API request to list resources for an application. The application is implicit to the uniter- specific HTTP connection.

type LogForwardingGetLastSentParams Uses

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 Uses

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 Uses

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 Uses

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 Uses

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 Uses

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 Uses

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 Uses

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

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 Uses

type LogStreamConfig struct {
    // 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 Uses

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 Uses

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

LogStreamRecord contains a slice of LogStreamRecords.

type LoginRequest Uses

type LoginRequest struct {
    AuthTag     string           `json:"auth-tag"`
    Credentials string           `json:"credentials"`
    Nonce       string           `json:"nonce"`
    Macaroons   []macaroon.Slice `json:"macaroons"`
    CLIArgs     string           `json:"cli-args,omitempty"`
    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 LoginResult will contain a macaroon that when discharged, may allow access.

type LoginRequestCompat Uses

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 Uses

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 explicitly
    // 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"`

    // PublicDNSName holds the host name for which an officially
    // signed certificate will be used for TLS connection to the server.
    // If empty, the private Juju CA certificate must be used to verify
    // the connection.
    PublicDNSName string `json:"public-dns-name,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 LookUpPayloadArg Uses

type LookUpPayloadArg struct {
    // Name is the payload name.
    Name string `json:"name"`

    // ID uniquely identifies the payload for the given name.
    ID  string `json:"id"`
}

LookUpPayloadArg contains all the information necessary to identify a payload.

type LookUpPayloadArgs Uses

type LookUpPayloadArgs struct {
    // Args is the list of arguments to pass to this function.
    Args []LookUpPayloadArg `json:"args"`
}

LookUpPayloadArgs are the arguments for the LookUp endpoint.

type MacaroonResult Uses

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

MacaroonResult contains a macaroon or an error.

type MacaroonResults Uses

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

MacaroonResults contains a set of MacaroonResults.

type MachineAddresses Uses

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

MachineAddresses holds an machine tag and addresses.

type MachineAddressesResult Uses

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

MachineAddressesResult holds a list of machine addresses or an error.

type MachineAddressesResults Uses

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 Uses

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 MachineContainerResult Uses

type MachineContainerResult struct {
    Error          *Error                   `json:"error,omitempty"`
    ContainerTypes []instance.ContainerType `json:"container-types"`
    Determined     bool                     `json:"determined"`
}

MachineContainerResult holds the result of making the call to SupportedContainers on a given machine.

type MachineContainerResults Uses

type MachineContainerResults struct {
    Results []MachineContainerResult `json:"results"`
}

MachineContainerResults holds the results from making the call to SupportedContainers on a given machine.

type MachineContainers Uses

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 Uses

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

MachineContainersParams holds the arguments for making a SetSupportedContainers API call.

type MachineHardware Uses

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 Uses

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 Uses

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

MachineNetworkConfigResults holds network configuration for multiple machines.

type MachinePortRange Uses

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 Uses

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 Uses

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

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

type MachinePortsResult Uses

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 Uses

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

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

type MachineStatus Uses

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

    DNSName string `json:"dns-name"`

    // IPAddresses holds the IP addresses known for this machine. It is
    // here for backwards compatibility. It should be similar to its
    // namesakes in NetworkInterfaces, but may also include any
    // public/floating IP addresses not actually bound to the machine but
    // known to the provider.
    IPAddresses []string `json:"ip-addresses,omitempty"`

    // InstanceId holds the unique identifier for this machine, based on
    // what is supplied by the provider.
    InstanceId instance.Id `json:"instance-id"`

    // DisplayName is a human-readable name for this machine.
    DisplayName string `json:"display-name"`

    // Series holds the name of the operating system release installed on
    // this machine.
    Series string `json:"series"`

    // Id is the Juju identifier for this machine in this model.
    Id  string `json:"id"`

    // NetworkInterfaces holds a map of NetworkInterface for this machine.
    NetworkInterfaces map[string]NetworkInterface `json:"network-interfaces,omitempty"`

    // Containers holds the MachineStatus of any containers hosted on this
    // machine.
    Containers map[string]MachineStatus `json:"containers"`

    // Constraints holds a string of space-separated key=value pairs for
    // each constraint datum.
    Constraints string `json:"constraints"`

    // Hardware holds a string of space-separated key=value pairs for each
    // hardware specification datum.
    Hardware string `json:"hardware"`

    Jobs      []multiwatcher.MachineJob `json:"jobs"`
    HasVote   bool                      `json:"has-vote"`
    WantsVote bool                      `json:"wants-vote"`

    // LXDProfiles holds all the machines current LXD profiles that have
    // been applied to the machine
    LXDProfiles map[string]LXDProfile `json:"lxd-profiles,omitempty"`
}

MachineStatus holds status info about a machine.

type MachineStorageId Uses

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 Uses

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

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

type MachineStorageIdsWatchResult Uses

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 Uses

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 Uses

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

MapResult holds a generic map or an error.

type MapResults Uses

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 Uses

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 Uses

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 Uses

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

    // UnitTag is the unit for which you want to merge
    // leadership settings.
    UnitTag string `json:"unit-tag,omitempty"`

    // 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 Uses

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

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

type MetadataSaveParams Uses

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 Uses

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

MeterStatus represents the meter status of a unit.

type MeterStatusParam Uses

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 Uses

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

MeterStatusParams holds parameters for making SetMeterStatus calls.

type MeterStatusResult Uses

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 Uses

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

MeterStatusResults holds meter status results for multiple units.

type Metric Uses

type Metric struct {
    Key    string            `json:"key"`
    Value  string            `json:"value"`
    Time   time.Time         `json:"time"`
    Labels map[string]string `json:"labels,omitempty"`
}

Metric holds a single metric.

type MetricBatch Uses

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 Uses

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

MetricBatchParam contains a single metric batch.

type MetricBatchParams Uses

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

MetricBatchParams contains multiple metric batches.

type MetricResult Uses

type MetricResult struct {
    Time   time.Time         `json:"time"`
    Key    string            `json:"key"`
    Value  string            `json:"value"`
    Unit   string            `json:"unit"`
    Labels map[string]string `json:"labels"`
}

MetricResult contains a single metric.

type MetricResults Uses

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 Uses

func (m *MetricResults) OneError() error

OneError returns the first error

type MetricsParam Uses

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

MetricsParam contains the metrics for a single unit.

type MetricsParams Uses

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

MetricsParams contains the metrics for multiple units.

type MigrationModelInfo Uses

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

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

type MigrationSpec Uses

type MigrationSpec struct {
    ModelTag   string              `json:"model-tag"`
    TargetInfo MigrationTargetInfo `json:"target-info"`
}

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

type MigrationStatus Uses

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

    // 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 Uses

type MigrationTargetInfo struct {
    ControllerTag   string   `json:"controller-tag"`
    ControllerAlias string   `json:"controller-alias,omitempty"`
    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 Uses

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 Uses

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 Uses

type Model struct {
    Name     string `json:"name"`
    UUID     string `json:"uuid"`
    Type     string `json:"type"`
    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 ModelAccess Uses

type ModelAccess struct {
    Model  string `json:"model,omitempty"`
    Access string `json:"access,omitempty"`
}

ModelAccess contains information about user model access.

type ModelAction Uses

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 Uses

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

ModelArgs wraps a simple model tag.

type ModelBlockInfo Uses

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 Uses

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

ModelBlockInfoList holds information about the blocked models for a controller.

type ModelConfig Uses

type ModelConfig map[string]interface{}

ModelConfig holds a model configuration.

type ModelConfigResult Uses

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

ModelConfigResult holds model configuration.

type ModelConfigResults Uses

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

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

type ModelCreateArgs Uses

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 ModelCredential Uses

type ModelCredential struct {
    // Model is a tag for the model.
    Model string `json:"model-tag"`

    // Exists indicates whether credential was set on the model.
    // It is valid for model not to have a credential if it is on the
    // cloud that does not require auth.
    Exists bool `json:"exists,omitempty"`

    // CloudCredential is the tag for the cloud credential that the model uses.
    CloudCredential string `json:"credential-tag"`

    // Valid stores whether this credential is valid, for example, not expired,
    // and whether this credential works for this model, i.e. all model
    // machines can be accessed with this credential.
    Valid bool `json:"valid,omitempty"`
}

ModelCredential stores information about cloud credential that a model uses: what credential is being used, is it valid for this model, etc.

type ModelDefaultValues Uses

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 Uses

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 Uses

type ModelDefaultsResult struct {
    Config map[string]ModelDefaults `json:"config"`
    Error  *Error                   `json:"error,omitempty"`
}

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

type ModelDefaultsResults Uses

type ModelDefaultsResults struct {
    Results []ModelDefaultsResult `json:"results"`
}

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

type ModelEntityCount Uses

type ModelEntityCount struct {
    Entity CountedEntity `json:"entity"`
    Count  int64         `json:"count"`
}

ModelEntityCount represent a count for a model entity where entities could be machines, units, etc...

type ModelFilesystemInfo Uses

type ModelFilesystemInfo struct {
    Id         string `json:"id"`
    ProviderId string `json:"provider-id,omitempty"`
    Status     string `json:"status,omitempty"`
    Message    string `json:"message,omitempty"`
    Detachable bool   `json:"detachable,omitempty"`
}

ModelFilesystemInfo holds information about a filesystem in a model.

type ModelInfo Uses

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

    // CloudCredentialValidity contains if model credential is valid, if known.
    CloudCredentialValidity *bool `json:"cloud-credential-validity,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,omitempty"`

    // 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"`

    // Migration contains information about the latest failed or
    // currently-running migration. It'll be nil if there isn't one.
    Migration *ModelMigrationStatus `json:"migration,omitempty"`

    // SLA contains the information about the SLA for the model, if set.
    SLA *ModelSLAInfo `json:"sla"`

    // AgentVersion is the agent version for this model.
    AgentVersion *version.Number `json:"agent-version"`
}

ModelInfo holds information about the Juju model.

type ModelInfoList Uses

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

ModelInfoList holds a list of ModelInfo structures.

type ModelInfoListResult Uses

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 Uses

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

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

type ModelInfoResult Uses

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

ModelInfoResult holds the result of a ModelInfo call.

type ModelInfoResults Uses

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

ModelInfoResults holds the result of a bulk ModelInfo call.

type ModelInstanceTypesConstraint Uses

type ModelInstanceTypesConstraint struct {
    // Value, if specified, contains the constraints to filter
    // the instance types by. If Value is not specified, then
    // no filtering by constraints will take place: all instance
    // types supported by the region will be returned.
    Value *constraints.Value `json:"value,omitempty"`
}

ModelInstanceTypesConstraint contains a constraint applied when filtering instance types.

type ModelInstanceTypesConstraints Uses

type ModelInstanceTypesConstraints struct {
    // Constraints, if specified, contains the constraints to filter
    // the instance types by. If Constraints is not specified, then
    // no filtering by constraints will take place: all instance
    // types supported by the model will be returned.
    Constraints []ModelInstanceTypesConstraint `json:"constraints"`
}

ModelInstanceTypesConstraints contains a slice of InstanceTypesConstraint.

type ModelMachineInfo Uses

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

ModelMachineInfo holds information about a machine in a model.

type ModelMigrationStatus Uses

type ModelMigrationStatus struct {
    Status string     `json:"status"`
    Start  *time.Time `json:"start"`
    End    *time.Time `json:"end,omitempty"`
}

ModelMigrationStatus holds information about the progress of a (possibly failed) migration.

type ModelResult Uses

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

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

type ModelSLA Uses

type ModelSLA struct {
    ModelSLAInfo
    Credentials []byte `json:"creds"`
}

ModelSLA contains the arguments for the SetSLALevel client API call.

type ModelSLAInfo Uses

type ModelSLAInfo struct {
    Level string `json:"level"`
    Owner string `json:"owner"`
}

ModelSLAInfo describes the SLA info for a model.

type ModelSequencesResult Uses

type ModelSequencesResult struct {
    Sequences map[string]int `json:"sequences"`
}

ModelSequencesResult holds the map of sequence names to next value.

type ModelSet Uses

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

ModelSet contains the arguments for ModelSet client API call.

type ModelStatus Uses

type ModelStatus struct {
    ModelTag           string                `json:"model-tag"`
    Life               Life                  `json:"life"`
    Type               string                `json:"type"`
    HostedMachineCount int                   `json:"hosted-machine-count"`
    ApplicationCount   int                   `json:"application-count"`
    UnitCount          int                   `json:"unit-count"`
    OwnerTag           string                `json:"owner-tag"`
    Machines           []ModelMachineInfo    `json:"machines,omitempty"`
    Volumes            []ModelVolumeInfo     `json:"volumes,omitempty"`
    Filesystems        []ModelFilesystemInfo `json:"filesystems,omitempty"`
    Error              *Error                `json:"error,omitempty"`
}

ModelStatus holds information about the status of a juju model.

type ModelStatusInfo Uses

type ModelStatusInfo struct {
    Name             string         `json:"name"`
    Type             string         `json:"type"`
    CloudTag         string         `json:"cloud-tag"`
    CloudRegion      string         `json:"region,omitempty"`
    Version          string         `json:"version"`
    AvailableVersion string         `json:"available-version"`
    ModelStatus      DetailedStatus `json:"model-status"`
    MeterStatus      MeterStatus    `json:"meter-status"`
    SLA              string         `json:"sla"`
}

ModelStatusInfo holds status information about the model itself.

type ModelStatusResults Uses

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

ModelStatusResults holds status information about a group of models.

type ModelSummariesRequest Uses

type ModelSummariesRequest struct {
    UserTag string `json:"user-tag"`
    All     bool   `json:"all,omitempty"`
}

ModelSummariesRequest encapsulates how we request a list of model summaries.

type ModelSummary Uses

type ModelSummary struct {
    Name               string `json:"name"`
    UUID               string `json:"uuid"`
    Type               string `json:"type"`
    ControllerUUID     string `json:"controller-uuid"`
    IsController       bool   `json:"is-controller"`
    ProviderType       string `json:"provider-type,omitempty"`
    DefaultSeries      string `json:"default-series,omitempty"`
    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,omitempty"`

    // UserAccess is model access level for the  current user.
    UserAccess UserAccessPermission `json:"user-access"`

    // UserLastConnection contains the time when current user logged in
    // into the model last.
    UserLastConnection *time.Time `json:"last-connection"`

    // Counts contains counts of interesting entities
    // in the model, for example machines, cores, containers, units, etc.
    Counts []ModelEntityCount `json:"counts"`

    // Migration contains information about the latest failed or
    // currently-running migration. It'll be nil if there isn't one.
    Migration *ModelMigrationStatus `json:"migration,omitempty"`

    // SLA contains the information about the SLA for the model, if set.
    SLA *ModelSLAInfo `json:"sla"`

    // AgentVersion is the agent version for this model.
    AgentVersion *version.Number `json:"agent-version"`
}

ModelSummary holds summary about a Juju model.

type ModelSummaryResult Uses

type ModelSummaryResult struct {
    Result *ModelSummary `json:"result,omitempty"`
    Error  *Error        `json:"error,omitempty"`
}

ModelSummaryResult holds the result of a ListModelsWithInfo call.

type ModelSummaryResults Uses

type ModelSummaryResults struct {
    Results []ModelSummaryResult `json:"results"`
}

ModelSummaryResults holds the result of a bulk ListModelsWithInfo call.

type ModelUnset Uses

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

ModelUnset contains the arguments for ModelUnset client API call.

type ModelUnsetKeys Uses

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 Uses

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 Uses

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

ModelUserInfoResult holds the result of an ModelUserInfo call.

type ModelUserInfoResults Uses

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

ModelUserInfoResults holds the result of a bulk ModelUserInfo API call.

type ModelVolumeInfo Uses

type ModelVolumeInfo struct {
    Id         string `json:"id"`
    ProviderId string `json:"provider-id,omitempty"`
    Status     string `json:"status,omitempty"`
    Message    string `json:"message,omitempty"`
    Detachable bool   `json:"detachable,omitempty"`
}

ModelVolumeInfo holds information about a volume in a model.

type ModifyCloudAccess Uses

type ModifyCloudAccess struct {
    UserTag  string      `json:"user-tag"`
    CloudTag string      `json:"cloud-tag"`
    Action   CloudAction `json:"action"`
    Access   string      `json:"access"`
}

ModifyCloudAccess defines an operation to modify cloud access.

type ModifyCloudAccessRequest Uses

type ModifyCloudAccessRequest struct {
    Changes []ModifyCloudAccess `json:"changes"`
}

ModifyCloudAccessRequest holds the parameters for making grant and revoke cloud calls.

type ModifyControllerAccess Uses

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

type ModifyControllerAccessRequest Uses

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

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

type ModifyModelAccess Uses

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

type ModifyModelAccessRequest Uses

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

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

type ModifyOfferAccess Uses

type ModifyOfferAccess struct {
    UserTag  string                `json:"user-tag"`
    Action   OfferAction           `json:"action"`
    Access   OfferAccessPermission `json:"access"`
    OfferURL string                `json:"offer-url"`
}

ModifyOfferAccess contains parameters to grant and revoke access to an offer.

type ModifyOfferAccessRequest Uses

type ModifyOfferAccessRequest struct {
    Changes []ModifyOfferAccess `json:"changes"`
}

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

type ModifyUserSSHKeys Uses

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 MongoVersion Uses

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

type NetworkConfig Uses

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 packets 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"`

    // ProviderNetworkId is a provider-specific id for the network this
    // interface is part of.
    ProviderNetworkId string `json:"provider-network-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, 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"`

    // Routes is a list of routes that should be applied when this interface is
    // active.
    Routes []NetworkRoute `json:"routes,omitempty"`

    // IsDefaultGateway marks an interface that is a default gateway for a machine.
    IsDefaultGateway bool `json:"is-default-gateway,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 NetworkInfo Uses

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

    // 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"`

    // Addresses contains a list of addresses configured on the interface.
    Addresses []InterfaceAddress `json:"addresses"`
}

NetworkInfo describes one interface with IP addresses.

type NetworkInfoParams Uses

type NetworkInfoParams struct {
    Unit       string   `json:"unit"`
    RelationId *int     `json:"relation-id,omitempty"`
    Endpoints  []string `json:"bindings"`
}

NetworkInfoParams holds a name of the unit and list of bindings for which we want to get NetworkInfos.

type NetworkInfoResult Uses

type NetworkInfoResult struct {
    Error            *Error        `json:"error,omitempty" yaml:"error,omitempty"`
    Info             []NetworkInfo `json:"bind-addresses,omitempty" yaml:"bind-addresses,omitempty"`
    EgressSubnets    []string      `json:"egress-subnets,omitempty" yaml:"egress-subnets,omitempty"`
    IngressAddresses []string      `json:"ingress-addresses,omitempty" yaml:"ingress-addresses,omitempty"`
}

NetworkInfoResult Adds egress and ingress subnets and changes the serialized `Info` key name in the yaml/json API protocol.

type NetworkInfoResultV6 Uses

type NetworkInfoResultV6 struct {
    Error *Error        `json:"error,omitempty" yaml:"error,omitempty"`
    Info  []NetworkInfo `json:"network-info" yaml:"info"`
}

NetworkInfoResultV6 holds either and error or a list of NetworkInfos for given binding.

type NetworkInfoResults Uses

type NetworkInfoResults struct {
    Results map[string]NetworkInfoResult `json:"results"`
}

NetworkInfoResults holds a mapping from binding name to NetworkInfoResult.

type NetworkInfoResultsV6 Uses

type NetworkInfoResultsV6 struct {
    Results map[string]NetworkInfoResultV6 `json:"results"`
}

NetworkInfoResults holds a mapping from binding name to NetworkInfoResultV6.

type NetworkInterface Uses

type NetworkInterface struct {
    // IPAddresses holds the IP addresses bound to this machine.
    IPAddresses    []string `json:"ip-addresses"`
    MACAddress     string   `json:"mac-address"`
    Gateway        string   `json:"gateway,omitempty"`
    DNSNameservers []string `json:"dns-nameservers,omitempty"`

    // Space holds the name of a space in which this devices IP addr's
    // subnet belongs.
    Space string `json:"space,omitempty"`

    // Is this interface up?
    IsUp bool `json:"is-up"`
}

NetworkInterfaceStatus holds a /etc/network/interfaces-type data and the space name for any device with at least one associated IP address.

type NetworkRoute Uses

type NetworkRoute struct {
    // DestinationCIDR is the Subnet CIDR of traffic that needs a custom route.
    DestinationCIDR string `json:"destination-cidr"`
    // GatewayIP is the target IP to use as the next-hop when sending traffic to DestinationCIDR
    GatewayIP string `json:"gateway-ip"`
    // Metric is the cost for this particular route.
    Metric int `json:"metric"`
}

NetworkRoute describes a special route that should be added for a given network interface.

type NotifyWatchResult Uses

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

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

type NotifyWatchResults Uses

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

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

type OfferAccessPermission Uses

type OfferAccessPermission string

OfferAccessPermission defines a type for an access permission on an offer.

const (
    OfferAdminAccess   OfferAccessPermission = "admin"
    OfferConsumeAccess OfferAccessPermission = "consume"
    OfferReadAccess    OfferAccessPermission = "read"
)

Access permissions that may be set on an offer.

type OfferAction Uses

type OfferAction string

OfferAction is an action that can be performed on an offer.

const (
    GrantOfferAccess  OfferAction = "grant"
    RevokeOfferAccess OfferAction = "revoke"
)

Actions that can be preformed on an offer.

type OfferArg Uses

type OfferArg struct {
    OfferUUID string         `json:"offer-uuid"`
    Macaroons macaroon.Slice `json:"macaroons,omitempty"`
}

OfferArg holds an offer uuid and corresponding macaroons.

type OfferArgs Uses

type OfferArgs struct {
    Args []OfferArg `json:"args"`
}

OfferArgs holds arguments to an API call dealing with offers.

type OfferConnection Uses

type OfferConnection struct {
    SourceModelTag string       `json:"source-model-tag"`
    RelationId     int          `json:"relation-id"`
    Username       string       `json:"username"`
    Endpoint       string       `json:"endpoint"`
    Status         EntityStatus `json:"status"`
    IngressSubnets []string     `json:"ingress-subnets"`
}

OfferConnection holds details about a connection to an offer.

type OfferFilter Uses

type OfferFilter struct {
    // OwnerName is the owner of the model hosting the offer.
    OwnerName string `json:"owner-name"`

    // ModelName is the name of the model hosting the offer.
    ModelName string `json:"model-name"`

    OfferName              string                     `json:"offer-name"`
    ApplicationName        string                     `json:"application-name"`
    ApplicationDescription string                     `json:"application-description"`
    ApplicationUser        string                     `json:"application-user"`
    Endpoints              []EndpointFilterAttributes `json:"endpoints"`
    ConnectedUserTags      []string                   `json:"connected-users"`
    AllowedConsumerTags    []string                   `json:"allowed-users"`
}

OfferFilter is used to query offers.

type OfferFilters Uses

type OfferFilters struct {
    Filters []OfferFilter
}

OfferFilters is used to query offers. Offers matching any of the filters are returned.

type OfferStatusChange Uses

type OfferStatusChange struct {
    // OfferName is the name of the offer.
    OfferName string `json:"offer-name"`

    // Status is the status of the offer.
    Status EntityStatus `json:"status"`
}

OfferStatusChange describes the status of an offer.

type OfferStatusWatchResult Uses

type OfferStatusWatchResult struct {
    OfferStatusWatcherId string              `json:"watcher-id"`
    Changes              []OfferStatusChange `json:"changes"`
    Error                *Error              `json:"error,omitempty"`
}

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

type OfferStatusWatchResults Uses

type OfferStatusWatchResults struct {
    Results []OfferStatusWatchResult `json:"results"`
}

OfferStatusWatchResults holds the results for any API call which ends up returning a list of OfferStatusWatchers.

type OfferURLs Uses

type OfferURLs struct {
    // OfferURLs contains collection of urls for applications that are to be shown.
    OfferURLs []string `json:"offer-urls,omitempty"`
}

OfferURLs is a collection of remote offer URLs

type OfferUserDetails Uses

type OfferUserDetails struct {
    UserName    string `json:"user"`
    DisplayName string `json:"display-name"`
    Access      string `json:"access"`
}

OfferUserDetails represents an offer consumer and their permission on the offer.

type OperatorProvisioningInfo Uses

type OperatorProvisioningInfo struct {
    ImagePath    string                     `json:"image-path"`
    Version      version.Number             `json:"version"`
    APIAddresses []string                   `json:"api-addresses"`
    Tags         map[string]string          `json:"tags,omitempty"`
    CharmStorage KubernetesFilesystemParams `json:"charm-storage"`
}

OperatorProvisioningInfo holds info need to provision an operator.

type Payload Uses

type Payload struct {
    // Class is the name of the payload class.
    Class string `json:"class"`

    // Type is the name of the payload type.
    Type string `json:"type"`

    // ID is a unique string identifying the payload to
    // the underlying technology.
    ID  string `json:"id"`

    // Status is the Juju-level status for the payload.
    Status string `json:"status"`

    // Labels are labels associated with the payload.
    Labels []string `json:"labels"`

    // Unit identifies the unit tag associated with the payload.
    Unit string `json:"unit"`

    // Machine identifies the machine tag associated with the payload.
    Machine string `json:"machine"`
}

Payload contains full information about a payload.

type PayloadListArgs Uses

type PayloadListArgs struct {
    // Patterns is the list of patterns against which to filter.
    Patterns []string `json:"patterns"`
}

PayloadListArgs are the arguments for the Payloads.List endpoint.

type PayloadListResults Uses

type PayloadListResults struct {
    // Results is the list of payload results.
    Results []Payload `json:"results"`
}

PayloadListResults returns the result of the Payload.List endpoint.

type PayloadResult Uses

type PayloadResult struct {
    Entity

    // Payload holds the details of the payload, if any.
    Payload *Payload `json:"payload"`

    // NotFound indicates that the payload was not found in state.
    NotFound bool `json:"not-found"`

    // Error is the error (if any) for the call referring to ID.
    Error *Error `json:"error,omitempty"`
}

PayloadResult contains the result for a single call.

type PayloadResults Uses

type PayloadResults struct {
    Results []PayloadResult `json:"results"`
}

PayloadResults is the result for a call that makes one or more requests about payloads.

type PhaseResult Uses

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 Uses

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

PhasesResults holds the phase of one or more model migrations.

type PinApplicationResult Uses

type PinApplicationResult struct {
    // ApplicationName is the application for which a leadership pin/unpin
    // operation was attempted.
    ApplicationName string `json:"application-name"`
    // Error will contain a reference to an error resulting from pin/unpin
    // if one occurred.
    Error *Error `json:"error,omitempty"`
}

PinApplicationResult represents the result of a single application leadership pin/unpin operation

type PinApplicationsResults Uses

type PinApplicationsResults struct {
    // Results is collection with each application tag and pin/unpin result.
    Results []PinApplicationResult `json:"results"`
}

PinApplicationsResults returns all applications for which pinning or unpinning was attempted, including any errors that occurred.

type PinnedLeadershipResult Uses

type PinnedLeadershipResult struct {
    // Result has:
    // - Application name keys representing the application pinned.
    // - Tag slice values representing the entities requiring pinned
    //   behaviour for each application.
    Result map[string][]string `json:"result,omitempty"`
}

PinnedLeadershipResults holds data representing the current applications for which leadership is pinned

type Port Uses

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 Uses

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 Uses

func (p Port) NetworkPort() network.Port

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

type PortRange Uses

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 Uses

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 Uses

func (pr PortRange) NetworkPortRange() network.PortRange

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

type PortsResult Uses

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 Uses

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 Uses

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

PrivateAddress holds parameters for the PrivateAddress call.

type PrivateAddressResults Uses

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

PrivateAddressResults holds results of the PrivateAddress call.

type ProfileArg Uses

type ProfileArg struct {
    Entity   Entity `json:"entity"`
    UnitName string `json:"unit-name"`
}

type ProfileArgs Uses

type ProfileArgs struct {
    Args []ProfileArg `json:"args"`
}

type ProfileChangeResult Uses

type ProfileChangeResult struct {
    OldProfileName string           `json:"old-profile-name,omitempty"`
    NewProfileName string           `json:"new-profile-name,omitempty"`
    Profile        *CharmLXDProfile `json:"profile,omitempty"`
    Subordinate    bool             `json:"subordinate,omitempty"`
    Error          *Error           `json:"error,omitempty"`
}

type ProfileChangeResults Uses

type ProfileChangeResults struct {
    Results []ProfileChangeResult `json:"results"`
}

type ProfileInfoResult Uses

type ProfileInfoResult struct {
    ApplicationName string           `json:"application-name,omitempty"`
    Revision        int              `json:"revision,omitempty"`
    Profile         *CharmLXDProfile `json:"profile,omitempty"`
    Error           *Error           `json:"error,omitempty"`
}

type ProviderInterfaceInfo Uses

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 Uses

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 Uses

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

ProviderInterfaceInfoResults holds the results of a GetProviderInterfaceInfo call.

type ProviderSpace Uses

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 Uses

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"`
    VolumeAttachments []VolumeAttachmentParams  `json:"volume-attachments,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"`
    CloudInitUserData map[string]interface{}    `json:"cloudinit-userdata,omitempty"`
    CharmLXDProfiles  []string                  `json:"charm-lxd-profiles,omitempty"`
}

ProvisioningInfo holds machine provisioning info.

type ProvisioningInfoResult Uses

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

ProvisioningInfoResult holds machine provisioning info or an error.

type ProvisioningInfoResults Uses

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

ProvisioningInfoResults holds multiple machine provisioning info results.

type ProvisioningScriptParams Uses

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 Uses

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

ProvisioningScriptResult contains the result of the ProvisioningScript client API call.

type ProxyConfig Uses

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

type ProxyConfigResult Uses

type ProxyConfigResult struct {
    LegacyProxySettings      ProxyConfig `json:"legacy-proxy-settings"`
    JujuProxySettings        ProxyConfig `json:"juju-proxy-settings"`
    APTProxySettings         ProxyConfig `json:"apt-proxy-settings,omitempty"`
    SnapProxySettings        ProxyConfig `json:"snap-proxy-settings,omitempty"`
    SnapStoreProxyId         string      `json:"snap-store-id,omitempty"`
    SnapStoreProxyAssertions string      `json:"snap-store-assertions,omitempty"`
    SnapStoreProxyURL        string      `json:"snap-store-proxy-url,omitempty"`
    Error                    *Error      `json:"error,omitempty"`
}

ProxyConfigResult contains information needed to configure a clients proxy settings

type ProxyConfigResultV1 Uses

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

ProxyConfigResultV1 contains information needed to configure a clients proxy settings. Result for facade v1 call.

type ProxyConfigResults Uses

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

ProxyConfigResults contains information needed to configure multiple clients proxy settings

type ProxyConfigResultsV1 Uses

type ProxyConfigResultsV1 struct {
    Results []ProxyConfigResultV1 `json:"results"`
}

ProxyConfigResultsV1 contains information needed to configure multiple clients proxy settings. Result for facade v1 call.

type PubSubMessage Uses

type PubSubMessage struct {
    Topic string                 `json:"topic"`
    Data  map[string]interface{} `json:"data"`
}

PubSubMessage is used to propagate pubsub messages from one api server to the others.

type PublicAddress Uses

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

PublicAddress holds parameters for the PublicAddress call.

type PublicAddressResults Uses

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

PublicAddressResults holds results of the PublicAddress call.

type QueryApplicationOffersResults Uses

type QueryApplicationOffersResults struct {
    // Results contains application offers matching each filter.
    Results []ApplicationOfferAdminDetails `json:"results"`
}

QueryApplicationOffersResults is a result of searching application offers.

type ReauthRequest Uses

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

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

type RebootAction Uses

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 Uses

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 Uses

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

RebootActionResults holds a list of RebootActionResult and any error.

type RedirectErrorInfo Uses

type RedirectErrorInfo struct {
    // Servers holds the sets of addresses of the redirected servers.
    Servers [][]HostPort `json:"servers"`

    // CACert holds the certificate of the remote server.
    CACert string `json:"ca-cert"`

    // An optional alias for the controller the model migrated to.
    ControllerAlias string `json:"controller-alias,omitempty"`
}

RedirectErrorInfo provides additional information for Redirect errors.

func (RedirectErrorInfo) AsMap Uses

func (e RedirectErrorInfo) AsMap() map[string]interface{}

AsMap encodes the error info as a map that can be attached to an Error.

type RedirectInfoResult Uses

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 Uses

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

RegionDefaults contains the settings for regions in a ModelDefaults.

type RegisterRemoteRelationArg Uses

type RegisterRemoteRelationArg struct {
    // ApplicationToken is the application token on the remote model.
    ApplicationToken string `json:"application-token"`

    // SourceModelTag is the tag of the model hosting the application.
    SourceModelTag string `json:"source-model-tag"`

    // RelationToken is the relation token on the remote model.
    RelationToken string `json:"relation-token"`

    // RemoteEndpoint contains info about the endpoint in the remote model.
    RemoteEndpoint RemoteEndpoint `json:"remote-endpoint"`

    // RemoteSpace contains provider-level info about the space the
    // endpoint is bound to in the remote model.
    RemoteSpace RemoteSpace `json:"remote-space"`

    // OfferUUID is the UUID of the offer.
    OfferUUID string `json:"offer-uuid"`

    // LocalEndpointName is the name of the endpoint in the local model.
    LocalEndpointName string `json:"local-endpoint-name"`

    // Macaroons are used for authentication.
    Macaroons macaroon.Slice `json:"macaroons,omitempty"`
}

RegisterRemoteRelationArg holds attributes used to register a remote relation.

type RegisterRemoteRelationArgs Uses

type RegisterRemoteRelationArgs struct {
    Relations []RegisterRemoteRelationArg `json:"relations"`
}

RegisterRemoteRelationArgs holds args used to add remote relations.

type RegisterRemoteRelationResult Uses

type RegisterRemoteRelationResult struct {
    Result *RemoteRelationDetails `json:"result,omitempty"`
    Error  *Error                 `json:"error,omitempty"`
}

RegisterRemoteRelationResult holds a remote relation details and an error.

type RegisterRemoteRelationResults Uses

type RegisterRemoteRelationResults struct {
    Results []RegisterRemoteRelationResult `json:"results,omitempty"`
}

RemoteRemoteRelationResults has a set of remote relation results.

type RelationApplication Uses

type RelationApplication struct {
    Relation    string `json:"relation"`
    Application string `json:"application"`
}

RelationApplication holds one (relation, application) pair.

type RelationApplications Uses

type RelationApplications struct {
    RelationApplications []RelationApplication `json:"relation-applications"`
}

RelationApplications holds a set of pairs of relation & application tags.

type RelationIds Uses

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

RelationIds holds multiple relation ids.

type RelationLifeSuspendedStatusChange Uses

type RelationLifeSuspendedStatusChange struct {
    // Key is the relation key of the changed relation.
    Key string `json:"key"`

    // Life is the life of the relation.
    Life Life `json:"life"`

    // Suspended is the suspended status of the relation.
    Suspended bool `json:"suspended"`

    // SuspendedReason is an optional message to explain why suspended is true.
    SuspendedReason string `json:"suspended-reason"`
}

RelationLifeSuspendedStatusChange describes the life and suspended status of a relation.

type RelationLifeSuspendedStatusWatchResult Uses

type RelationLifeSuspendedStatusWatchResult struct {
    RelationStatusWatcherId string                              `json:"watcher-id"`
    Changes                 []RelationLifeSuspendedStatusChange `json:"changes"`
    Error                   *Error                              `json:"error,omitempty"`
}

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

type RelationResult Uses

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

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

type RelationResultV5 Uses

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

RelationResultV5 returns information about a single relation, or an error, but doesn't include the other application name.

type RelationResults Uses

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

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

type RelationResultsV5 Uses

type RelationResultsV5 struct {
    Results []RelationResultV5 `json:"results"`
}

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

type RelationStatus Uses

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

RelationStatus holds status info about a relation.

type RelationStatusArg Uses

type RelationStatusArg struct {
    UnitTag    string              `json:"unit-tag"`
    RelationId int                 `json:"relation-id"`
    Status     RelationStatusValue `json:"status"`
    Message    string              `json:"message"`
}

RelationStatusArg holds the new status value for a relation.

type RelationStatusArgs Uses

type RelationStatusArgs struct {
    Args []RelationStatusArg `json:"args"`
}

RelationStatusArgs holds the parameters for updating the status of one or more relations.

type RelationStatusValue Uses

type RelationStatusValue relation.Status

RelationStatusValue describes the status of a relation.

const (
    Joined    RelationStatusValue = "joined"
    Suspended RelationStatusValue = "suspended"
    Broken    RelationStatusValue = "broken"
)

type RelationStatusWatchResults Uses

type RelationStatusWatchResults struct {
    Results []RelationLifeSuspendedStatusWatchResult `json:"results"`
}

RelationStatusWatchResults holds the results for any API call which ends up returning a list of RelationStatusWatchers.

type RelationSuspendedArg Uses

type RelationSuspendedArg struct {
    RelationId int    `json:"relation-id"`
    Message    string `json:"message"`
    Suspended  bool   `json:"suspended"`
}

RelationSuspendedArg holds the new suspended status value for a relation.

type RelationSuspendedArgs Uses

type RelationSuspendedArgs struct {
    Args []RelationSuspendedArg `json:"args"`
}

RelationSuspendedArgs holds the parameters for setting the suspended status of one or more relations.

type RelationUnit Uses

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

RelationUnit holds a relation and a unit tag.

type RelationUnitPair Uses

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 Uses

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 Uses

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

RelationUnitSettings holds a relation tag, a unit tag and local unit and app-level settings.

type RelationUnitStatus Uses

type RelationUnitStatus struct {
    RelationTag string `json:"relation-tag"`
    InScope     bool   `json:"in-scope"`
    Suspended   bool   `json:"suspended"`
}

RelationUnitStatusResult holds details about scope and suspended status for a relation unit.

type RelationUnitStatusResult Uses

type RelationUnitStatusResult struct {
    RelationResults []RelationUnitStatus `json:"results"`
    Error           *Error               `json:"error,omitempty"`
}

RelationUnitStatusResult holds details about scope and status for relation units, and an error.

type RelationUnitStatusResults Uses

type RelationUnitStatusResults struct {
    Results []RelationUnitStatusResult `json:"results"`
}

RelationUnitStatusResults holds the results of a uniter RelationStatus API call.

type RelationUnits Uses

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 Uses

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 Uses

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

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

type RelationUnitsWatchResult Uses

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 Uses

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

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

type RemoteApplication Uses

type RemoteApplication struct {
    // Name is the name of the application.
    Name string `json:"name"`

    // OfferUUID is the uuid of the application offer.
    OfferUUID string `json:"offer-uuid"`

    // Life is the current lifecycle state of the application.
    Life Life `json:"life,omitempty"`

    // Status is the current status of the application.
    Status string `json:"status,omitempty"`

    // ModelUUID is the UUId of the model hosting the application.
    ModelUUID string `json:"model-uuid"`

    // IsConsumerProxy returns if the application is created
    // from a registration operation by a consuming model.
    IsConsumerProxy bool `json:"is-consumer-proxy"`

    // Macaroon is used for authentication.
    Macaroon *macaroon.Macaroon `json:"macaroon,omitempty"`
}

RemoteApplication describes the current state of an application involved in a cross- model relation, from the perspective of the local model.

type RemoteApplicationChange Uses

type RemoteApplicationChange struct {
    // ApplicationTag is the tag of the application.
    ApplicationTag string `json:"application-tag"`

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

RemoteApplicationChange describes changes to an application.

type RemoteApplicationChanges Uses

type RemoteApplicationChanges struct {
    Changes []RemoteApplicationChange `json:"changes,omitempty"`
}

RemoteApplicationChanges describes a set of changes to remote applications.

type RemoteApplicationInfo Uses

type RemoteApplicationInfo struct {
    ModelTag    string `json:"model-tag"`
    Name        string `json:"name"`
    Description string `json:"description"`
    OfferURL    string `json:"offer-url"`
    // SourceModelLabel is only populated if the application
    // originates from another model on the same controller
    // rather than via an offer URL.
    SourceModelLabel string           `json:"source-model-label,omitempty"`
    Endpoints        []RemoteEndpoint `json:"endpoints"`
    // IconURLPath is relative to the model api endpoint
    IconURLPath string `json:"icon-url-path"`
}

RemoteApplicationInfo has attributes for a remote application.

type RemoteApplicationInfoResult Uses

type RemoteApplicationInfoResult struct {
    Result *RemoteApplicationInfo `json:"result,omitempty"`
    Error  *Error                 `json:"error,omitempty"`
}

RemoteApplicationInfoResult holds the result of loading remote application info at a URL.

type RemoteApplicationInfoResults Uses

type RemoteApplicationInfoResults struct {
    Results []RemoteApplicationInfoResult `json:"results"`
}

RemoteApplicationInfoResults represents the result of a RemoteApplicationInfo call.

type RemoteApplicationResult Uses

type RemoteApplicationResult struct {
    Result *RemoteApplication `json:"result,omitempty"`
    Error  *Error             `json:"error,omitempty"`
}

RemoteApplicationResult holds a remote application and an error.

type RemoteApplicationResults Uses

type RemoteApplicationResults struct {
    Results []RemoteApplicationResult `json:"results,omitempty"`
}

RemoteApplicationResults holds a set of remote application results.

type RemoteApplicationStatus Uses

type RemoteApplicationStatus struct {
    Err       *Error              `json:"err,omitempty"`
    OfferURL  string              `json:"offer-url"`
    OfferName string              `json:"offer-name"`
    Endpoints []RemoteEndpoint    `json:"endpoints"`
    Life      string              `json:"life"`
    Relations map[string][]string `json:"relations"`
    Status    DetailedStatus      `json:"status"`
}

RemoteApplicationStatus holds status info about a remote application.

type RemoteApplicationWatchResult Uses

type RemoteApplicationWatchResult struct {
    RemoteApplicationWatcherId string                   `json:"id"`
    Change                     *RemoteApplicationChange `json:"change,omitempty"`
    Error                      *Error                   `json:"error,omitempty"`
}

RemoteApplicationWatchResult holds a RemoteApplicationWatcher id, changes and an error (if any).

type RemoteApplicationWatchResults Uses

type RemoteApplicationWatchResults struct {
    Results []RemoteApplicationWatchResult `json:"results,omitempty"`
}

RemoteApplicationWatchResults holds the results for any API call which ends up returning a list of RemoteServiceWatchers.

type RemoteEndpoint Uses

type RemoteEndpoint struct {
    Name      string             `json:"name"`
    Role      charm.RelationRole `json:"role"`
    Interface string             `json:"interface"`
    Limit     int                `json:"limit"`
}

RemoteEndpoint represents a remote application endpoint.

type RemoteEntities Uses

type RemoteEntities struct {
    Tokens []string `json:"tokens"`
}

RemoteEntities identifies multiple remote entities.

type RemoteEntityArg Uses

type RemoteEntityArg struct {
    Token     string         `json:"relation-token"`
    Macaroons macaroon.Slice `json:"macaroons,omitempty"`
}

RemoteEntityArg holds a remote relation token corresponding macaroons.

type RemoteEntityArgs Uses

type RemoteEntityArgs struct {
    Args []RemoteEntityArg `json:"args"`
}

RemoteEntityArgs holds arguments to an API call dealing with remote relations.

type RemoteEntityTokenArg Uses

type RemoteEntityTokenArg struct {
    // Tag is the tag of the entity.
    Tag string `json:"tag"`

    // Token is the token of the entity.
    Token string `json:"token,omitempty"`
}

RemoteEntityTokenArg holds the entity and token to be operated on.

type RemoteEntityTokenArgs Uses

type RemoteEntityTokenArgs struct {
    Args []RemoteEntityTokenArg
}

RemoteEntityTokenArgs holds the arguments to an API call dealing with remote entities and their tokens.

type RemoteRelation Uses

type RemoteRelation struct {
    Life                  Life           `json:"life"`
    Suspended             bool           `json:"suspended"`
    Id                    int            `json:"id"`
    Key                   string         `json:"key"`
    ApplicationName       string         `json:"application-name"`
    Endpoint              RemoteEndpoint `json:"endpoint"`
    RemoteApplicationName string         `json:"remote-application-name"`
    RemoteEndpointName    string         `json:"remote-endpoint-name"`
    SourceModelUUID       string         `json:"source-model-uuid"`
}

RemoteRelation describes the current state of a cross-model relation from the perspective of the local model.

type RemoteRelationChangeEvent Uses

type RemoteRelationChangeEvent struct {
    // RelationToken is the token of the relation.
    RelationToken string `json:"relation-token"`

    // ApplicationToken is the token of the application.
    ApplicationToken string `json:"application-token"`

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

    // ForceCleanup is true if the offering side should forcibly
    // ensure that all relation units have left scope.
    ForceCleanup *bool `json:"force-cleanup,omitempty"`

    // Suspended is the current suspended status of the relation.
    Suspended *bool `json:"suspended,omitempty"`