Documentation
¶
Index ¶
- Constants
- Variables
- func EncodeChecksum(checksum string) string
- func ErrCode(err error) string
- func FromNetworkHostsPorts(nhpm [][]network.HostPort) [][]HostPort
- func IsBadRequest(err error) bool
- func IsCodeActionNotAvailable(err error) bool
- func IsCodeAlreadyExists(err error) bool
- func IsCodeCannotEnterScope(err error) bool
- func IsCodeCannotEnterScopeYet(err error) bool
- func IsCodeDead(err error) bool
- func IsCodeExcessiveContention(err error) bool
- func IsCodeHasAssignedUnits(err error) bool
- func IsCodeHasHostedModels(err error) bool
- func IsCodeLeadershipClaimDenied(err error) bool
- func IsCodeLeaseClaimDenied(err error) bool
- func IsCodeMachineHasAttachedStorage(err error) bool
- func IsCodeNoAddressSet(err error) bool
- func IsCodeNotAssigned(err error) bool
- func IsCodeNotFound(err error) bool
- func IsCodeNotFoundOrCodeUnauthorized(err error) bool
- func IsCodeNotImplemented(err error) bool
- func IsCodeNotProvisioned(err error) bool
- func IsCodeNotSupported(err error) bool
- func IsCodeOperationBlocked(err error) bool
- func IsCodeStopped(err error) bool
- func IsCodeTryAgain(err error) bool
- func IsCodeUnauthorized(err error) bool
- func IsCodeUnitHasSubordinates(err error) bool
- func IsCodeUpgradeInProgress(err error) bool
- func IsMethodNotAllowed(err error) bool
- func NetworkAddresses(addrs []Address) []network.Address
- func NetworkHostPorts(hps []HostPort) []network.HostPort
- func NetworkHostsPorts(hpm [][]HostPort) [][]network.HostPort
- type APIHostPortsResult
- type Action
- type ActionExecutionResult
- type ActionExecutionResults
- type ActionResult
- type ActionResults
- type Actions
- type ActionsByName
- type ActionsByNames
- type ActionsByReceiver
- type ActionsByReceivers
- type ActionsQueryResult
- type ActionsQueryResults
- type AddCharm
- type AddCharmWithAuthorization
- type AddMachineParams
- type AddMachines
- type AddMachinesResult
- type AddMachinesResults
- type AddRelation
- type AddRelationResults
- type AddServiceUnits
- type AddServiceUnitsResults
- type AddSubnetParams
- type AddSubnetsParams
- type AddUser
- type AddUserResult
- type AddUserResults
- type AddUsers
- type Address
- type AgentGetEntitiesResult
- type AgentGetEntitiesResults
- type AgentVersionResult
- type AllWatcherId
- type AllWatcherNextResults
- type AnnotationsGetResult
- type AnnotationsGetResults
- type AnnotationsSet
- type AuthUserInfo
- type BackupsCreateArgs
- type BackupsDownloadArgs
- type BackupsInfoArgs
- type BackupsListArgs
- type BackupsListResult
- type BackupsMetadataResult
- type BackupsRemoveArgs
- type BackupsUploadArgs
- type BackupsUploadResult
- type Block
- type BlockDeviceResult
- type BlockDeviceResults
- type BlockDevicesResult
- type BlockDevicesResults
- type BlockResult
- type BlockResults
- type BlockSwitchParams
- type BoolResult
- type BoolResults
- type BundleChangesChange
- type BytesResult
- type CharmInfo
- type CharmURL
- type CharmURLs
- type CharmsList
- type CharmsListResult
- type CharmsResponse
- type ClaimLeadershipBulkParams
- type ClaimLeadershipBulkResults
- type ClaimLeadershipParams
- type CloudImageMetadata
- type CloudImageMetadataList
- type ConfigSettings
- type ConfigSettingsResult
- type ConfigSettingsResults
- type ConstraintsResult
- type ConstraintsResults
- type ContainerConfig
- type ContainerManagerConfig
- type ContainerManagerConfigParams
- type ControllersChangeResult
- type ControllersChangeResults
- type ControllersChanges
- type ControllersSpec
- type ControllersSpecs
- type CreateSpaceParams
- type CreateSpacesParams
- type CreateSubnetParams
- type CreateSubnetsParams
- type Creds
- type DeployerConnectionValues
- type DestroyControllerArgs
- type DestroyMachines
- type DestroyRelation
- type DestroyServiceUnits
- type DetailedStatus
- type DigestAlgorithm
- type DiscoverSpacesResults
- type DistributionGroupResult
- type DistributionGroupResults
- type EndpointStatus
- type Entities
- type EntitiesCharmURL
- type EntitiesPortRanges
- type EntitiesPorts
- type EntitiesVersion
- type EntitiesWatchResult
- type EntitiesWatchResults
- type Entity
- type EntityAnnotations
- type EntityCharmURL
- type EntityMetrics
- type EntityPassword
- type EntityPasswords
- type EntityPort
- type EntityPortRange
- type EntityStatus
- type EntityStatusArgs
- type EntityVersion
- type Error
- type ErrorInfo
- type ErrorResult
- type ErrorResults
- type FacadeVersions
- type Filesystem
- type FilesystemAttachment
- type FilesystemAttachmentInfo
- type FilesystemAttachmentParams
- type FilesystemAttachmentParamsResult
- type FilesystemAttachmentParamsResults
- type FilesystemAttachmentResult
- type FilesystemAttachmentResults
- type FilesystemAttachments
- type FilesystemDetails
- type FilesystemDetailsListResult
- type FilesystemDetailsListResults
- type FilesystemDetailsResult
- type FilesystemDetailsResults
- type FilesystemFilter
- type FilesystemFilters
- type FilesystemInfo
- type FilesystemParams
- type FilesystemParamsResult
- type FilesystemParamsResults
- type FilesystemResult
- type FilesystemResults
- type Filesystems
- type FindActionsByNames
- type FindTags
- type FindTagsResults
- type FindToolsParams
- type FindToolsResult
- type FullMigrationStatus
- type FullStatus
- type GUIArchiveResponse
- type GUIArchiveVersion
- type GUIVersionRequest
- type GetAnnotations
- type GetAnnotationsResults
- type GetBundleChangesParams
- type GetBundleChangesResults
- type GetConstraintsResults
- type GetLeadershipSettingsBulkResults
- type GetLeadershipSettingsResult
- type GetServiceConstraints
- type HAMember
- type HistoryKind
- type HostPort
- type ImageFilterParams
- type ImageMetadata
- type ImageMetadataFilter
- type ImageSpec
- type InitiateModelMigrationArgs
- type InitiateModelMigrationResult
- type InitiateModelMigrationResults
- type InstanceInfo
- type InstancesInfo
- type IntResult
- type IntResults
- type IsMasterResult
- type IsMeteredResult
- type JobsResult
- type JobsResults
- type Life
- type LifeResult
- type LifeResults
- type ListCloudImageMetadataResult
- type ListImageResult
- type ListSSHKeys
- type ListSpacesResults
- type ListSubnetsResults
- type LogRecord
- type LoginRequest
- type LoginRequestCompat
- type LoginResult
- type LoginResultV1
- type MacaroonResult
- type MacaroonResults
- type MachineAddresses
- type MachineAddressesResult
- type MachineAddressesResults
- type MachineBlockDevices
- type MachineContainers
- type MachineContainersParams
- type MachineNetworkConfigResult
- type MachineNetworkConfigResults
- type MachinePortRange
- type MachinePorts
- type MachinePortsParams
- type MachinePortsResult
- type MachinePortsResults
- type MachineStatus
- type MachineStorageId
- type MachineStorageIds
- type MachineStorageIdsWatchResult
- type MachineStorageIdsWatchResults
- type MergeLeadershipSettingsBulkParams
- type MergeLeadershipSettingsParam
- type MetadataImageIds
- type MetadataSaveParams
- type MeterStatus
- type MeterStatusParam
- type MeterStatusParams
- type MeterStatusResult
- type MeterStatusResults
- type Metric
- type MetricBatch
- type MetricBatchParam
- type MetricBatchParams
- type MetricResult
- type MetricResults
- type MetricsParam
- type MetricsParams
- type MigrationStatus
- type Model
- type ModelAccessPermission
- type ModelAction
- type ModelArgs
- type ModelBlockInfo
- type ModelBlockInfoList
- type ModelConfig
- type ModelConfigResult
- type ModelConfigResults
- type ModelCreateArgs
- type ModelInfo
- type ModelInfoList
- type ModelInfoListResult
- type ModelInfoListResults
- type ModelInfoResult
- type ModelInfoResults
- type ModelMigrationSpec
- type ModelMigrationTargetInfo
- type ModelResult
- type ModelSet
- type ModelSkeletonConfigArgs
- type ModelStatus
- type ModelStatusResults
- type ModelUnset
- type ModelUserInfo
- type ModelUserInfoResult
- type ModelUserInfoResults
- type ModifyModelAccess
- type ModifyModelAccessRequest
- type ModifyUserSSHKeys
- type MongoUpgradeResults
- type NetworkConfig
- type NetworkConfigs
- type NotifyWatchResult
- type NotifyWatchResults
- type PhaseResult
- type PhaseResults
- type Port
- type PortRange
- type PortsResult
- type PortsResults
- type PrivateAddress
- type PrivateAddressResults
- type ProviderSpace
- type ProvisioningInfo
- type ProvisioningInfoResult
- type ProvisioningInfoResults
- type ProvisioningScriptParams
- type ProvisioningScriptResult
- type ProxyConfig
- type ProxyConfigResult
- type ProxyConfigResults
- type PublicAddress
- type PublicAddressResults
- type ReauthRequest
- type RebootAction
- type RebootActionResult
- type RebootActionResults
- type RelationIds
- type RelationResult
- type RelationResults
- type RelationStatus
- type RelationUnit
- type RelationUnitPair
- type RelationUnitPairs
- type RelationUnitSettings
- type RelationUnits
- type RelationUnitsChange
- type RelationUnitsSettings
- type RelationUnitsWatchResult
- type RelationUnitsWatchResults
- type ReleaseLeadershipBulkParams
- type ReleaseLeadershipBulkResults
- type ReleaseLeadershipParams
- type RemoveBlocksArgs
- type ResolveCharmResult
- type ResolveCharmResults
- type ResolveCharms
- type Resolved
- type ResolvedMode
- type ResolvedModeResult
- type ResolvedModeResults
- type ResolvedResults
- type RestoreArgs
- type ResumeReplicationParams
- type RetryStrategy
- type RetryStrategyResult
- type RetryStrategyResults
- type RunParams
- type RunResult
- type RunResults
- type SSHHostKeySet
- type SSHHostKeys
- type SecretKeyLoginRequest
- type SecretKeyLoginRequestPayload
- type SecretKeyLoginResponse
- type SecretKeyLoginResponsePayload
- type SerializedModel
- type ServiceCharmActionsResult
- type ServiceCharmRelations
- type ServiceCharmRelationsResults
- type ServiceDeploy
- type ServiceDestroy
- type ServiceExpose
- type ServiceGet
- type ServiceGetResults
- type ServiceMetricCredential
- type ServiceMetricCredentials
- type ServiceSet
- type ServiceSetCharm
- type ServiceStatus
- type ServiceStatusResult
- type ServiceStatusResults
- type ServiceUnexpose
- type ServiceUnset
- type ServiceUpdate
- type ServicesCharmActionsResults
- type ServicesDeploy
- type SetAnnotations
- type SetConstraints
- type SetMachineBlockDevices
- type SetMachineNetworkConfig
- type SetMachinesAddresses
- type SetMigrationPhaseArgs
- type SetModelAgentVersion
- type SetStatus
- type Settings
- type SettingsResult
- type SettingsResults
- type SingularClaim
- type SingularClaims
- type Space
- type SpaceResult
- type SpaceResults
- type StateServingInfo
- type StatusHistoryArgs
- type StatusHistoryPruneArgs
- type StatusHistoryResults
- type StatusParams
- type StatusResult
- type StatusResults
- type StorageAddParams
- type StorageAttachment
- type StorageAttachmentDetails
- type StorageAttachmentId
- type StorageAttachmentIds
- type StorageAttachmentIdsResult
- type StorageAttachmentIdsResults
- type StorageAttachmentResult
- type StorageAttachmentResults
- type StorageAttachmentsResult
- type StorageAttachmentsResults
- type StorageConstraints
- type StorageDetails
- type StorageDetailsListResult
- type StorageDetailsListResults
- type StorageDetailsResult
- type StorageDetailsResults
- type StorageFilter
- type StorageFilters
- type StorageInstance
- type StorageInstanceResult
- type StorageInstanceResults
- type StorageKind
- type StoragePool
- type StoragePoolFilter
- type StoragePoolFilters
- type StoragePoolsResult
- type StoragePoolsResults
- type StoragesAddParams
- type StringBoolResult
- type StringBoolResults
- type StringResult
- type StringResults
- type StringsResult
- type StringsResults
- type StringsWatchResult
- type StringsWatchResults
- type Subnet
- type SubnetsFilters
- type ToolsResult
- type ToolsResults
- type UndertakerModelInfo
- type UndertakerModelInfoResult
- type UnitNetworkConfig
- type UnitNetworkConfigResult
- type UnitNetworkConfigResults
- type UnitSettings
- type UnitStatus
- type UnitsNetworkConfig
- type UpdateBehavior
- type UpgradeMongoParams
- type UserInfo
- type UserInfoRequest
- type UserInfoResult
- type UserInfoResults
- type UserModel
- type UserModelList
- type Version
- type VersionResult
- type VersionResults
- type Volume
- type VolumeAttachment
- type VolumeAttachmentInfo
- type VolumeAttachmentParams
- type VolumeAttachmentParamsResult
- type VolumeAttachmentParamsResults
- type VolumeAttachmentResult
- type VolumeAttachmentResults
- type VolumeAttachments
- type VolumeAttachmentsResult
- type VolumeAttachmentsResults
- type VolumeDetails
- type VolumeDetailsListResult
- type VolumeDetailsListResults
- type VolumeDetailsResult
- type VolumeDetailsResults
- type VolumeFilter
- type VolumeFilters
- type VolumeInfo
- type VolumeParams
- type VolumeParamsResult
- type VolumeParamsResults
- type VolumeResult
- type VolumeResults
- type Volumes
- type WatchContainer
- type WatchContainers
- type ZoneResult
- type ZoneResults
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" CodeCannotEnterScope = "cannot enter scope" CodeCannotEnterScopeYet = "cannot enter scope yet" CodeExcessiveContention = "excessive contention" CodeUnitHasSubordinates = "unit has subordinates" CodeNotAssigned = "not assigned" CodeStopped = "stopped" CodeDead = "dead" CodeHasAssignedUnits = "machine has assigned units" CodeHasHostedModels = "controller has hosted models" CodeMachineHasAttachedStorage = "machine has attached storage" CodeNotProvisioned = "not provisioned" CodeNoAddressSet = "no address set" CodeTryAgain = "try again" CodeNotImplemented = "not implemented" // asserted to match rpc.codeNotImplemented in rpc/rpc_test.go CodeAlreadyExists = "already exists" CodeUpgradeInProgress = "upgrade in progress" CodeActionNotAvailable = "action no longer available" CodeOperationBlocked = "operation is blocked" CodeLeadershipClaimDenied = "leadership claim denied" CodeLeaseClaimDenied = "lease claim denied" CodeNotSupported = "not supported" CodeBadRequest = "bad request" CodeMethodNotAllowed = "method not allowed" CodeForbidden = "forbidden" CodeDischargeRequired = "macaroon discharge required" )
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 ( // KindUnit represents agent and workload combined. KindUnit HistoryKind = "unit" // KindUnitAgent represent a unit agent status history entry. KindUnitAgent HistoryKind = "juju-unit" // KindWorkload represents a charm workload status history entry. KindWorkload HistoryKind = "workload" // KindMachineInstance represents an entry for a machine instance. KindMachineInstance = "machine" // KindMachine represents an entry for a machine agent. KindMachine = "juju-machine" // KindContainerInstance represents an entry for a container instance. KindContainerInstance = "container" // KindContainer represents an entry for a container agent. KindContainer = "juju-container" )
const MachineNonceHeader = "X-Juju-Nonce"
Variables ¶
var UpgradeInProgressError = errors.New(CodeUpgradeInProgress)
UpgradeInProgressError signifies an upgrade is in progress.
Functions ¶
func EncodeChecksum ¶
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 ¶
ErrCode returns the error code associated with the given error, or the empty string if there is none.
func FromNetworkHostsPorts ¶
FromNetworkHostsPorts is a helper to create a parameter out of the network type, here for a nested slice of HostPort.
func IsBadRequest ¶
func IsCodeAlreadyExists ¶
func IsCodeCannotEnterScope ¶
func IsCodeDead ¶
func IsCodeHasAssignedUnits ¶
func IsCodeHasHostedModels ¶
func IsCodeLeaseClaimDenied ¶
func IsCodeNoAddressSet ¶
func IsCodeNotAssigned ¶
func IsCodeNotFound ¶
func IsCodeNotFoundOrCodeUnauthorized ¶
IsCodeNotFoundOrCodeUnauthorized is used in API clients which, pre-API, used errors.IsNotFound; this is because an API client is not necessarily privileged to know about the existence or otherwise of a particular entity, and the server may hence convert NotFound to Unauthorized at its discretion.
func IsCodeNotImplemented ¶
func IsCodeNotProvisioned ¶
func IsCodeNotSupported ¶
func IsCodeOperationBlocked ¶
func IsCodeStopped ¶
func IsCodeTryAgain ¶
func IsCodeUnauthorized ¶
func IsCodeUpgradeInProgress ¶
func IsMethodNotAllowed ¶
func NetworkAddresses ¶
NetworkAddresses is a convenience helper to return the parameter as network type, here for a slice of Address.
func NetworkHostPorts ¶
NetworkHostPorts is a convenience helper to return the parameter as network type, here for a slice of HostPort.
func NetworkHostsPorts ¶
NetworkHostsPorts is a convenience helper to return the parameter as network type, here for a nested slice of HostPort.
Types ¶
type APIHostPortsResult ¶
type APIHostPortsResult struct {
Servers [][]HostPort `json:"Servers"`
}
APIHostPortsResult holds the result of an APIHostPorts call. Each element in the top level slice holds the addresses for one API server.
func (APIHostPortsResult) NetworkHostsPorts ¶
func (r APIHostPortsResult) NetworkHostsPorts() [][]network.HostPort
NetworkHostsPorts is a convenience helper to return the contained result servers as network type.
type Action ¶
type Action struct { Tag string `json:"tag"` Receiver string `json:"receiver"` Name string `json:"name"` Parameters map[string]interface{} `json:"parameters,omitempty"` }
Action describes an Action that will be or has been queued up.
type ActionExecutionResult ¶
type ActionExecutionResult struct { ActionTag string `json:"actiontag"` Status string `json:"status"` Results map[string]interface{} `json:"results,omitempty"` Message string `json:"message,omitempty"` }
ActionExecutionResult holds the action tag and output used when recording the result of an action.
type ActionExecutionResults ¶
type ActionExecutionResults struct {
Results []ActionExecutionResult `json:"results,omitempty"`
}
ActionExecutionResults holds a slice of ActionExecutionResult for a bulk action API call
type ActionResult ¶
type ActionResult struct { Action *Action `json:"action,omitempty"` Enqueued time.Time `json:"enqueued,omitempty"` Started time.Time `json:"started,omitempty"` Completed time.Time `json:"completed,omitempty"` Status string `json:"status,omitempty"` Message string `json:"message,omitempty"` Output map[string]interface{} `json:"output,omitempty"` Error *Error `json:"error,omitempty"` }
ActionResult describes an Action that will be or has been completed.
type ActionResults ¶
type ActionResults struct {
Results []ActionResult `json:"results,omitempty"`
}
ActionResults is a slice of ActionResult for bulk requests.
type Actions ¶
type Actions struct {
Actions []Action `json:"actions,omitempty"`
}
Actions is a slice of Action for bulk requests.
type ActionsByName ¶
type ActionsByName struct { Name string `json:"name,omitempty"` Actions []ActionResult `json:"actions,omitempty"` Error *Error `json:"error,omitempty"` }
ActionsByName is a bulk API call wrapper containing actions as results.
type ActionsByNames ¶
type ActionsByNames struct {
Actions []ActionsByName `json:"actions,omitempty"`
}
ActionsByNames wrap a slice of Actions for API calls.
type ActionsByReceiver ¶
type ActionsByReceiver struct { Receiver string `json:"receiver,omitempty"` Actions []ActionResult `json:"actions,omitempty"` Error *Error `json:"error,omitempty"` }
ActionsByReceiver is a bulk API call wrapper containing Actions, either as input paramters or as results.
type ActionsByReceivers ¶
type ActionsByReceivers struct {
Actions []ActionsByReceiver `json:"actions,omitempty"`
}
ActionsByReceivers wrap a slice of Actions for API calls.
type ActionsQueryResult ¶
type ActionsQueryResult struct { Receiver string `json:"receiver,omitempty"` Action ActionResult `json:"action,omitempty"` Error *Error `json:"error,omitempty"` }
ActionsQueryResult holds the name and parameters of an query result.
type ActionsQueryResults ¶
type ActionsQueryResults struct {
Results []ActionsQueryResult `json:"results,omitempty"`
}
ActionsQueryResults holds a slice of responses from the Actions query.
type AddCharmWithAuthorization ¶
type AddCharmWithAuthorization struct { URL string Channel string CharmStoreMacaroon *macaroon.Macaroon }
AddCharmWithAuthorization holds the arguments for making an AddCharmWithAuthorization API call.
type AddMachineParams ¶
type AddMachineParams struct { // The following fields hold attributes that will be given to the // new machine when it is created. Series string `json:"Series"` Constraints constraints.Value `json:"Constraints"` Jobs []multiwatcher.MachineJob `json:"Jobs"` // Disks describes constraints for disks that must be attached to // the machine when it is provisioned. Disks []storage.Constraints `json:"Disks"` // 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"` // 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:"ParentId"` // 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:"ContainerType"` // 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:"InstanceId"` Nonce string `json:"Nonce"` HardwareCharacteristics instance.HardwareCharacteristics `json:"HardwareCharacteristics"` Addrs []Address `json:"Addrs"` }
AddMachineParams encapsulates the parameters used to create a new machine.
type AddMachines ¶
type AddMachines struct {
MachineParams []AddMachineParams `json:"MachineParams"`
}
AddMachines holds the parameters for making the AddMachines call.
type AddMachinesResult ¶
AddMachinesResult holds the name of a machine added by the api.client.AddMachine call for a single machine.
type AddMachinesResults ¶
type AddMachinesResults struct {
Machines []AddMachinesResult `json:"Machines"`
}
AddMachinesResults holds the results of an AddMachines call.
type AddRelation ¶
type AddRelation struct {
Endpoints []string
}
AddRelation holds the parameters for making the AddRelation call. The endpoints specified are unordered.
type AddRelationResults ¶
type AddRelationResults struct {
Endpoints map[string]charm.Relation
}
AddRelationResults holds the results of a AddRelation call. The Endpoints field maps service names to the involved endpoints.
type AddServiceUnits ¶
AddServiceUnits holds parameters for the AddUnits call.
type AddServiceUnitsResults ¶
type AddServiceUnitsResults struct {
Units []string
}
AddServiceUnitsResults holds the names of the units added by the AddUnits call.
type AddSubnetParams ¶
type AddSubnetParams struct { SubnetTag string `json:"SubnetTag,omitempty"` SubnetProviderId string `json:"SubnetProviderId,omitempty"` SpaceTag string `json:"SpaceTag"` Zones []string `json:"Zones,omitempty"` }
AddSubnetParams holds a subnet and space tags, subnet provider ID, and a list of zones to associate the subnet to. Either SubnetTag or SubnetProviderId must be set, but not both. Zones can be empty if they can be discovered
type AddSubnetsParams ¶
type AddSubnetsParams struct {
Subnets []AddSubnetParams `json:"Subnets"`
}
AddSubnetsParams holds the arguments of AddSubnets API call.
type AddUser ¶
type AddUser struct { Username string `json:"username"` DisplayName string `json:"display-name"` // Password is optional. If it is empty, then // a secret key will be generated for the user // and returned in AddUserResult. It will not // be possible to login with a password until // registration with the secret key is completed. Password string `json:"password,omitempty"` // ModelAccess is the permission that the user will have to access the models. ModelAccess ModelAccessPermission `json:"model-access-permission,omitempty"` }
AddUser stores the parameters to add one user.
type AddUserResult ¶
type AddUserResult struct { Tag string `json:"tag,omitempty"` SecretKey []byte `json:"secret-key,omitempty"` Error *Error `json:"error,omitempty"` }
AddUserResult returns the tag of the newly created user and the secret key required to complete registration, or an error.
type AddUserResults ¶
type AddUserResults struct {
Results []AddUserResult `json:"results"`
}
AddUserResults holds the results of the bulk AddUser API call.
type AddUsers ¶
type AddUsers struct {
Users []AddUser `json:"users"`
}
AddUsers holds the parameters for adding new users.
type Address ¶
type Address struct { Value string `json:"Value"` Type string `json:"Type"` Scope string `json:"Scope"` SpaceName string `json:"SpaceName,omitempty"` }
Address represents the location of a machine, including metadata about what kind of location the address describes. It's used in the API requests/responses. See also network.Address, from/to which this is transformed.
func FromNetworkAddress ¶
FromNetworkAddress is a convenience helper to create a parameter out of the network type, here for Address.
func FromNetworkAddresses ¶
FromNetworkAddresses is a convenience helper to create a parameter out of the network type, here for a slice of Address.
func (Address) NetworkAddress ¶
NetworkAddress is a convenience helper to return the parameter as network type, here for Address.
type AgentGetEntitiesResult ¶
type AgentGetEntitiesResult struct { Life Life Jobs []multiwatcher.MachineJob ContainerType instance.ContainerType Error *Error }
AgentGetEntitiesResult holds the results of a machineagent.API.GetEntities call for a single entity.
type AgentGetEntitiesResults ¶
type AgentGetEntitiesResults struct {
Entities []AgentGetEntitiesResult
}
AgentGetEntitiesResults holds the results of a agent.API.GetEntities call.
type AgentVersionResult ¶
AgentVersionResult is used to return the current version number of the agent running the API server.
type AllWatcherId ¶
type AllWatcherId struct {
AllWatcherId string
}
AllWatcherId holds the id of an AllWatcher.
type AllWatcherNextResults ¶
type AllWatcherNextResults struct {
Deltas []multiwatcher.Delta
}
AllWatcherNextResults holds deltas returned from calling AllWatcher.Next().
type AnnotationsGetResult ¶
type AnnotationsGetResult struct { EntityTag string Annotations map[string]string Error ErrorResult }
AnnotationsGetResult holds entity annotations or retrieval error.
type AnnotationsGetResults ¶
type AnnotationsGetResults struct {
Results []AnnotationsGetResult
}
AnnotationsGetResults holds annotations associated with entities.
type AnnotationsSet ¶
type AnnotationsSet struct {
Annotations []EntityAnnotations
}
AnnotationsSet stores parameters for making Set call on Annotations client.
type AuthUserInfo ¶
type AuthUserInfo struct { DisplayName string `json:"display-name"` Identity string `json:"identity"` LastConnection *time.Time `json:"last-connection,omitempty"` // Credentials contains an optional opaque credential value to be held by // the client, if any. Credentials *string `json:"credentials,omitempty"` }
AuthUserInfo describes a logged-in local user or remote identity.
type BackupsCreateArgs ¶
type BackupsCreateArgs struct {
Notes string
}
BackupsCreateArgs holds the args for the API Create method.
type BackupsDownloadArgs ¶
type BackupsDownloadArgs struct {
ID string
}
BackupsDownloadArgs holds the args for the API Download method.
type BackupsInfoArgs ¶
type BackupsInfoArgs struct {
ID string
}
BackupsInfoArgs holds the args for the API Info method.
type BackupsListArgs ¶
type BackupsListArgs struct { }
BackupsListArgs holds the args for the API List method.
type BackupsListResult ¶
type BackupsListResult struct {
List []BackupsMetadataResult
}
BackupsListResult holds the list of all stored backups.
type BackupsMetadataResult ¶
type BackupsMetadataResult struct { ID string Checksum string ChecksumFormat string Size int64 Stored time.Time // May be zero... Started time.Time Finished time.Time // May be zero... Notes string Model string Machine string Hostname string Version version.Number CACert string CAPrivateKey string }
BackupsMetadataResult holds the metadata for a backup as returned by an API backups method (such as Create).
type BackupsRemoveArgs ¶
type BackupsRemoveArgs struct {
ID string
}
BackupsRemoveArgs holds the args for the API Remove method.
type BackupsUploadArgs ¶
type BackupsUploadArgs struct { Data []byte Metadata BackupsMetadataResult }
BackupsUploadArgs holds the args for the API Upload method.
type BackupsUploadResult ¶
type BackupsUploadResult struct {
ID string
}
BackupsListResult holds the list of all stored backups.
type Block ¶
type Block struct { // Id is this blocks id. Id string `json:"id"` // Tag holds the tag of the entity that is blocked. Tag string `json:"tag"` // Type is block type as per state.multiwatcher.BlockType. // Valid types are "BlockDestroy", "BlockRemove" and "BlockChange". Type string `json:"type"` // Message is a descriptive or an explanatory message // that the block was created with. Message string `json:"message,omitempty"` }
Block describes a Juju block that protects model from corruption.
type BlockDeviceResult ¶
type BlockDeviceResult struct { Result storage.BlockDevice `json:"result"` Error *Error `json:"error,omitempty"` }
BlockDeviceResult holds the result of an API call to retrieve details of a block device.
type BlockDeviceResults ¶
type BlockDeviceResults struct {
Results []BlockDeviceResult `json:"results,omitempty"`
}
BlockDeviceResults holds the result of an API call to retrieve details of multiple block devices.
type BlockDevicesResult ¶
type BlockDevicesResult struct { Result []storage.BlockDevice `json:"result"` Error *Error `json:"error,omitempty"` }
BlockDevicesResult holds the result of an API call to retrieve details of all block devices relating to some entity.
type BlockDevicesResults ¶
type BlockDevicesResults struct {
Results []BlockDevicesResult `json:"results,omitempty"`
}
BlockDevicseResults holds the result of an API call to retrieve details of all block devices relating to some entities.
type BlockResult ¶
BlockResult holds the result of an API call to retrieve details for a block.
type BlockResults ¶
type BlockResults struct {
Results []BlockResult `json:"results,omitempty"`
}
BlockResults holds the result of an API call to list blocks.
type BlockSwitchParams ¶
type BlockSwitchParams struct { // Type is block type as per state.multiwatcher.BlockType. // Valid types are "BlockDestroy", "BlockRemove" and "BlockChange". Type string `json:"type"` // Message is a descriptive or an explanatory message // that accompanies the switch. Message string `json:"message,omitempty"` }
BlockSwitchParams holds the parameters for switching a block on/off.
type BoolResult ¶
BoolResult holds the result of an API call that returns a a boolean or an error.
type BoolResults ¶
type BoolResults struct {
Results []BoolResult
}
BoolResults holds multiple results with BoolResult each.
type BundleChangesChange ¶
type BundleChangesChange struct { // Id is the unique identifier for this change. Id string `json:"id"` // Method is the action to be performed to apply this change. Method string `json:"method"` // Args holds a list of arguments to pass to the method. Args []interface{} `json:"args"` // Requires holds a list of dependencies for this change. Each dependency // is represented by the corresponding change id, and must be applied // before this change is applied. Requires []string `json:"requires"` }
BundleChangesChange holds a single change required to deploy a bundle.
type BytesResult ¶
type BytesResult struct {
Result []byte
}
BytesResult holds the result of an API call that returns a slice of bytes.
type CharmInfo ¶
type CharmInfo struct {
CharmURL string
}
CharmInfo stores parameters for a charms.CharmInfo call.
type CharmURLs ¶
type CharmURLs struct {
URLs []CharmURL
}
CharmURLs identifies multiple charm URLs.
type CharmsList ¶
type CharmsList struct {
Names []string
}
CharmsList stores parameters for a charms.List call
type CharmsListResult ¶
type CharmsListResult struct {
CharmURLs []string
}
CharmsListResult stores result from a charms.List call
type CharmsResponse ¶
type CharmsResponse struct { Error string `json:",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:",omitempty"` // ErrorInfo holds extra information associated with the error. // Like ErrorCode, this should really be in an Error object. ErrorInfo *ErrorInfo CharmURL string `json:",omitempty"` Files []string `json:",omitempty"` }
CharmsResponse is the server response to charm upload or GET requests.
type ClaimLeadershipBulkParams ¶
type ClaimLeadershipBulkParams struct { // Params are the parameters for making a bulk leadership claim. Params []ClaimLeadershipParams }
ClaimLeadershipBulkParams is a collection of parameters for making a bulk leadership claim.
type ClaimLeadershipBulkResults ¶
type ClaimLeadershipBulkResults ErrorResults
ClaimLeadershipBulkResults is the collection of results from a bulk leadership claim.
type ClaimLeadershipParams ¶
type ClaimLeadershipParams struct { // ServiceTag is the service for which you want to make a // leadership claim. ServiceTag string // UnitTag is the unit which is making the leadership claim. UnitTag string // DurationSeconds is the number of seconds for which the lease is required. DurationSeconds float64 }
ClaimLeadershipParams are the parameters needed for making a leadership claim.
type CloudImageMetadata ¶
type CloudImageMetadata struct { // ImageId is an image identifier. ImageId string `json:"image_id"` // Stream contains reference to a particular stream, // for e.g. "daily" or "released" Stream string `json:"stream,omitempty"` // Region is the name of cloud region associated with the image. Region string `json:"region"` // Version is OS version, for e.g. "12.04". Version string `json:"version"` // Series is OS series, for e.g. "trusty". Series string `json:"series"` // Arch is the architecture for this cloud image, for e.g. "amd64" Arch string `json:"arch"` // VirtType contains the virtualisation type of the cloud image, for e.g. "pv", "hvm". "kvm". VirtType string `json:"virt_type,omitempty"` // RootStorageType contains type of root storage, for e.g. "ebs", "instance". RootStorageType string `json:"root_storage_type,omitempty"` // RootStorageSize contains size of root storage in gigabytes (GB). RootStorageSize *uint64 `json:"root_storage_size,omitempty"` // Source describes where this image is coming from: is it public? custom? Source string `json:"source"` // Priority is an importance factor for image metadata. // Higher number means higher priority. // This will allow to sort metadata by importance. Priority int `json:"priority"` }
CloudImageMetadata holds cloud image metadata properties.
type CloudImageMetadataList ¶
type CloudImageMetadataList struct {
Metadata []CloudImageMetadata `json:"metadata,omitempty"`
}
CloudImageMetadataList holds a list of cloud image metadata.
type ConfigSettings ¶
type ConfigSettings map[string]interface{}
ConfigSettings holds unit, service or cham configuration settings with string keys and arbitrary values.
type ConfigSettingsResult ¶
type ConfigSettingsResult struct { Error *Error Settings ConfigSettings }
ConfigSettingsResult holds a configuration map or an error.
type ConfigSettingsResults ¶
type ConfigSettingsResults struct {
Results []ConfigSettingsResult
}
ConfigSettingsResults holds multiple configuration maps or errors.
type ConstraintsResult ¶
type ConstraintsResult struct { Error *Error Constraints constraints.Value }
ConstraintsResult holds machine constraints or an error.
type ConstraintsResults ¶
type ConstraintsResults struct {
Results []ConstraintsResult
}
ConstraintsResults holds multiple constraints results.
type ContainerConfig ¶
type ContainerConfig struct { ProviderType string AuthorizedKeys string SSLHostnameVerification bool Proxy proxy.Settings AptProxy proxy.Settings AptMirror string PreferIPv6 bool AllowLXCLoopMounts bool *UpdateBehavior }
ContainerConfig contains information from the model config that is needed for container cloud-init.
type ContainerManagerConfig ¶
ContainerManagerConfig contains information from the model config that is needed for configuring the container manager.
type ContainerManagerConfigParams ¶
type ContainerManagerConfigParams struct {
Type instance.ContainerType
}
ContainerManagerConfigParams contains the parameters for the ContainerManagerConfig provisioner API call.
type ControllersChangeResult ¶
type ControllersChangeResult struct { Result ControllersChanges Error *Error }
ControllersChangeResult contains the results of a single EnableHA API call or an error.
type ControllersChangeResults ¶
type ControllersChangeResults struct {
Results []ControllersChangeResult
}
ControllersChangeResults contains the results of the EnableHA API call.
type ControllersChanges ¶
type ControllersChanges struct { Added []string `json:"added,omitempty"` Maintained []string `json:"maintained,omitempty"` Removed []string `json:"removed,omitempty"` Promoted []string `json:"promoted,omitempty"` Demoted []string `json:"demoted,omitempty"` Converted []string `json:"converted,omitempty"` }
ControllersChanges lists the servers that have been added, removed or maintained in the pool as a result of an enable-ha operation.
type ControllersSpec ¶
type ControllersSpec struct { ModelTag string NumControllers int `json:"num-controllers"` Constraints constraints.Value `json:"constraints,omitempty"` // Series is the series to associate with new controller machines. // If this is empty, then the model's default series is used. Series string `json:"series,omitempty"` // Placement defines specific machines to become new controller machines. Placement []string `json:"placement,omitempty"` }
ControllersServersSpec contains arguments for the EnableHA client API call.
type ControllersSpecs ¶
type ControllersSpecs struct {
Specs []ControllersSpec
}
ControllersServersSpecs contains all the arguments for the EnableHA API call.
type CreateSpaceParams ¶
type CreateSpaceParams struct { SubnetTags []string `json:"SubnetTags"` SpaceTag string `json:"SpaceTag"` Public bool `json:"Public"` ProviderId string `json:"ProviderId,omitempty"` }
CreateSpaceParams holds the space tag and at least one subnet tag required to create a new space.
type CreateSpacesParams ¶
type CreateSpacesParams struct {
Spaces []CreateSpaceParams `json:"Spaces"`
}
CreateSpacesParams olds the arguments of the AddSpaces API call.
type CreateSubnetParams ¶
type CreateSubnetParams struct { SubnetTag string `json:"SubnetTag,omitempty"` SpaceTag string `json:"SpaceTag"` Zones []string `json:"Zones,omitempty"` VLANTag int `json:"VLANTag,omitempty"` IsPublic bool `json:"IsPublic"` }
CreateSubnetParams holds a subnet and space tags, vlan tag, and a list of zones to associate the subnet to.
type CreateSubnetsParams ¶
type CreateSubnetsParams struct {
Subnets []CreateSubnetParams `json:"Subnets"`
}
CreateSubnetsParams holds the arguments of CreateSubnets API call.
type DeployerConnectionValues ¶
DeployerConnectionValues containers the result of deployer.ConnectionInfo API call.
type DestroyControllerArgs ¶
type DestroyControllerArgs struct { // DestroyModels specifies whether or not the hosted models // should be destroyed as well. If this is not specified, and there are // other hosted models, the destruction of the controller will fail. DestroyModels bool `json:"destroy-models"` }
DestroyControllerArgs holds the arguments for destroying a controller.
type DestroyMachines ¶
DestroyMachines holds parameters for the DestroyMachines call.
type DestroyRelation ¶
type DestroyRelation struct {
Endpoints []string
}
DestroyRelation holds the parameters for making the DestroyRelation call. The endpoints specified are unordered.
type DestroyServiceUnits ¶
type DestroyServiceUnits struct {
UnitNames []string
}
DestroyServiceUnits holds parameters for the DestroyUnits call.
type DetailedStatus ¶
type DetailedStatus struct { Status status.Status Info string Data map[string]interface{} Since *time.Time Kind HistoryKind Version string Life string Err error }
DetailedStatus holds status info about a machine or unit agent.
type DigestAlgorithm ¶
type DigestAlgorithm string
DigestAlgorithm is one of the values in the IANA registry. See RFC 3230 and 5843.
type DiscoverSpacesResults ¶
type DiscoverSpacesResults struct {
Results []ProviderSpace `json:"Results"`
}
DiscoverSpacesResults holds the list of all provider spaces.
type DistributionGroupResult ¶
DistributionGroupResult contains the result of the DistributionGroup provisioner API call.
type DistributionGroupResults ¶
type DistributionGroupResults struct {
Results []DistributionGroupResult
}
DistributionGroupResults is the bulk form of DistributionGroupResult.
type EndpointStatus ¶
type EndpointStatus struct { ServiceName string Name string Role charm.RelationRole Subordinate bool }
EndpointStatus holds status info about a single endpoint
func (*EndpointStatus) String ¶
func (epStatus *EndpointStatus) String() string
type EntitiesCharmURL ¶
type EntitiesCharmURL struct {
Entities []EntityCharmURL
}
EntitiesCharmURL holds the parameters for making a SetCharmURL API call.
type EntitiesPortRanges ¶
type EntitiesPortRanges struct {
Entities []EntityPortRange `json:"Entities"`
}
EntitiesPortRanges holds the parameters for making an OpenPorts or ClosePorts on some entities.
type EntitiesPorts ¶
type EntitiesPorts struct {
Entities []EntityPort `json:"Entities"`
}
EntitiesPorts holds the parameters for making an OpenPort or ClosePort on some entities.
type EntitiesVersion ¶
type EntitiesVersion struct {
AgentTools []EntityVersion
}
EntitiesVersion specifies what tools are being run for multiple entities.
type EntitiesWatchResult ¶
type EntitiesWatchResult struct { // Note legacy serialization tag. EntitiesWatcherId string `json:"EntityWatcherId"` Changes []string `json:"Changes"` Error *Error `json:"Error"` }
EntitiesWatchResult holds a EntitiesWatcher id, changes and an error (if any).
type EntitiesWatchResults ¶
type EntitiesWatchResults struct {
Results []EntitiesWatchResult `json:"Results"`
}
EntitiesWatchResults holds the results for any API call which ends up returning a list of EntitiesWatchers.
type EntityAnnotations ¶
EntityAnnotations stores annotations for an entity.
type EntityCharmURL ¶
EntityCharmURL holds an entity's tag and a charm URL.
type EntityMetrics ¶
type EntityMetrics struct { Metrics []MetricResult `json:"metrics,omitempty"` Error *Error `json:"error,omitempty"` }
EntityMetrics contains the results of a GetMetrics call for a single entity.
type EntityPassword ¶
EntityPassword specifies a password change for the entity with the given tag.
type EntityPasswords ¶
type EntityPasswords struct {
Changes []EntityPassword
}
EntityPasswords holds the parameters for making a SetPasswords call.
type EntityPort ¶
type EntityPort struct { Tag string `json:"Tag"` Protocol string `json:"Protocol"` Port int `json:"Port"` }
EntityPort holds an entity's tag, a protocol and a port.
type EntityPortRange ¶
type EntityPortRange struct { Tag string `json:"Tag"` Protocol string `json:"Protocol"` FromPort int `json:"FromPort"` ToPort int `json:"ToPort"` }
EntityPortRange holds an entity's tag, a protocol and a port range.
type EntityStatus ¶
type EntityStatus struct { Status status.Status Info string Data map[string]interface{} Since *time.Time }
EntityStatus holds the status of an entity.
type EntityStatusArgs ¶
type EntityStatusArgs struct { Tag string Status status.Status Info string Data map[string]interface{} }
EntityStatus holds parameters for setting the status of a single entity.
type EntityVersion ¶
EntityVersion specifies the tools version to be set for an entity with the given tag. version.Binary directly.
type ErrorInfo ¶
type ErrorInfo struct { // Macaroon may hold a macaroon that, when // discharged, may allow access to the juju API. // This field is associated with the ErrDischargeRequired // error code. Macaroon *macaroon.Macaroon `json:",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:",omitempty"` }
ErrorInfo holds additional information provided by an error. Note that although these fields are compatible with the same fields in httpbakery.ErrorInfo, the Juju API server does not implement endpoints directly compatible with that protocol because the error response format varies according to the endpoint.
type ErrorResult ¶
type ErrorResult struct {
Error *Error
}
ErrorResult holds the error status of a single operation.
type ErrorResults ¶
type ErrorResults struct { // Results contains the error results from each operation. Results []ErrorResult }
ErrorResults holds the results of calling a bulk operation which returns no data, only an error result. The order and number of elements matches the operations specified in the request.
func (ErrorResults) Combine ¶
func (result ErrorResults) Combine() error
Combine returns one error from the result which is an accumulation of the errors. If there are no errors in the result, the return value is nil. Otherwise the error values are combined with new-line characters.
func (ErrorResults) OneError ¶
func (result ErrorResults) OneError() error
OneError returns the error from the result of a bulk operation on a single value.
type FacadeVersions ¶
FacadeVersions describes the available Facades and what versions of each one are available
type Filesystem ¶
type Filesystem struct { FilesystemTag string `json:"filesystemtag"` VolumeTag string `json:"volumetag,omitempty"` Info FilesystemInfo `json:"info"` }
Filesystem identifies and describes a storage filesystem in the model.
type FilesystemAttachment ¶
type FilesystemAttachment struct { FilesystemTag string `json:"filesystemtag"` MachineTag string `json:"machinetag"` Info FilesystemAttachmentInfo `json:"info"` }
FilesystemAttachment identifies and describes a filesystem attachment.
type FilesystemAttachmentInfo ¶
type FilesystemAttachmentInfo struct { MountPoint string `json:"mountpoint,omitempty"` ReadOnly bool `json:"read-only,omitempty"` }
FilesystemAttachmentInfo describes a filesystem attachment.
type FilesystemAttachmentParams ¶
type FilesystemAttachmentParams struct { FilesystemTag string `json:"filesystemtag"` MachineTag string `json:"machinetag"` FilesystemId string `json:"filesystemid,omitempty"` InstanceId string `json:"instanceid,omitempty"` Provider string `json:"provider"` MountPoint string `json:"mountpoint,omitempty"` ReadOnly bool `json:"read-only,omitempty"` }
FilesystemAttachmentParams holds the parameters for creating a filesystem attachment.
type FilesystemAttachmentParamsResult ¶
type FilesystemAttachmentParamsResult struct { Result FilesystemAttachmentParams `json:"result"` Error *Error `json:"error,omitempty"` }
FilesystemAttachmentParamsResults holds provisioning parameters for a filesystem attachment.
type FilesystemAttachmentParamsResults ¶
type FilesystemAttachmentParamsResults struct {
Results []FilesystemAttachmentParamsResult `json:"results,omitempty"`
}
FilesystemAttachmentParamsResults holds provisioning parameters for multiple filesystem attachments.
type FilesystemAttachmentResult ¶
type FilesystemAttachmentResult struct { Result FilesystemAttachment `json:"result"` Error *Error `json:"error,omitempty"` }
FilesystemAttachmentResult holds the details of a single filesystem attachment, or an error.
type FilesystemAttachmentResults ¶
type FilesystemAttachmentResults struct {
Results []FilesystemAttachmentResult `json:"results,omitempty"`
}
FilesystemAttachmentResults holds a set of FilesystemAttachmentResults.
type FilesystemAttachments ¶
type FilesystemAttachments struct {
FilesystemAttachments []FilesystemAttachment `json:"filesystemattachments"`
}
FilesystemAttachments describes a set of storage filesystem attachments.
type FilesystemDetails ¶
type FilesystemDetails struct { // FilesystemTag is the tag for the filesystem. FilesystemTag string `json:"filesystemtag"` // VolumeTag is the tag for the volume backing the // filesystem, if any. VolumeTag string `json:"volumetag,omitempty"` // Info contains information about the filesystem. Info FilesystemInfo `json:"info"` // Status contains the status of the filesystem. Status EntityStatus `json:"status"` // MachineAttachments contains a mapping from // machine tag to filesystem attachment information. MachineAttachments map[string]FilesystemAttachmentInfo `json:"machineattachments,omitempty"` // Storage contains details about the storage instance // that the volume is assigned to, if any. Storage *StorageDetails `json:"storage,omitempty"` }
FilesystemDetails describes a storage filesystem in the model for the purpose of filesystem CLI commands.
This is kept separate from Filesystem which contains only information specific to the filesystem model, whereas FilesystemDetails is intended to contain complete information about a filesystem and related information (status, attachments, storage).
type FilesystemDetailsListResult ¶
type FilesystemDetailsListResult struct { Result []FilesystemDetails `json:"result,omitempty"` Error *Error `json:"error,omitempty"` }
FilesystemDetailsListResult holds a collection of filesystem details.
type FilesystemDetailsListResults ¶
type FilesystemDetailsListResults struct {
Results []FilesystemDetailsListResult `json:"results,omitempty"`
}
FilesystemDetailsListResults holds a collection of collections of filesystem details.
type FilesystemDetailsResult ¶
type FilesystemDetailsResult struct { Result *FilesystemDetails `json:"result,omitempty"` Error *Error `json:"error,omitempty"` }
FilesystemDetailsResult contains details about a filesystem, its attachments or an error preventing retrieving those details.
type FilesystemDetailsResults ¶
type FilesystemDetailsResults struct {
Results []FilesystemDetailsResult `json:"results,omitempty"`
}
FilesystemDetailsResults holds filesystem details.
type FilesystemFilter ¶
type FilesystemFilter struct { // Machines are machine tags to filter on. Machines []string `json:"machines,omitempty"` }
FilesystemFilter holds a filter for filter list API call.
func (*FilesystemFilter) IsEmpty ¶
func (f *FilesystemFilter) IsEmpty() bool
IsEmpty determines if filter is empty
type FilesystemFilters ¶
type FilesystemFilters struct {
Filters []FilesystemFilter `json:"filters,omitempty"`
}
FilesystemFilters holds a collection of filesystem filters.
type FilesystemInfo ¶
type FilesystemInfo struct { FilesystemId string `json:"filesystemid"` // Size is the size of the filesystem in MiB. Size uint64 `json:"size"` }
Filesystem describes a storage filesystem in the model.
type FilesystemParams ¶
type FilesystemParams struct { FilesystemTag string `json:"filesystemtag"` VolumeTag string `json:"volumetag,omitempty"` Size uint64 `json:"size"` Provider string `json:"provider"` Attributes map[string]interface{} `json:"attributes,omitempty"` Tags map[string]string `json:"tags,omitempty"` Attachment *FilesystemAttachmentParams `json:"attachment,omitempty"` }
FilesystemParams holds the parameters for creating a storage filesystem.
type FilesystemParamsResult ¶
type FilesystemParamsResult struct { Result FilesystemParams `json:"result"` Error *Error `json:"error,omitempty"` }
FilesystemParamsResults holds provisioning parameters for a filesystem.
type FilesystemParamsResults ¶
type FilesystemParamsResults struct {
Results []FilesystemParamsResult `json:"results,omitempty"`
}
FilesystemParamsResults holds provisioning parameters for multiple filesystems.
type FilesystemResult ¶
type FilesystemResult struct { Result Filesystem `json:"result"` Error *Error `json:"error,omitempty"` }
FilesystemResult holds information about a filesystem.
type FilesystemResults ¶
type FilesystemResults struct {
Results []FilesystemResult `json:"results,omitempty"`
}
FilesystemResults holds information about multiple filesystems.
type Filesystems ¶
type Filesystems struct {
Filesystems []Filesystem `json:"filesystems"`
}
Filesystems describes a set of storage filesystems in the model.
type FindActionsByNames ¶
type FindActionsByNames struct {
ActionNames []string `json:"names,omitempty"`
}
FindActionsByName finds actions given an action name.
type FindTags ¶
type FindTags struct {
Prefixes []string `json:"prefixes"`
}
FindTags wraps a slice of strings that are prefixes to use when searching for matching tags.
type FindTagsResults ¶
FindTagsResults wraps the mapping between the requested prefix and the matching tags for each requested prefix.
type FindToolsParams ¶
type FindToolsParams struct { // Number will be used to match tools versions exactly if non-zero. Number version.Number // MajorVersion will be used to match the major version if non-zero. MajorVersion int // MinorVersion will be used to match the major version if greater // than or equal to zero, and Number is zero. MinorVersion int // Arch will be used to match tools by architecture if non-empty. Arch string // Series will be used to match tools by series if non-empty. Series string }
FindToolsParams defines parameters for the FindTools method.
type FindToolsResult ¶
FindToolsResult holds a list of tools from FindTools and any error.
type FullMigrationStatus ¶
type FullMigrationStatus struct { Spec ModelMigrationSpec `json:"spec"` Attempt int `json:"attempt"` Phase string `json:"phase"` }
FullMigrationStatus reports the current status of a model migration, including authentication details for the remote controller.
type FullStatus ¶
type FullStatus struct { ModelName string AvailableVersion string Machines map[string]MachineStatus Services map[string]ServiceStatus Relations []RelationStatus }
FullStatus holds information about the status of a juju model.
type GUIArchiveResponse ¶
type GUIArchiveResponse struct {
Versions []GUIArchiveVersion `json:"versions"`
}
GUIArchiveResponse holds the response to /gui-archive GET requests.
type GUIArchiveVersion ¶
type GUIArchiveVersion struct { // Version holds the Juju GUI version number. Version version.Number `json:"version"` // SHA256 holds the SHA256 hash of the GUI tar.bz2 archive. SHA256 string `json:"sha256"` // Current holds whether this specific version is the current one served // by the controller. Current bool `json:"current"` }
GUIArchiveVersion holds information on a specific GUI archive version.
type GUIVersionRequest ¶
type GUIVersionRequest struct { // Version holds the Juju GUI version number. Version version.Number `json:"version"` }
GUIVersionRequest holds the body for /gui-version PUT requests.
type GetAnnotations ¶
type GetAnnotations struct {
Tag string
}
GetAnnotations stores parameters for making the GetAnnotations call.
type GetAnnotationsResults ¶
GetAnnotationsResults holds annotations associated with an entity.
type GetBundleChangesParams ¶
type GetBundleChangesParams struct { // BundleDataYAML is the YAML-encoded charm bundle data // (see "github.com/juju/charm.BundleData"). BundleDataYAML string `json:"yaml"` }
GetBundleChangesParams holds parameters for making GetBundleChanges calls.
type GetBundleChangesResults ¶
type GetBundleChangesResults struct { // Changes holds the list of changes required to deploy the bundle. // It is omitted if the provided bundle YAML has verification errors. Changes []*BundleChangesChange `json:"changes,omitempty"` // Errors holds possible bundle verification errors. Errors []string `json:"errors,omitempty"` }
GetBundleChangesResults holds results of the GetBundleChanges call.
type GetConstraintsResults ¶
type GetConstraintsResults struct {
Constraints constraints.Value
}
GetConstraintsResults holds results of the GetConstraints call.
type GetLeadershipSettingsBulkResults ¶
type GetLeadershipSettingsBulkResults struct {
Results []GetLeadershipSettingsResult
}
GetLeadershipSettingsBulkResults is the collection of results from a bulk request for leadership settings.
type GetLeadershipSettingsResult ¶
GetLeadershipSettingsResult is the results from requesting leadership settings.
type GetServiceConstraints ¶
type GetServiceConstraints struct {
ServiceName string
}
GetServiceConstraints stores parameters for making the GetServiceConstraints call.
type HistoryKind ¶
type HistoryKind string
HistoryKind represents the possible types of status history entries.
type HostPort ¶
HostPort associates an address with a port. It's used in the API requests/responses. See also network.HostPort, from/to which this is transformed.
func FromNetworkHostPort ¶
FromNetworkHostPort is a convenience helper to create a parameter out of the network type, here for HostPort.
func FromNetworkHostPorts ¶
FromNetworkHostPorts is a helper to create a parameter out of the network type, here for a slice of HostPort.
func (HostPort) NetworkHostPort ¶
NetworkHostPort is a convenience helper to return the parameter as network type, here for HostPort.
type ImageFilterParams ¶
type ImageFilterParams struct {
Images []ImageSpec `json:"images"`
}
ImageFilterParams holds the parameters used to specify images to delete.
type ImageMetadata ¶
type ImageMetadata struct { Kind string `json:"kind"` Arch string `json:"arch"` Series string `json:"series"` URL string `json:"url"` Created time.Time `json:"created"` }
ImageMetadata represents an image in storage.
type ImageMetadataFilter ¶
type ImageMetadataFilter struct { // Region stores metadata region. Region string `json:"region,omitempty"` // Series stores all desired series. Series []string `json:"series,omitempty"` // Arches stores all desired architectures. Arches []string `json:"arches,omitempty"` // Stream can be "" or "released" for the default "released" stream, // or "daily" for daily images, or any other stream that the available // simplestreams metadata supports. Stream string `json:"stream,omitempty"` // VirtType stores virtualisation type. VirtType string `json:"virt_type,omitempty"` // RootStorageType stores storage type. RootStorageType string `json:"root-storage-type,omitempty"` }
ImageMetadataFilter holds filter properties used to search for image metadata. It amalgamates both simplestreams.MetadataLookupParams and simplestreams.LookupParams and adds additional properties to satisfy existing and new use cases.
type ImageSpec ¶
type ImageSpec struct { Kind string `json:"kind"` Arch string `json:"arch"` Series string `json:"series"` }
ImageSpec defines the parameters to select images list or delete.
type InitiateModelMigrationArgs ¶
type InitiateModelMigrationArgs struct {
Specs []ModelMigrationSpec `json:"specs"`
}
InitiateModelMigrationArgs holds the details required to start one or more model migrations.
type InitiateModelMigrationResult ¶
type InitiateModelMigrationResult struct { ModelTag string `json:"model-tag"` Error *Error `json:"error"` Id string `json:"id"` // the ID for the migration attempt }
InitiateModelMigrationResult is used to return the result of one model migration initiation attempt.
type InitiateModelMigrationResults ¶
type InitiateModelMigrationResults struct {
Results []InitiateModelMigrationResult `json:"results"`
}
InitiateModelMigrationResults is used to return the result of one or more attempts to start model migrations.
type InstanceInfo ¶
type InstanceInfo struct { Tag string InstanceId instance.Id Nonce string Characteristics *instance.HardwareCharacteristics Volumes []Volume // VolumeAttachments is a mapping from volume tag to // volume attachment info. VolumeAttachments map[string]VolumeAttachmentInfo NetworkConfig []NetworkConfig }
InstanceInfo holds a machine tag, provider-specific instance id, a nonce, and network config.
type InstancesInfo ¶
type InstancesInfo struct {
Machines []InstanceInfo
}
InstancesInfo holds the parameters for making a SetInstanceInfo call for multiple machines.
type IntResult ¶
type IntResult struct { // Error holds the error (if any) of this call. Error *Error // Result holds the integer result of the call (if Error is nil). Result int }
IntResult holds the result of an API call that returns a int or an error.
type IntResults ¶
type IntResults struct { // Results holds a list of results for calls that return an int or error. Results []IntResult }
IntResults holds multiple results with an int in each.
type IsMasterResult ¶
type IsMasterResult struct { // Master reports whether the connected agent // lives on the same instance as the mongo replica // set master. Master bool }
IsMasterResult holds the result of an IsMaster API call.
type IsMeteredResult ¶
type IsMeteredResult struct {
Metered bool
}
IsMeteredResult stores result from a charms.IsMetered call
type JobsResult ¶
type JobsResult struct { Jobs []multiwatcher.MachineJob `json:"Jobs"` Error *Error `json:"Error"` }
JobsResult holds the jobs for a machine that are returned by a call to Jobs.
type JobsResults ¶
type JobsResults struct {
Results []JobsResult `json:"Results"`
}
JobsResults holds the result of a call to Jobs.
type Life ¶
type Life multiwatcher.Life
Life describes the lifecycle state of an entity ("alive", "dying" or "dead").
type LifeResult ¶
LifeResult holds the life status of a single entity, or an error indicating why it is not available.
type LifeResults ¶
type LifeResults struct {
Results []LifeResult
}
LifeResults holds the life or error status of multiple entities.
type ListCloudImageMetadataResult ¶
type ListCloudImageMetadataResult struct {
Result []CloudImageMetadata `json:"result"`
}
ListCloudImageMetadataResult holds the results of querying cloud image metadata.
type ListImageResult ¶
type ListImageResult struct {
Result []ImageMetadata `json:"result"`
}
ListImageResult holds the results of querying images.
type ListSSHKeys ¶
ListSSHKeys stores parameters used for a KeyManager.ListKeys call.
type ListSpacesResults ¶
type ListSpacesResults struct {
Results []Space `json:"Results"`
}
ListSpacesResults holds the list of all available spaces.
type ListSubnetsResults ¶
type ListSubnetsResults struct {
Results []Subnet `json:"Results"`
}
ListSubnetsResults holds the result of a ListSubnets API call.
type LogRecord ¶
type LogRecord struct { Time time.Time `json:"t"` Module string `json:"m"` Location string `json:"l"` Level loggo.Level `json:"v"` Message string `json:"x"` }
LogRecord is used to transmit log messages to the logsink API endpoint. Single character field names are used for serialisation to keep the size down. These messages are going to be sent a lot.
type LoginRequest ¶
type LoginRequest struct { AuthTag string `json:"auth-tag"` Credentials string `json:"credentials"` Nonce string `json:"nonce"` Macaroons []macaroon.Slice `json:"macaroons"` }
LoginRequest holds credentials for identifying an entity to the Login v1 facade. AuthTag holds the tag of the user to connect as. If it is empty, then the provided macaroon slices will be used for authentication (if any one is valid, the authentication succeeds). If there are no valid macaroons and macaroon authentication is configured, the LoginResponse will contain a macaroon that when discharged, may allow access.
type LoginRequestCompat ¶
type LoginRequestCompat struct { LoginRequest Creds }
LoginRequestCompat holds credentials for identifying an entity to the Login v1 or earlier (v0 or even pre-facade).
type LoginResult ¶
type LoginResult struct { Servers [][]HostPort `json:"Servers"` ModelTag string `json:"ModelTag"` LastConnection *time.Time `json:"LastConnection"` Facades []FacadeVersions `json:"Facades"` }
LoginResult holds the result of a Login call.
type LoginResultV1 ¶
type LoginResultV1 struct { // DischargeRequired implies that the login request has failed, and none of // the other fields are populated. It contains a macaroon which, when // discharged, will grant access on a subsequent call to Login. // Note: It is OK to use the Macaroon type here as it is explicitely // designed to provide stable serialisation of macaroons. It's good // practice to only use primitives in types that will be serialised, // however because of the above it is suitable to use the Macaroon type // here. DischargeRequired *macaroon.Macaroon `json:"discharge-required,omitempty"` // DischargeRequiredReason holds the reason that the above discharge was // required. DischargeRequiredReason string `json:"discharge-required-error,omitempty"` // Servers is the list of API server addresses. Servers [][]HostPort `json:"servers,omitempty"` // ModelTag is the tag for the model that is being connected to. ModelTag string `json:"model-tag,omitempty"` // ControllerTag is the tag for the model that holds the API servers. // This is the initial model created when bootstrapping juju. ControllerTag string `json:"server-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"` }
LoginResultV1 holds the result of an Admin v1 Login call.
type MacaroonResult ¶
type MacaroonResult struct { Result *macaroon.Macaroon `json:"result,omitempty"` Error *Error `json:"error,omitempty"` }
MacaroonResult contains a macaroon or an error.
type MacaroonResults ¶
type MacaroonResults struct {
Results []MacaroonResult `json:"results"`
}
MacaroonResults contains a set of MacaroonResults.
type MachineAddresses ¶
MachineAddresses holds an machine tag and addresses.
type MachineAddressesResult ¶
type MachineAddressesResult struct { Error *Error `json:"Error"` Addresses []Address `json:"Addresses"` }
MachineAddressesResult holds a list of machine addresses or an error.
type MachineAddressesResults ¶
type MachineAddressesResults struct {
Results []MachineAddressesResult `json:"Results"`
}
MachineAddressesResults holds the results of calling an API method returning a list of addresses per machine.
type MachineBlockDevices ¶
type MachineBlockDevices struct { Machine string `json:"machine"` BlockDevices []storage.BlockDevice `json:"blockdevices,omitempty"` }
MachineBlockDevices holds a machine tag and the block devices present on that machine.
type MachineContainers ¶
type MachineContainers struct { MachineTag string ContainerTypes []instance.ContainerType }
MachineContainers holds the arguments for making an SetSupportedContainers call on a given machine.
type MachineContainersParams ¶
type MachineContainersParams struct {
Params []MachineContainers
}
MachineContainersParams holds the arguments for making a SetSupportedContainers API call.
type MachineNetworkConfigResult ¶
type MachineNetworkConfigResult struct { Error *Error `json:"Error"` // Tagged to Info due to compatibility reasons. Config []NetworkConfig `json:"Info"` }
MachineNetworkConfigResult holds network configuration for a single machine.
type MachineNetworkConfigResults ¶
type MachineNetworkConfigResults struct {
Results []MachineNetworkConfigResult `json:"Results"`
}
MachineNetworkConfigResults holds network configuration for multiple machines.
type MachinePortRange ¶
type MachinePortRange struct { UnitTag string `json:"UnitTag"` RelationTag string `json:"RelationTag"` PortRange PortRange `json:"PortRange"` }
MachinePortRange holds a single port range open on a machine for the given unit and relation tags.
type MachinePorts ¶
type MachinePorts struct { MachineTag string `json:"MachineTag"` SubnetTag string `json:"SubnetTag"` }
MachinePorts holds a machine and subnet tags. It's used when referring to opened ports on the machine for a subnet.
type MachinePortsParams ¶
type MachinePortsParams struct {
Params []MachinePorts `json:"Params"`
}
MachinePortsParams holds the arguments for making a FirewallerAPIV1.GetMachinePorts() API call.
type MachinePortsResult ¶
type MachinePortsResult struct { Error *Error `json:"Error"` Ports []MachinePortRange `json:"Ports"` }
MachinePortsResult holds a single result of the FirewallerAPIV1.GetMachinePorts() and UniterAPI.AllMachinePorts() API calls.
type MachinePortsResults ¶
type MachinePortsResults struct {
Results []MachinePortsResult `json:"Results"`
}
MachinePortsResults holds all the results of the FirewallerAPIV1.GetMachinePorts() and UniterAPI.AllMachinePorts() API calls.
type MachineStatus ¶
type MachineStatus struct { AgentStatus DetailedStatus InstanceStatus DetailedStatus DNSName string InstanceId instance.Id Series string Id string Containers map[string]MachineStatus Hardware string Jobs []multiwatcher.MachineJob HasVote bool WantsVote bool }
MachineStatus holds status info about a machine.
type MachineStorageId ¶
type MachineStorageId struct { MachineTag string `json:"machinetag"` // AttachmentTag is the tag of the volume or filesystem whose // attachment to the machine is represented. AttachmentTag string `json:"attachmenttag"` }
MachineStorageId identifies the attachment of a storage entity to a machine, by their tags.
type MachineStorageIds ¶
type MachineStorageIds struct {
Ids []MachineStorageId `json:"ids"`
}
MachineStorageIds holds a set of machine/storage-entity attachment identifiers.
type MachineStorageIdsWatchResult ¶
type MachineStorageIdsWatchResult struct { MachineStorageIdsWatcherId string Changes []MachineStorageId Error *Error }
MachineStorageIdsWatchResult holds a MachineStorageIdsWatcher id, changes and an error (if any).
type MachineStorageIdsWatchResults ¶
type MachineStorageIdsWatchResults struct {
Results []MachineStorageIdsWatchResult
}
MachineStorageIdsWatchResults holds the results for any API call which ends up returning a list of MachineStorageIdsWatchers.
type MergeLeadershipSettingsBulkParams ¶
type MergeLeadershipSettingsBulkParams struct { // Params are the parameters for making a bulk leadership settings // merge. Params []MergeLeadershipSettingsParam }
MergeLeadershipSettingsBulkParams is a collection of parameters for making a bulk merge of leadership settings.
type MergeLeadershipSettingsParam ¶
type MergeLeadershipSettingsParam struct { // ServiceTag is the service for which you want to merge // leadership settings. ServiceTag string // Settings are the Leadership settings you wish to merge in. Settings Settings }
MergeLeadershipSettingsParam are the parameters needed for merging in leadership settings.
type MetadataImageIds ¶
type MetadataImageIds struct {
Ids []string `json:"image_ids"`
}
MetadataImageIds holds image ids and can be used to identify related image metadata.
type MetadataSaveParams ¶
type MetadataSaveParams struct {
Metadata []CloudImageMetadataList `json:"metadata,omitempty"`
}
MetadataSaveParams holds lists of cloud image metadata to save. Each list will be saved atomically.
type MeterStatus ¶
MeterStatus represents the meter status of a unit.
type MeterStatusParam ¶
type MeterStatusParam struct { Tag string `json:"tag"` Code string `json:"code"` Info string `json:"info, omitempty"` }
MeterStatusParam holds meter status information to be set for the specified tag.
type MeterStatusParams ¶
type MeterStatusParams struct {
Statuses []MeterStatusParam `json:"statues"`
}
MeterStatusParams holds parameters for making SetMeterStatus calls.
type MeterStatusResult ¶
MeterStatusResult holds unit meter status or error.
type MeterStatusResults ¶
type MeterStatusResults struct {
Results []MeterStatusResult
}
MeterStatusResults holds meter status results for multiple units.
type MetricBatch ¶
MetricBatch is a list of metrics with metadata.
type MetricBatchParam ¶
type MetricBatchParam struct { Tag string Batch MetricBatch }
MetricBatchParam contains a single metric batch.
type MetricBatchParams ¶
type MetricBatchParams struct {
Batches []MetricBatchParam
}
MetricBatchParams contains multiple metric batches.
type MetricResult ¶
type MetricResult struct { Time time.Time `json:"time"` Key string `json:"key"` Value string `json:"value"` }
MetricResults contains a single metric.
type MetricResults ¶
type MetricResults struct {
Results []EntityMetrics `json:"results"`
}
MetricResults contains results from a GetMetrics call, with one item per Entity given as an argument to the command.
func (*MetricResults) OneError ¶
func (m *MetricResults) OneError() error
OneError returns the first error
type MetricsParam ¶
MetricsParam contains the metrics for a single unit.
type MetricsParams ¶
type MetricsParams struct {
Metrics []MetricsParam
}
MetricsParams contains the metrics for multiple units.
type MigrationStatus ¶
type MigrationStatus struct { 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 Model ¶
type Model struct { Name string `json:"Name"` UUID string `json:"UUID"` OwnerTag string `json:"OwnerTag"` }
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 ModelAccessPermission ¶
type ModelAccessPermission string
ModelAccessPermission is the type of permission that a user has to access a model.
const ( ModelReadAccess ModelAccessPermission = "read" ModelWriteAccess ModelAccessPermission = "write" )
Model access permissions that may be set on a user.
type ModelAction ¶
type ModelAction string
ModelAction is an action that can be performed on a model.
const ( GrantModelAccess ModelAction = "grant" RevokeModelAccess ModelAction = "revoke" )
Actions that can be preformed on a model.
type ModelArgs ¶
type ModelArgs struct {
ModelTag string `json:"model-tag"`
}
ModelArgs wraps a simple model tag.
type ModelBlockInfo ¶
type ModelBlockInfo struct { Name string `json:"name"` UUID string `json:"model-uuid"` OwnerTag string `json:"owner-tag"` Blocks []string `json:"blocks"` }
ModelBlockInfo holds information about an model and its current blocks.
type ModelBlockInfoList ¶
type ModelBlockInfoList struct {
Models []ModelBlockInfo `json:"models,omitempty"`
}
ModelBlockInfoList holds information about the blocked models for a controller.
type ModelConfig ¶
type ModelConfig map[string]interface{}
ModelConfig holds an model configuration.
type ModelConfigResult ¶
type ModelConfigResult struct {
Config ModelConfig
}
ModelConfigResult holds model configuration or an error.
type ModelConfigResults ¶
type ModelConfigResults struct {
Config map[string]interface{}
}
ModelConfigResults contains the result of client API calls to get model config values.
type ModelCreateArgs ¶
type ModelCreateArgs struct { // 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 // Account holds the provider specific account details necessary to // interact with the provider to create, list and destroy machines. Account map[string]interface{} // Config defines the model config, which includes the name of the // model. An model UUID is allocated by the API server during // the creation of the model. Config map[string]interface{} }
ModelCreateArgs holds the arguments that are necessary to create a model.
type ModelInfo ¶
type ModelInfo struct { // The json names for the fields below are as per the older // field names for backward compatability. New fields are // camel-cased for consistency within this type only. Name string `json:"Name"` UUID string `json:"UUID"` ControllerUUID string `json:"ServerUUID"` ProviderType string `json:"ProviderType"` DefaultSeries string `json:"DefaultSeries"` // OwnerTag is the tag of the user that owns the model. OwnerTag string `json:"OwnerTag"` // Life is the current lifecycle state of the model. Life Life `json:"Life"` // Status is the current status of the model. Status EntityStatus `json:"Status"` // Users contains information about the users that have access // to the model. Owners and administrators can see all users // that have access; other users can only see their own details. Users []ModelUserInfo `json:"Users"` }
ModelInfo holds information about the Juju model.
type ModelInfoList ¶
type ModelInfoList struct {
Models []ModelInfo `json:"models,omitempty"`
}
ModelInfoList holds a list of ModelInfo structures.
type ModelInfoListResult ¶
type ModelInfoListResult struct { Result *ModelInfoList `json:"result,omitempty"` Error *Error `json:"error,omitempty"` }
ModelInfoListResult holds the result of a call that returns a list of ModelInfo structures.
type ModelInfoListResults ¶
type ModelInfoListResults struct {
Results []ModelInfoListResult `json:"results"`
}
ModelInfoListResults holds the result of a bulk call that returns multiple lists of ModelInfo structures.
type ModelInfoResult ¶
type ModelInfoResult struct { Result *ModelInfo `json:"result,omitempty"` Error *Error `json:"error,omitempty"` }
ModelInfoResult holds the result of a ModelInfo call.
type ModelInfoResults ¶
type ModelInfoResults struct {
Results []ModelInfoResult `json:"results"`
}
ModelInfoResult holds the result of a bulk ModelInfo call.
type ModelMigrationSpec ¶
type ModelMigrationSpec struct { ModelTag string `json:"model-tag"` TargetInfo ModelMigrationTargetInfo `json:"target-info"` }
ModelMigrationSpec holds the details required to start the migration of a single model.
type ModelMigrationTargetInfo ¶
type ModelMigrationTargetInfo struct { ControllerTag string `json:"controller-tag"` Addrs []string `json:"addrs"` CACert string `json:"ca-cert"` AuthTag string `json:"auth-tag"` Password string `json:"password"` }
ModelMigrationTargetInfo holds the details required to connect to and authenticate with a remote controller for model migration.
type ModelResult ¶
ModelResult holds the result of an API call returning a name and UUID for a model.
type ModelSet ¶
type ModelSet struct {
Config map[string]interface{}
}
ModelSet contains the arguments for ModelSet client API call.
type ModelSkeletonConfigArgs ¶
ModelSkeletonConfigArgs wraps the args for modelmanager.SkeletonConfig.
type ModelStatus ¶
type ModelStatus struct { ModelTag string `json:"model-tag"` Life Life `json:"life"` HostedMachineCount int `json:"hosted-machine-count"` ServiceCount int `json:"service-count"` OwnerTag string `json:"owner-tag"` }
ModelStatus holds information about the status of a juju model.
type ModelStatusResults ¶
type ModelStatusResults struct {
Results []ModelStatus `json:"models"`
}
ModelStatusResults holds status information about a group of models.
type ModelUnset ¶
type ModelUnset struct {
Keys []string
}
ModelUnset contains the arguments for ModelUnset client API call.
type ModelUserInfo ¶
type ModelUserInfo struct { UserName string `json:"user"` DisplayName string `json:"displayname"` LastConnection *time.Time `json:"lastconnection"` Access ModelAccessPermission `json:"access"` }
ModelUserInfo holds information on a user who has access to a model. Owners of a model can see this information for all users who have access, so it should not include sensitive information.
type ModelUserInfoResult ¶
type ModelUserInfoResult struct { Result *ModelUserInfo `json:"result,omitempty"` Error *Error `json:"error,omitempty"` }
ModelUserInfoResult holds the result of an ModelUserInfo call.
type ModelUserInfoResults ¶
type ModelUserInfoResults struct {
Results []ModelUserInfoResult `json:"results"`
}
ModelUserInfoResults holds the result of a bulk ModelUserInfo API call.
type ModifyModelAccess ¶
type ModifyModelAccess struct { UserTag string `json:"user-tag"` Action ModelAction `json:"action"` Access ModelAccessPermission `json:"access"` ModelTag string `json:"model-tag"` }
type ModifyModelAccessRequest ¶
type ModifyModelAccessRequest struct {
Changes []ModifyModelAccess `json:"changes"`
}
ModifyModelAccessRequest holds the parameters for making grant and revoke model calls.
type ModifyUserSSHKeys ¶
ModifyUserSSHKeys stores parameters used for a KeyManager.Add|Delete|Import call for a user.
type MongoUpgradeResults ¶
type MongoUpgradeResults struct { RsMembers []replicaset.Member Master HAMember Members []HAMember }
MongoUpgradeResults holds the results of an attempt to enter upgrade mongo mode.
type NetworkConfig ¶
type NetworkConfig struct { // DeviceIndex specifies the order in which the network interface // appears on the host. The primary interface has an index of 0. DeviceIndex int `json:"DeviceIndex"` // MACAddress is the network interface's hardware MAC address // (e.g. "aa:bb:cc:dd:ee:ff"). MACAddress string `json:"MACAddress"` // CIDR of the network, in 123.45.67.89/24 format. CIDR string `json:"CIDR"` // MTU is the Maximum Transmission Unit controlling the maximum size of the // protocol packats that the interface can pass through. It is only used // when > 0. MTU int `json:"MTU"` // ProviderId is a provider-specific network interface id. ProviderId string `json:"ProviderId"` // ProviderSubnetId is a provider-specific subnet id, to which the // interface is attached to. ProviderSubnetId string `json:"ProviderSubnetId"` // ProviderSpaceId is a provider-specific space id, to which the interface // is attached to, if known and supported. ProviderSpaceId string `json:"ProviderSpaceId"` // ProviderAddressId is the provider-specific id of the assigned address, if // supported and known. ProviderAddressId string `json:"ProviderAddressId"` // ProviderVLANId is the provider-specific id of the assigned address's // VLAN, if supported and known. ProviderVLANId string `json:"ProviderVLANId"` // 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:"VLANTag"` // InterfaceName is the raw OS-specific network device name (e.g. // "eth1", even for a VLAN eth1.42 virtual interface). InterfaceName string `json:"InterfaceName"` // ParentInterfaceName is the name of the parent interface to use, if known. ParentInterfaceName string `json:"ParentInterfaceName"` // InterfaceType is the type of the interface. InterfaceType string `json:"InterfaceType"` // 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:"NoAutoStart,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:"ConfigType,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:"DNSServers,omitempty"` // DNSServers contains an optional list of IP addresses and/or // hostnames to configure as DNS servers for this network // interface. DNSSearchDomains []string `json:"DNSSearchDomains,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:"GatewayAddress,omitempty"` }
NetworkConfig describes the necessary information to configure a single network interface on a machine. This mostly duplicates network.InterfaceInfo type and it's defined here so it can be kept separate and stable as definition to ensure proper wire-format for the API.
type NetworkConfigs ¶
type NetworkConfigs struct { Results []NetworkConfig Errors []error }
NetworkConfigs holds the network configuration for multiple networks
type NotifyWatchResult ¶
NotifyWatchResult holds a NotifyWatcher id and an error (if any).
type NotifyWatchResults ¶
type NotifyWatchResults struct {
Results []NotifyWatchResult
}
NotifyWatchResults holds the results for any API call which ends up returning a list of NotifyWatchers
type PhaseResult ¶
type PhaseResults ¶
type PhaseResults struct {
Results []PhaseResult `json:"Results"`
}
type Port ¶
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 ¶
FromNetworkPort is a convenience helper to create a parameter out of the network type, here for Port.
func (Port) NetworkPort ¶
NetworkPort is a convenience helper to return the parameter as network type, here for Port.
type PortRange ¶
type PortRange struct { FromPort int `json:"FromPort"` ToPort int `json:"ToPort"` 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 ¶
FromNetworkPortRange is a convenience helper to create a parameter out of the network type, here for PortRange.
func (PortRange) NetworkPortRange ¶
NetworkPortRange is a convenience helper to return the parameter as network type, here for PortRange.
type PortsResult ¶
PortsResult holds the result of an API call that returns a slice of Port or an error.
type PortsResults ¶
type PortsResults struct {
Results []PortsResult `json:"Results"`
}
PortsResults holds the bulk operation result of an API call that returns a slice of Port.
type PrivateAddress ¶
type PrivateAddress struct {
Target string
}
PrivateAddress holds parameters for the PrivateAddress call.
type PrivateAddressResults ¶
type PrivateAddressResults struct {
PrivateAddress string
}
PrivateAddressResults holds results of the PrivateAddress call.
type ProviderSpace ¶
type ProviderSpace struct { Name string `json:"Name"` ProviderId string `json:"ProviderId"` Subnets []Subnet `json:"Subnets"` Error *Error `json:"Error,omitempty"` }
ProviderSpace holds the information about a single space and its associated subnets.
type ProvisioningInfo ¶
type ProvisioningInfo struct { Constraints constraints.Value Series string Placement string Jobs []multiwatcher.MachineJob Volumes []VolumeParams Tags map[string]string SubnetsToZones map[string][]string ImageMetadata []CloudImageMetadata EndpointBindings map[string]string }
ProvisioningInfo holds machine provisioning info.
type ProvisioningInfoResult ¶
type ProvisioningInfoResult struct { Error *Error Result *ProvisioningInfo }
ProvisioningInfoResult holds machine provisioning info or an error.
type ProvisioningInfoResults ¶
type ProvisioningInfoResults struct {
Results []ProvisioningInfoResult
}
ProvisioningInfoResults holds multiple machine provisioning info results.
type ProvisioningScriptParams ¶
type ProvisioningScriptParams struct { MachineId string Nonce string // DataDir may be "", in which case the default will be used. DataDir string // 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 }
ProvisioningScriptParams contains the parameters for the ProvisioningScript client API call.
type ProvisioningScriptResult ¶
type ProvisioningScriptResult struct {
Script string
}
ProvisioningScriptResult contains the result of the ProvisioningScript client API call.
type ProxyConfig ¶
type ProxyConfigResult ¶
type ProxyConfigResult struct { ProxySettings ProxyConfig `json:"ProxySettings"` APTProxySettings ProxyConfig `json:"APTProxySettings"` Error *Error `json:"Error,omitempty"` }
ProxyConfigResult contains information needed to configure a clients proxy settings
type ProxyConfigResults ¶
type ProxyConfigResults struct {
Results []ProxyConfigResult `json:"Results"`
}
ProxyConfigResults contains information needed to configure multiple clients proxy settings
type PublicAddress ¶
type PublicAddress struct {
Target string
}
PublicAddress holds parameters for the PublicAddress call.
type PublicAddressResults ¶
type PublicAddressResults struct {
PublicAddress string
}
PublicAddressResults holds results of the PublicAddress call.
type ReauthRequest ¶
ReauthRequest holds a challenge/response token meaningful to the identity provider.
type RebootAction ¶
type RebootAction string
RebootAction defines the action a machine should take when a hook needs to reboot
const ( // ShouldDoNothing instructs a machine agent that no action // is required on its part ShouldDoNothing RebootAction = "noop" // ShouldReboot instructs a machine to reboot // this happens when a hook running on a machine, requests // a reboot ShouldReboot RebootAction = "reboot" // ShouldShutdown instructs a machine to shut down. This usually // happens when running inside a container, and a hook on the parent // machine requests a reboot ShouldShutdown RebootAction = "shutdown" )
type RebootActionResult ¶
type RebootActionResult struct { Result RebootAction `json:"result,omitempty"` Error *Error `json:"error,omitempty"` }
RebootActionResult holds the result of a single call to machine.ShouldRebootOrShutdown.
type RebootActionResults ¶
type RebootActionResults struct {
Results []RebootActionResult `json:"results,omitempty"`
}
RebootActionResults holds a list of RebootActionResult and any error.
type RelationIds ¶
type RelationIds struct {
RelationIds []int
}
RelationIds holds multiple relation ids.
type RelationResult ¶
type RelationResult struct { Error *Error Life Life Id int Key string Endpoint multiwatcher.Endpoint }
RelationResult returns information about a single relation, or an error.
type RelationResults ¶
type RelationResults struct {
Results []RelationResult
}
RelationResults holds the result of an API call that returns information about multiple relations.
type RelationStatus ¶
type RelationStatus struct { Id int Key string Interface string Scope charm.RelationScope Endpoints []EndpointStatus }
RelationStatus holds status info about a relation.
type RelationUnit ¶
RelationUnit holds a relation and a unit tag.
type RelationUnitPair ¶
RelationUnitPair holds a relation tag, a local and remote unit tags.
type RelationUnitPairs ¶
type RelationUnitPairs struct {
RelationUnitPairs []RelationUnitPair
}
RelationUnitPairs holds the parameters for API calls expecting multiple sets of a relation tag, a local and remote unit tags.
type RelationUnitSettings ¶
RelationUnitSettings holds a relation tag, a unit tag and local unit settings.
type RelationUnits ¶
type RelationUnits struct {
RelationUnits []RelationUnit
}
RelationUnits holds the parameters for API calls expecting a pair of relation and unit tags.
type RelationUnitsChange ¶
type RelationUnitsChange struct { // Changed holds a set of units that are known to be in scope, and the // latest known settings version for each. Changed map[string]UnitSettings `json:"Changed"` // Departed holds a set of units that have previously been reported to // be in scope, but which no longer are. Departed []string `json:"Departed"` }
RelationUnitsChange describes the membership and settings of; or changes to; some relation scope.
type RelationUnitsSettings ¶
type RelationUnitsSettings struct {
RelationUnits []RelationUnitSettings
}
RelationUnitsSettings holds the arguments for making a EnterScope or WriteSettings API calls.
type RelationUnitsWatchResult ¶
type RelationUnitsWatchResult struct { RelationUnitsWatcherId string `json:"RelationUnitsWatcherId"` Changes RelationUnitsChange `json:"Changes"` Error *Error `json:"Error"` }
RelationUnitsWatchResult holds a RelationUnitsWatcher id, baseline state (in the Changes field), and an error (if any).
type RelationUnitsWatchResults ¶
type RelationUnitsWatchResults struct {
Results []RelationUnitsWatchResult
}
RelationUnitsWatchResults holds the results for any API call which ends up returning a list of RelationUnitsWatchers.
type ReleaseLeadershipBulkParams ¶
type ReleaseLeadershipBulkParams struct {
Params []ReleaseLeadershipParams
}
ReleaseLeadershipBulkParams is a collection of parameters needed to make a bulk release leadership call.
type ReleaseLeadershipBulkResults ¶
type ReleaseLeadershipBulkResults ErrorResults
ReleaseLeadershipBulkResults is a type which contains results from a bulk leadership call.
type ReleaseLeadershipParams ¶
type ReleaseLeadershipParams struct { // ServiceTag is the service for which you want to make a // leadership claim. ServiceTag string // UnitTag is the unit which is making the leadership claim. UnitTag string }
ReleaseLeadershipParams are the parameters needed to release a leadership claim.
type RemoveBlocksArgs ¶
type RemoveBlocksArgs struct {
All bool `json:"all"`
}
RemoveBlocksArgs holds the arguments for the RemoveBlocks command. It is a struct to facilitate the easy addition of being able to remove blocks for individual models at a later date.
type ResolveCharmResult ¶
type ResolveCharmResult struct { URL *charm.URL `json:",omitempty"` Error string `json:",omitempty"` }
ResolveCharmResult holds the result of resolving a charm reference to a URL, or any error that occurred.
type ResolveCharmResults ¶
type ResolveCharmResults struct {
URLs []ResolveCharmResult
}
ResolveCharmResults holds results of the ResolveCharms call.
type ResolveCharms ¶
type ResolveCharms struct {
References []charm.URL
}
ResolveCharms stores charm references for a ResolveCharms call.
type ResolvedMode ¶
type ResolvedMode string
ResolvedMode describes the way state transition errors are resolved.
const ( ResolvedNone ResolvedMode = "" ResolvedRetryHooks ResolvedMode = "retry-hooks" ResolvedNoHooks ResolvedMode = "no-hooks" )
type ResolvedModeResult ¶
type ResolvedModeResult struct { Error *Error Mode ResolvedMode }
ResolvedModeResult holds a resolved mode or an error.
type ResolvedModeResults ¶
type ResolvedModeResults struct {
Results []ResolvedModeResult
}
ResolvedModeResults holds the bulk operation result of an API call that returns a resolved mode or an error.
type ResolvedResults ¶
ResolvedResults holds results of the Resolved call.
type RestoreArgs ¶
type RestoreArgs struct { // BackupId holds the id of the backup in server if any BackupId string }
RestoreArgs Holds the backup file or id
type ResumeReplicationParams ¶
type ResumeReplicationParams struct {
Members []replicaset.Member
}
ResumeReplicationParams holds the members of a HA that must be resumed.
type RetryStrategy ¶
type RetryStrategy struct { ShouldRetry bool MinRetryTime time.Duration MaxRetryTime time.Duration JitterRetryTime bool RetryTimeFactor int64 }
RetryStrategy holds the necessary information to configure retries.
type RetryStrategyResult ¶
type RetryStrategyResult struct { Error *Error Result *RetryStrategy }
RetryStrategyResult holds a RetryStrategy or an error.
type RetryStrategyResults ¶
type RetryStrategyResults struct {
Results []RetryStrategyResult
}
RetryStrategyResults holds the bulk operation result of an API call that returns a RetryStrategy or an error.
type RunParams ¶
type RunParams struct { Commands string Timeout time.Duration Machines []string Services []string Units []string }
RunParams is used to provide the parameters to the Run method. Commands and Timeout are expected to have values, and one or more values should be in the Machines, Services, or Units slices.
type RunResult ¶
type RunResult struct { exec.ExecResponse MachineId string UnitId string Error string }
RunResult contains the result from an individual run call on a machine. UnitId is populated if the command was run inside the unit context.
type RunResults ¶
type RunResults struct {
Results []RunResult
}
RunResults is used to return the slice of results. API server side calls need to return single structure values.
type SSHHostKeySet ¶
type SSHHostKeySet struct {
EntityKeys []SSHHostKeys `json:"entity-keys"`
}
SSHHostKeySet defines SSH host keys for one or more entities (typically machines).
type SSHHostKeys ¶
SSHHostKeys defines the SSH host keys for one entity.
type SecretKeyLoginRequest ¶
type SecretKeyLoginRequest struct { // User is the tag-representation of the user that the // requester wishes to authenticate as. User string `json:"user"` // Nonce is the nonce used by the client to encrypt // and authenticate PayloadCiphertext. Nonce []byte `json:"nonce"` // PayloadCiphertext is the encrypted and authenticated // payload. The payload is encrypted/authenticated using // NaCl Secretbox. PayloadCiphertext []byte `json:"ciphertext"` }
SecretKeyLoginRequest contains the parameters for completing the registration of a user. The request contains the tag of the user, and an encrypted and authenticated payload that proves that the requester has a secret key recorded on the controller.
type SecretKeyLoginRequestPayload ¶
type SecretKeyLoginRequestPayload struct { // Password is the new password to set for the user. Password string `json:"password"` }
SecretKeyLoginRequestPayload is JSON-encoded and then encrypted and authenticated with the NaCl Secretbox algorithm.
type SecretKeyLoginResponse ¶
type SecretKeyLoginResponse struct { // Nonce is the nonce used by the server to encrypt and // authenticate PayloadCiphertext. Nonce []byte `json:"nonce"` // PayloadCiphertext is the encrypted and authenticated // payload, which is a JSON-encoded SecretKeyLoginResponsePayload. PayloadCiphertext []byte `json:"ciphertext"` }
SecretKeyLoginResponse contains the result of completing a user registration. This contains an encrypted and authenticated payload, containing the information necessary to securely log into the controller via the standard password authentication method.
type SecretKeyLoginResponsePayload ¶
type SecretKeyLoginResponsePayload struct { // CACert is the CA certificate, required to establish a secure // TLS connection to the Juju controller CACert string `json:"ca-cert"` // ControllerUUID is the UUID of the Juju controller. ControllerUUID string `json:"controller-uuid"` // Macaroon is a time-limited macaroon that can be used for // authenticating as the registered user. Macaroon *macaroon.Macaroon `json:"macaroon"` }
SecretKeyLoginResponsePayload is JSON-encoded and then encrypted and authenticated with the NaCl Secretbox algorithm.
type SerializedModel ¶
type SerializedModel struct {
Bytes []byte `json:"bytes"`
}
SerializedModel wraps a buffer contain a serialised Juju model.
type ServiceCharmActionsResult ¶
type ServiceCharmActionsResult struct { ServiceTag string `json:"servicetag,omitempty"` Actions *charm.Actions `json:"actions,omitempty"` Error *Error `json:"error,omitempty"` }
ServiceCharmActionsResult holds service name and charm.Actions for the service. If an error such as a missing charm or malformed service name occurs, it is encapsulated in this type.
type ServiceCharmRelations ¶
type ServiceCharmRelations struct {
ServiceName string
}
ServiceCharmRelations holds parameters for making the service CharmRelations call.
type ServiceCharmRelationsResults ¶
type ServiceCharmRelationsResults struct {
CharmRelations []string
}
ServiceCharmRelationsResults holds the results of the service CharmRelations call.
type ServiceDeploy ¶
type ServiceDeploy struct { ServiceName string Series string CharmUrl string Channel string NumUnits int Config map[string]string ConfigYAML string // Takes precedence over config if both are present. Constraints constraints.Value Placement []*instance.Placement Storage map[string]storage.Constraints EndpointBindings map[string]string Resources map[string]string }
ServiceDeploy holds the parameters for making the service Deploy call.
type ServiceDestroy ¶
type ServiceDestroy struct {
ServiceName string
}
ServiceDestroy holds the parameters for making the service Destroy call.
type ServiceExpose ¶
type ServiceExpose struct {
ServiceName string
}
ServiceExpose holds the parameters for making the service Expose call.
type ServiceGet ¶
type ServiceGet struct {
ServiceName string
}
ServiceGet holds parameters for making the Get or GetCharmURL calls.
type ServiceGetResults ¶
type ServiceGetResults struct { Service string Charm string Config map[string]interface{} Constraints constraints.Value }
ServiceGetResults holds results of the service Get call.
type ServiceMetricCredential ¶
ServiceMetricCredential holds parameters for the SetServiceCredentials call.
type ServiceMetricCredentials ¶
type ServiceMetricCredentials struct {
Creds []ServiceMetricCredential
}
ServiceMetricCredentials holds multiple ServiceMetricCredential parameters.
type ServiceSet ¶
ServiceSet holds the parameters for a service Set command. Options contains the configuration data.
type ServiceSetCharm ¶
type ServiceSetCharm struct { // ServiceName is the name of the service to set the charm on. ServiceName string `json:"servicename"` // CharmUrl is the new url for the charm. CharmUrl string `json:"charmurl"` // Channel is the charm store channel from which the charm came. Channel string `json:"cs-channel"` // ForceUnits forces the upgrade on units in an error state. ForceUnits bool `json:"forceunits"` // ForceSeries forces the use of the charm even if it doesn't match the // series of the unit. ForceSeries bool `json:"forceseries"` // ResourceIDs is a map of resource names to resource IDs to activate during // the upgrade. ResourceIDs map[string]string `json:"resourceids"` }
ServiceSetCharm sets the charm for a given service.
type ServiceStatus ¶
type ServiceStatus struct { Err error Charm string Exposed bool Life string Relations map[string][]string CanUpgradeTo string SubordinateTo []string Units map[string]UnitStatus MeterStatuses map[string]MeterStatus Status DetailedStatus }
ServiceStatus holds status info about a service.
type ServiceStatusResult ¶
type ServiceStatusResult struct { Service StatusResult Units map[string]StatusResult Error *Error }
ServiceStatusResult holds results for a service Full Status
type ServiceStatusResults ¶
type ServiceStatusResults struct {
Results []ServiceStatusResult
}
ServiceStatusResults holds multiple StatusResult.
type ServiceUnexpose ¶
type ServiceUnexpose struct {
ServiceName string
}
ServiceUnexpose holds parameters for the service Unexpose call.
type ServiceUnset ¶
ServiceUnset holds the parameters for a service Unset command. Options contains the option attribute names to unset.
type ServiceUpdate ¶
type ServiceUpdate struct { ServiceName string CharmUrl string ForceCharmUrl bool ForceSeries bool MinUnits *int SettingsStrings map[string]string SettingsYAML string // Takes precedence over SettingsStrings if both are present. Constraints *constraints.Value }
ServiceUpdate holds the parameters for making the service Update call.
type ServicesCharmActionsResults ¶
type ServicesCharmActionsResults struct {
Results []ServiceCharmActionsResult `json:"results,omitempty"`
}
ServicesCharmActionsResults holds a slice of ServiceCharmActionsResult for a bulk result of charm Actions for Services.
type ServicesDeploy ¶
type ServicesDeploy struct {
Services []ServiceDeploy
}
ServicesDeploy holds the parameters for deploying one or more services.
type SetAnnotations ¶
SetAnnotations stores parameters for making the SetAnnotations call.
type SetConstraints ¶
type SetConstraints struct { ServiceName string //optional, if empty, model constraints are set. Constraints constraints.Value }
SetConstraints stores parameters for making the SetConstraints call.
type SetMachineBlockDevices ¶
type SetMachineBlockDevices struct {
MachineBlockDevices []MachineBlockDevices `json:"machineblockdevices"`
}
SetMachineBlockDevices holds the arguments for recording the block devices present on a set of machines.
type SetMachineNetworkConfig ¶
type SetMachineNetworkConfig struct { Tag string `json:"Tag"` Config []NetworkConfig `json:"Config"` }
SetMachineNetworkConfig holds the parameters for making an API call to update machine network config.
type SetMachinesAddresses ¶
type SetMachinesAddresses struct {
MachineAddresses []MachineAddresses `json:"MachineAddresses"`
}
SetMachinesAddresses holds the parameters for making an API call to update machine addresses.
type SetMigrationPhaseArgs ¶
type SetMigrationPhaseArgs struct {
Phase string `json:"phase"`
}
SetMigrationPhaseArgs provides a migration phase to the migrationmaster.SetPhase API method.
type SetModelAgentVersion ¶
SetModelAgentVersion contains the arguments for SetModelAgentVersion client API call.
type SetStatus ¶
type SetStatus struct {
Entities []EntityStatusArgs
}
SetStatus holds the parameters for making a SetStatus/UpdateStatus call.
type SettingsResult ¶
SettingsResult holds a relation settings map or an error.
type SettingsResults ¶
type SettingsResults struct {
Results []SettingsResult
}
SettingsResults holds the result of an API calls that returns settings for multiple relations.
type SingularClaim ¶
type SingularClaim struct { ModelTag string `json:"ModelTag"` ControllerTag string `json:"ControllerTag"` Duration time.Duration `json:"Duration"` }
SingularClaim represents a request for exclusive model administration access on the part of some controller.
type SingularClaims ¶
type SingularClaims struct {
Claims []SingularClaim `json:"Claims"`
}
SingularClaims holds any number of SingularClaim~s.
type Space ¶
type Space struct { Name string `json:"Name"` Subnets []Subnet `json:"Subnets"` Error *Error `json:"Error,omitempty"` }
Space holds the information about a single space and its associated subnets.
type SpaceResult ¶
SpaceResult holds a single space tag or an error.
type SpaceResults ¶
type SpaceResults struct {
Results []SpaceResult `json:"Results"`
}
SpaceResults holds the bulk operation result of an API call that returns space tags or an errors.
type StateServingInfo ¶
type StateServingInfo struct { APIPort int StatePort int // The controller cert and corresponding private key. Cert string PrivateKey string // The private key for the CA cert so that a new controller // cert can be generated when needed. CAPrivateKey string // this will be passed as the KeyFile argument to MongoDB SystemIdentity string }
StateServingInfo holds information needed by a state server.
type StatusHistoryArgs ¶
type StatusHistoryArgs struct { Kind HistoryKind Size int Name string }
StatusHistoryArgs holds the parameters to filter a status history query.
type StatusHistoryPruneArgs ¶
type StatusHistoryPruneArgs struct {
MaxLogsPerEntity int
}
StatusHistoryPruneArgs holds arguments for status history prunning process.
type StatusHistoryResults ¶
type StatusHistoryResults struct {
Statuses []DetailedStatus
}
StatusHistoryResults holds a slice of statuses.
type StatusParams ¶
type StatusParams struct {
Patterns []string
}
StatusParams holds parameters for the Status call.
type StatusResult ¶
type StatusResult struct { Error *Error Id string Life Life Status status.Status Info string Data map[string]interface{} Since *time.Time }
StatusResult holds an entity status, extra information, or an error.
type StatusResults ¶
type StatusResults struct {
Results []StatusResult
}
StatusResults holds multiple status results.
type StorageAddParams ¶
type StorageAddParams struct { // UnitTag is unit name. UnitTag string `json:"unit"` // StorageName is the name of the storage as specified in the charm. StorageName string `bson:"name"` // Constraints are specified storage constraints. Constraints StorageConstraints `json:"storage"` }
StorageAddParams holds storage details to add to a unit dynamically.
type StorageAttachment ¶
type StorageAttachment struct { StorageTag string OwnerTag string UnitTag string Kind StorageKind Location string Life Life }
StorageAttachment describes a unit's attached storage instance.
type StorageAttachmentDetails ¶
type StorageAttachmentDetails struct { // StorageTag is the tag of the storage instance. StorageTag string `json:"storagetag"` // UnitTag is the tag of the unit attached to the storage instance. UnitTag string `json:"unittag"` // MachineTag is the tag of the machine that the attached unit is assigned to. MachineTag string `json:"machinetag"` // Location holds location (mount point/device path) of // the attached storage. Location string `json:"location,omitempty"` }
StorageAttachmentDetails holds detailed information about a storage attachment.
type StorageAttachmentId ¶
type StorageAttachmentId struct { StorageTag string `json:"storagetag"` UnitTag string `json:"unittag"` }
StorageAttachmentId identifies a storage attachment by the tags of the related unit and storage instance.
type StorageAttachmentIds ¶
type StorageAttachmentIds struct {
Ids []StorageAttachmentId `json:"ids"`
}
StorageAttachmentIds holds a set of storage attachment identifiers.
type StorageAttachmentIdsResult ¶
type StorageAttachmentIdsResult struct { Result StorageAttachmentIds `json:"result"` Error *Error `json:"error,omitempty"` }
StorageAttachmentIdsResult holds the result of an API call to retrieve the IDs of a unit's attached storage instances.
type StorageAttachmentIdsResults ¶
type StorageAttachmentIdsResults struct {
Results []StorageAttachmentIdsResult `json:"results,omitempty"`
}
StorageAttachmentIdsResult holds the result of an API call to retrieve the IDs of multiple units attached storage instances.
type StorageAttachmentResult ¶
type StorageAttachmentResult struct { Result StorageAttachment `json:"result"` Error *Error `json:"error,omitempty"` }
StorageAttachmentResult holds the result of an API call to retrieve details of a storage attachment.
type StorageAttachmentResults ¶
type StorageAttachmentResults struct {
Results []StorageAttachmentResult `json:"results,omitempty"`
}
StorageAttachmentResults holds the result of an API call to retrieve details of multiple storage attachments.
type StorageAttachmentsResult ¶
type StorageAttachmentsResult struct { Result []StorageAttachment `json:"result"` Error *Error `json:"error,omitempty"` }
StorageAttachmentsResult holds the result of an API call to retrieve details of a unit's attached storage instances.
type StorageAttachmentsResults ¶
type StorageAttachmentsResults struct {
Results []StorageAttachmentsResult `json:"results,omitempty"`
}
StorageAttachmentsResults holds the result of an API call to retrieve details of multiple units' attached storage instances.
type StorageConstraints ¶
type StorageConstraints struct { // Pool is the name of the storage pool from which to provision the // storage instance. Pool string `bson:"pool,omitempty"` // Size is the required size of the storage instance, in MiB. Size *uint64 `bson:"size,omitempty"` // Count is the required number of storage instances. Count *uint64 `bson:"count,omitempty"` }
StorageConstraints contains constraints for storage instance.
type StorageDetails ¶
type StorageDetails struct { // StorageTag holds tag for this storage. StorageTag string `json:"storagetag"` // OwnerTag holds tag for the owner of this storage, unit or service. OwnerTag string `json:"ownertag"` // Kind holds what kind of storage this instance is. Kind StorageKind `json:"kind"` // Status contains the status of the storage instance. Status EntityStatus `json:"status"` // Persistent reports whether or not the underlying volume or // filesystem is persistent; i.e. whether or not it outlives // the machine that it is attached to. Persistent bool // Attachments contains a mapping from unit tag to // storage attachment details. Attachments map[string]StorageAttachmentDetails `json:"attachments,omitempty"` }
StorageDetails holds information about storage.
type StorageDetailsListResult ¶
type StorageDetailsListResult struct { Result []StorageDetails `json:"result,omitempty"` Error *Error `json:"error,omitempty"` }
StorageDetailsListResult holds a collection of storage details.
type StorageDetailsListResults ¶
type StorageDetailsListResults struct {
Results []StorageDetailsListResult `json:"results,omitempty"`
}
StorageDetailsListResults holds a collection of collections of storage details.
type StorageDetailsResult ¶
type StorageDetailsResult struct { Result *StorageDetails `json:"result,omitempty"` Error *Error `json:"error,omitempty"` }
StorageDetailsResult holds information about a storage instance or error related to its retrieval.
type StorageDetailsResults ¶
type StorageDetailsResults struct {
Results []StorageDetailsResult `json:"results,omitempty"`
}
StorageDetailsResults holds results for storage details or related storage error.
type StorageFilter ¶
type StorageFilter struct { }
StorageFilter holds filter terms for listing storage details.
type StorageFilters ¶
type StorageFilters struct {
Filters []StorageFilter `json:"filters,omitempty"`
}
StorageFilters holds a set of storage filters.
type StorageInstance ¶
type StorageInstance struct { StorageTag string OwnerTag string Kind StorageKind }
StorageInstance describes a storage instance.
type StorageInstanceResult ¶
type StorageInstanceResult struct { Result StorageInstance `json:"result"` Error *Error `json:"error,omitempty"` }
StorageInstanceResult holds the result of an API call to retrieve details of a storage instance.
type StorageInstanceResults ¶
type StorageInstanceResults struct {
Results []StorageInstanceResult `json:"results,omitempty"`
}
StorageInstanceResults holds the result of an API call to retrieve details of multiple storage instances.
type StorageKind ¶
type StorageKind int
StorageKind is the kind of a storage instance.
const ( StorageKindUnknown StorageKind = iota StorageKindBlock StorageKindFilesystem )
func (*StorageKind) String ¶
func (k *StorageKind) String() string
String returns representation of StorageKind for readability.
type StoragePool ¶
type StoragePool struct { // Name is the pool's name. Name string `json:"name"` // Provider is the type of storage provider this pool represents, eg "loop", "ebs". Provider string `json:"provider"` // Attrs are the pool's configuration attributes. Attrs map[string]interface{} `json:"attrs"` }
StoragePool holds data for a pool instance.
type StoragePoolFilter ¶
type StoragePoolFilter struct { // Names are pool's names to filter on. Names []string `json:"names,omitempty"` // Providers are pool's storage provider types to filter on. Providers []string `json:"providers,omitempty"` }
StoragePoolFilter holds a filter for matching storage pools.
type StoragePoolFilters ¶
type StoragePoolFilters struct {
Filters []StoragePoolFilter `json:"filters,omitempty"`
}
StoragePoolFilters holds a collection of storage pool filters.
type StoragePoolsResult ¶
type StoragePoolsResult struct { Result []StoragePool `json:"storagepools,omitempty"` Error *Error `json:"error,omitempty"` }
StoragePoolsResult holds a collection of storage pools.
type StoragePoolsResults ¶
type StoragePoolsResults struct {
Results []StoragePoolsResult `json:"results,omitempty"`
}
StoragePoolsResults holds a collection of storage pools results.
type StoragesAddParams ¶
type StoragesAddParams struct {
Storages []StorageAddParams `json:"storages"`
}
StoragesAddParams holds storage details to add to units dynamically.
type StringBoolResult ¶
StringBoolResult holds the result of an API call that returns a string and a boolean.
type StringBoolResults ¶
type StringBoolResults struct {
Results []StringBoolResult
}
StringBoolResults holds multiple results with a string and a bool each.
type StringResult ¶
StringResult holds a string or an error.
type StringResults ¶
type StringResults struct {
Results []StringResult
}
StringResults holds the bulk operation result of an API call that returns a string or an error.
type StringsResult ¶
StringsResult holds the result of an API call that returns a slice of strings or an error.
type StringsResults ¶
type StringsResults struct {
Results []StringsResult
}
StringsResults holds the bulk operation result of an API call that returns a slice of strings or an error.
type StringsWatchResult ¶
StringsWatchResult holds a StringsWatcher id, changes and an error (if any).
type StringsWatchResults ¶
type StringsWatchResults struct {
Results []StringsWatchResult
}
StringsWatchResults holds the results for any API call which ends up returning a list of StringsWatchers.
type Subnet ¶
type Subnet struct { // CIDR of the subnet in IPv4 or IPv6 notation. CIDR string `json:"CIDR"` // ProviderId is the provider-specific subnet ID (if applicable). ProviderId string `json:"ProviderId,omitempty"` // VLANTag needs to be between 1 and 4094 for VLANs and 0 for // normal networks. It's defined by IEEE 802.1Q standard. VLANTag int `json:"VLANTag"` // Life is the subnet's life cycle value - Alive means the subnet // is in use by one or more machines, Dying or Dead means the // subnet is about to be removed. Life Life `json:"Life"` // SpaceTag is the Juju network space this subnet is associated // with. SpaceTag string `json:"SpaceTag"` // Zones contain one or more availability zones this subnet is // associated with. Zones []string `json:"Zones"` // StaticRangeLowIP (if available) is the lower bound of the // subnet's static IP allocation range. StaticRangeLowIP net.IP `json:"StaticRangeLowIP,omitempty"` // StaticRangeHighIP (if available) is the higher bound of the // subnet's static IP allocation range. StaticRangeHighIP net.IP `json:"StaticRangeHighIP,omitempty"` // Status returns the status of the subnet, whether it is in use, not // in use or terminating. Status string `json:"Status,omitempty"` }
Subnet describes a single subnet within a network.
type SubnetsFilters ¶
type SubnetsFilters struct { SpaceTag string `json:"SpaceTag,omitempty"` Zone string `json:"Zone,omitempty"` }
SubnetsFilters holds an optional SpaceTag and Zone for filtering the subnets returned by a ListSubnets call.
type ToolsResult ¶
ToolsResult holds the tools and possibly error for a given Tools() API call.
type ToolsResults ¶
type ToolsResults struct {
Results []ToolsResult
}
ToolsResults is a list of tools for various requested agents.
type UndertakerModelInfo ¶
type UndertakerModelInfo struct { UUID string Name string GlobalName string IsSystem bool Life Life }
UndertakerModelInfo returns information on an model needed by the undertaker worker.
type UndertakerModelInfoResult ¶
type UndertakerModelInfoResult struct { Error *Error Result UndertakerModelInfo }
UndertakerModelInfoResult holds the result of an API call that returns an UndertakerModelInfoResult or an error.
type UnitNetworkConfig ¶
type UnitNetworkConfig struct { UnitTag string `json:"UnitTag"` BindingName string `json:"BindingName"` }
UnitNetworkConfig holds a unit tag and an endpoint binding name.
type UnitNetworkConfigResult ¶
type UnitNetworkConfigResult struct { Error *Error `json:"Error"` // Tagged to Info due to compatibility reasons. Config []NetworkConfig `json:"Info"` }
UnitNetworkConfigResult holds network configuration for a single unit.
type UnitNetworkConfigResults ¶
type UnitNetworkConfigResults struct {
Results []UnitNetworkConfigResult `json:"Results"`
}
UnitNetworkConfigResults holds network configuration for multiple machines.
type UnitSettings ¶
type UnitSettings struct {
Version int64 `json:"Version"`
}
UnitSettings specifies the version of some unit's settings in some relation.
type UnitStatus ¶
type UnitStatus struct { // AgentStatus holds the status for a unit's agent. AgentStatus DetailedStatus // WorkloadStatus holds the status for a unit's workload WorkloadStatus DetailedStatus Machine string OpenedPorts []string PublicAddress string Charm string Subordinates map[string]UnitStatus }
UnitStatus holds status info about a unit.
type UnitsNetworkConfig ¶
type UnitsNetworkConfig struct {
Args []UnitNetworkConfig `json:"Args"`
}
UnitsNetworkConfig holds the parameters for calling Uniter.NetworkConfig() API.
type UpdateBehavior ¶
UpdateBehavior contains settings that are duplicated in several places. Let's just embed this instead.
type UpgradeMongoParams ¶
UpgradeMongoParams holds the arguments required to enter upgrade mongo mode.
type UserInfo ¶
type UserInfo struct { Username string `json:"username"` DisplayName string `json:"display-name"` CreatedBy string `json:"created-by"` DateCreated time.Time `json:"date-created"` LastConnection *time.Time `json:"last-connection,omitempty"` Disabled bool `json:"disabled"` }
UserInfo holds information on a user.
type UserInfoRequest ¶
type UserInfoRequest struct { Entities []Entity `json:"entities"` IncludeDisabled bool `json:"include-disabled"` }
UserInfoRequest defines the users to return. An empty Entities list indicates that all matching users should be returned.
type UserInfoResult ¶
type UserInfoResult struct { Result *UserInfo `json:"result,omitempty"` Error *Error `json:"error,omitempty"` }
UserInfoResult holds the result of a UserInfo call.
type UserInfoResults ¶
type UserInfoResults struct {
Results []UserInfoResult `json:"results"`
}
UserInfoResults holds the result of a bulk UserInfo API call.
type UserModel ¶
UserModel holds information about a model and the last time the model was accessed for a particular user.
type UserModelList ¶
type UserModelList struct {
UserModels []UserModel
}
UserModelList holds information about a list of models for a particular user.
type VersionResult ¶
VersionResult holds the version and possibly error for a given DesiredVersion() API call.
type VersionResults ¶
type VersionResults struct {
Results []VersionResult
}
VersionResults is a list of versions for the requested entities.
type Volume ¶
type Volume struct { VolumeTag string `json:"volumetag"` Info VolumeInfo `json:"info"` }
Volume identifies and describes a storage volume in the model.
type VolumeAttachment ¶
type VolumeAttachment struct { VolumeTag string `json:"volumetag"` MachineTag string `json:"machinetag"` Info VolumeAttachmentInfo `json:"info"` }
VolumeAttachment identifies and describes a volume attachment.
type VolumeAttachmentInfo ¶
type VolumeAttachmentInfo struct { DeviceName string `json:"devicename,omitempty"` DeviceLink string `json:"devicelink,omitempty"` BusAddress string `json:"busaddress,omitempty"` ReadOnly bool `json:"read-only,omitempty"` }
VolumeAttachmentInfo describes a volume attachment.
type VolumeAttachmentParams ¶
type VolumeAttachmentParams struct { VolumeTag string `json:"volumetag"` MachineTag string `json:"machinetag"` VolumeId string `json:"volumeid,omitempty"` InstanceId string `json:"instanceid,omitempty"` Provider string `json:"provider"` ReadOnly bool `json:"read-only,omitempty"` }
VolumeAttachmentParams holds the parameters for creating a volume attachment.
type VolumeAttachmentParamsResult ¶
type VolumeAttachmentParamsResult struct { Result VolumeAttachmentParams `json:"result"` Error *Error `json:"error,omitempty"` }
VolumeAttachmentParamsResults holds provisioning parameters for a volume attachment.
type VolumeAttachmentParamsResults ¶
type VolumeAttachmentParamsResults struct {
Results []VolumeAttachmentParamsResult `json:"results,omitempty"`
}
VolumeAttachmentParamsResults holds provisioning parameters for multiple volume attachments.
type VolumeAttachmentResult ¶
type VolumeAttachmentResult struct { Result VolumeAttachment `json:"result"` Error *Error `json:"error,omitempty"` }
VolumeAttachmentResult holds the details of a single volume attachment, or an error.
type VolumeAttachmentResults ¶
type VolumeAttachmentResults struct {
Results []VolumeAttachmentResult `json:"results,omitempty"`
}
VolumeAttachmentResults holds a set of VolumeAttachmentResults.
type VolumeAttachments ¶
type VolumeAttachments struct {
VolumeAttachments []VolumeAttachment `json:"volumeattachments"`
}
VolumeAttachments describes a set of storage volume attachments.
type VolumeAttachmentsResult ¶
type VolumeAttachmentsResult struct { Attachments []VolumeAttachment `json:"attachments,omitempty"` Error *Error `json:"error,omitempty"` }
VolumeAttachmentsResult holds the volume attachments for a single machine, or an error.
type VolumeAttachmentsResults ¶
type VolumeAttachmentsResults struct {
Results []VolumeAttachmentsResult `json:"results,omitempty"`
}
VolumeAttachmentsResults holds a set of VolumeAttachmentsResults for a set of machines.
type VolumeDetails ¶
type VolumeDetails struct { // VolumeTag is the tag for the volume. VolumeTag string `json:"volumetag"` // Info contains information about the volume. Info VolumeInfo `json:"info"` // Status contains the status of the volume. Status EntityStatus `json:"status"` // MachineAttachments contains a mapping from // machine tag to volume attachment information. MachineAttachments map[string]VolumeAttachmentInfo `json:"machineattachments,omitempty"` // Storage contains details about the storage instance // that the volume is assigned to, if any. Storage *StorageDetails `json:"storage,omitempty"` }
VolumeDetails describes a storage volume in the model for the purpose of volume CLI commands.
This is kept separate from Volume which contains only information specific to the volume model, whereas VolumeDetails is intended to contain complete information about a volume and related information (status, attachments, storage).
type VolumeDetailsListResult ¶
type VolumeDetailsListResult struct { Result []VolumeDetails `json:"result,omitempty"` Error *Error `json:"error,omitempty"` }
VolumeDetailsListResult holds a collection of volume details.
type VolumeDetailsListResults ¶
type VolumeDetailsListResults struct {
Results []VolumeDetailsListResult `json:"results,omitempty"`
}
VolumeDetailsListResults holds a collection of collections of volume details.
type VolumeDetailsResult ¶
type VolumeDetailsResult struct { // Result describes the volume in detail. Result *VolumeDetails `json:"details,omitempty"` // Error contains volume retrieval error. Error *Error `json:"error,omitempty"` }
VolumeDetailsResult contains details about a volume, its attachments or an error preventing retrieving those details.
type VolumeDetailsResults ¶
type VolumeDetailsResults struct {
Results []VolumeDetailsResult `json:"results,omitempty"`
}
VolumeDetailsResults holds volume details.
type VolumeFilter ¶
type VolumeFilter struct { // Machines are machine tags to filter on. Machines []string `json:"machines,omitempty"` }
VolumeFilter holds a filter for volume list API call.
func (*VolumeFilter) IsEmpty ¶
func (f *VolumeFilter) IsEmpty() bool
IsEmpty determines if filter is empty
type VolumeFilters ¶
type VolumeFilters struct {
Filters []VolumeFilter `json:"filters,omitempty"`
}
VolumeFilters holds a collection of volume filters.
type VolumeInfo ¶
type VolumeInfo struct { VolumeId string `json:"volumeid"` HardwareId string `json:"hardwareid,omitempty"` // Size is the size of the volume in MiB. Size uint64 `json:"size"` Persistent bool `json:"persistent"` }
Volume describes a storage volume in the model.
type VolumeParams ¶
type VolumeParams struct { VolumeTag string `json:"volumetag"` Size uint64 `json:"size"` Provider string `json:"provider"` Attributes map[string]interface{} `json:"attributes,omitempty"` Tags map[string]string `json:"tags,omitempty"` Attachment *VolumeAttachmentParams `json:"attachment,omitempty"` }
VolumeParams holds the parameters for creating a storage volume.
type VolumeParamsResult ¶
type VolumeParamsResult struct { Result VolumeParams `json:"result"` Error *Error `json:"error,omitempty"` }
VolumeParamsResults holds provisioning parameters for a volume.
type VolumeParamsResults ¶
type VolumeParamsResults struct {
Results []VolumeParamsResult `json:"results,omitempty"`
}
VolumeParamsResults holds provisioning parameters for multiple volumes.
type VolumeResult ¶
VolumeResult holds information about a volume.
type VolumeResults ¶
type VolumeResults struct {
Results []VolumeResult `json:"results,omitempty"`
}
VolumeResults holds information about multiple volumes.
type Volumes ¶
type Volumes struct {
Volumes []Volume `json:"volumes"`
}
Volumes describes a set of storage volumes in the model.
type WatchContainer ¶
WatchContainer identifies a single container type within a machine.
type WatchContainers ¶
type WatchContainers struct {
Params []WatchContainer
}
WatchContainers holds the arguments for making a WatchContainers API call.
type ZoneResult ¶
type ZoneResult struct { Error *Error `json:"Error"` Name string `json:"Name"` Available bool `json:"Available"` }
ZoneResult holds the result of an API call that returns an availability zone name and whether it's available for use.
type ZoneResults ¶
type ZoneResults struct {
Results []ZoneResult `json:"Results"`
}
ZoneResults holds multiple ZoneResult results