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 IsCodeLoginExpired(err error) bool
- func IsCodeMachineHasAttachedStorage(err error) bool
- func IsCodeModelNotFound(err error) bool
- func IsCodeNoAddressSet(err error) bool
- func IsCodeNoCreds(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 IsCodeUserNotFound(err error) bool
- func IsMethodNotAllowed(err error) bool
- func IsRedirect(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 ActionSpec
- type Actions
- type ActionsByName
- type ActionsByNames
- type ActionsByReceiver
- type ActionsByReceivers
- type ActionsQueryResult
- type ActionsQueryResults
- type AddApplicationOffer
- type AddApplicationOffers
- type AddApplicationUnits
- type AddApplicationUnitsResults
- type AddCharm
- type AddCharmWithAuthorization
- type AddMachineParams
- type AddMachines
- type AddMachinesResult
- type AddMachinesResults
- type AddPendingResourcesArgs
- type AddPendingResourcesResult
- type AddRelation
- type AddRelationResults
- type AddSubnetParams
- type AddSubnetsParams
- type AddUser
- type AddUserResult
- type AddUserResults
- type AddUsers
- type Address
- type AdoptResourcesArgs
- type AgentGetEntitiesResult
- type AgentGetEntitiesResults
- type AgentVersionResult
- type AllWatcherId
- type AllWatcherNextResults
- type AnnotationsGetResult
- type AnnotationsGetResults
- type AnnotationsSet
- type ApplicationCharmActionsResult
- type ApplicationCharmRelations
- type ApplicationCharmRelationsResults
- type ApplicationDeploy
- type ApplicationDestroy
- type ApplicationExpose
- type ApplicationGet
- type ApplicationGetResults
- type ApplicationMetricCredential
- type ApplicationMetricCredentials
- type ApplicationOffer
- type ApplicationOfferDetails
- type ApplicationOfferResult
- type ApplicationOffersResults
- type ApplicationSet
- type ApplicationSetCharm
- type ApplicationStatus
- type ApplicationStatusResult
- type ApplicationStatusResults
- type ApplicationURLs
- type ApplicationUnexpose
- type ApplicationUnset
- type ApplicationUpdate
- type ApplicationsCharmActionsResults
- type ApplicationsDeploy
- 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 BundleChange
- type BundleChangesParams
- type BundleChangesResults
- type BytesResult
- type CharmActionSpec
- type CharmActions
- type CharmInfo
- type CharmMeta
- type CharmMetric
- type CharmMetrics
- type CharmOption
- type CharmPayloadClass
- type CharmPlan
- type CharmRelation
- type CharmResource
- type CharmResourceMeta
- type CharmStorage
- type CharmURL
- type CharmURLs
- type CharmsList
- type CharmsListResult
- type CharmsResponse
- type ClaimLeadershipBulkParams
- type ClaimLeadershipBulkResults
- type ClaimLeadershipParams
- type Cloud
- type CloudCredential
- type CloudCredentialResult
- type CloudCredentialResults
- type CloudImageMetadata
- type CloudImageMetadataList
- type CloudInstanceTypesConstraint
- type CloudInstanceTypesConstraints
- type CloudRegion
- type CloudResult
- type CloudResults
- type CloudSpec
- type CloudSpecResult
- type CloudSpecResults
- type CloudsResult
- type ConfigSettings
- type ConfigSettingsResult
- type ConfigSettingsResults
- type ConfigValue
- type ConstraintsResult
- type ConstraintsResults
- type ConsumeApplicationArg
- type ConsumeApplicationArgs
- type ConsumeApplicationResult
- type ConsumeApplicationResults
- type ContainerConfig
- type ContainerManagerConfig
- type ContainerManagerConfigParams
- type ControllerAction
- type ControllerConfig
- type ControllerConfigResult
- type ControllersChangeResult
- type ControllersChangeResults
- type ControllersChanges
- type ControllersSpec
- type ControllersSpecs
- type CreateSpaceParams
- type CreateSpacesParams
- type CreateSubnetParams
- type CreateSubnetsParams
- type Creds
- type DeployerConnectionValues
- type DestroyApplicationInfo
- type DestroyApplicationResult
- type DestroyApplicationResults
- type DestroyApplicationUnits
- type DestroyControllerArgs
- type DestroyMachineInfo
- type DestroyMachineResult
- type DestroyMachineResults
- type DestroyMachines
- type DestroyRelation
- type DestroyUnitInfo
- type DestroyUnitResult
- type DestroyUnitResults
- type DetailedStatus
- type DeviceBridgeInfo
- type DigestAlgorithm
- type DiscoverSpacesResults
- type DistributionGroupResult
- type DistributionGroupResults
- type EndpointFilterAttributes
- type EndpointStatus
- type Entities
- type EntitiesCharmURL
- type EntitiesPortRanges
- type EntitiesPorts
- type EntitiesResult
- type EntitiesResults
- 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 EntityWorkloadVersion
- type EntityWorkloadVersions
- type Error
- type ErrorInfo
- type ErrorResult
- type ErrorResults
- type FacadeVersions
- type Filesystem
- type FilesystemAttachment
- type FilesystemAttachmentDetails
- 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 FindApplicationOffersResults
- type FindTags
- type FindTagsResults
- type FindToolsParams
- type FindToolsResult
- type FullStatus
- type GUIArchiveResponse
- type GUIArchiveVersion
- type GUIVersionRequest
- type GetAnnotations
- type GetAnnotationsResults
- type GetApplicationConstraints
- type GetConstraintsResults
- type GetLeadershipSettingsBulkResults
- type GetLeadershipSettingsResult
- type GetTokenArg
- type GetTokenArgs
- type HAMember
- type History
- type HostNetworkChange
- type HostNetworkChangeResults
- type HostPort
- type HostedModelConfig
- type HostedModelConfigsResults
- type ImageFilterParams
- type ImageMetadata
- type ImageMetadataFilter
- type ImageSpec
- type IngressSubnetInfo
- type IngressSubnetResult
- type IngressSubnetResults
- type InitiateMigrationArgs
- type InitiateMigrationResult
- type InitiateMigrationResults
- type InstanceInfo
- type InstanceType
- type InstanceTypesResult
- type InstanceTypesResults
- type InstancesInfo
- type IntResult
- type IntResults
- type IsMasterResult
- type IsMeteredResult
- type JobsResult
- type JobsResults
- type Life
- type LifeResult
- type LifeResults
- type ListApplicationOffersResults
- type ListCloudImageMetadataResult
- type ListImageResult
- type ListResourcesArgs
- type ListSSHKeys
- type ListSpacesResults
- type ListSubnetsResults
- type ListUnitResourcesArgs
- type LogForwardingGetLastSentParams
- type LogForwardingGetLastSentResult
- type LogForwardingGetLastSentResults
- type LogForwardingID
- type LogForwardingSetLastSentParam
- type LogForwardingSetLastSentParams
- type LogMessage
- type LogRecord
- type LogStreamConfig
- type LogStreamRecord
- type LogStreamRecords
- type LoginRequest
- type LoginRequestCompat
- type LoginResult
- type LookUpPayloadArg
- type LookUpPayloadArgs
- type MacaroonResult
- type MacaroonResults
- type MachineAddresses
- type MachineAddressesResult
- type MachineAddressesResults
- type MachineBlockDevices
- type MachineContainers
- type MachineContainersParams
- type MachineHardware
- 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 MapResult
- type MapResults
- type MasterMigrationStatus
- 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 MigrationModelInfo
- type MigrationSpec
- type MigrationStatus
- type MigrationTargetInfo
- type MinionReport
- type MinionReports
- type Model
- type ModelAction
- type ModelArgs
- type ModelBlockInfo
- type ModelBlockInfoList
- type ModelConfig
- type ModelConfigResult
- type ModelConfigResults
- type ModelCreateArgs
- type ModelDefaultValues
- type ModelDefaults
- type ModelDefaultsResult
- type ModelInfo
- type ModelInfoList
- type ModelInfoListResult
- type ModelInfoListResults
- type ModelInfoResult
- type ModelInfoResults
- type ModelInstanceTypesConstraint
- type ModelInstanceTypesConstraints
- type ModelMachineInfo
- type ModelMigrationStatus
- type ModelResult
- type ModelSet
- type ModelStatus
- type ModelStatusInfo
- type ModelStatusResults
- type ModelUnset
- type ModelUnsetKeys
- type ModelUserInfo
- type ModelUserInfoResult
- type ModelUserInfoResults
- type ModifyControllerAccess
- type ModifyControllerAccessRequest
- type ModifyModelAccess
- type ModifyModelAccessRequest
- type ModifyUserSSHKeys
- type MongoUpgradeResults
- type MongoVersion
- type NetworkConfig
- type NetworkInterface
- type NetworkRoute
- type NotifyWatchResult
- type NotifyWatchResults
- type OfferFilter
- type OfferFilters
- type Payload
- type PayloadListArgs
- type PayloadListResults
- type PayloadResult
- type PayloadResults
- type PhaseResult
- type PhaseResults
- type Port
- type PortRange
- type PortsResult
- type PortsResults
- type PrivateAddress
- type PrivateAddressResults
- type ProviderInterfaceInfo
- type ProviderInterfaceInfoResult
- type ProviderInterfaceInfoResults
- type ProviderSpace
- type ProvisioningInfo
- type ProvisioningInfoResult
- type ProvisioningInfoResults
- type ProvisioningScriptParams
- type ProvisioningScriptResult
- type ProxyConfig
- type ProxyConfigResult
- type ProxyConfigResults
- type PubSubMessage
- type PublicAddress
- type PublicAddressResults
- type ReauthRequest
- type RebootAction
- type RebootActionResult
- type RebootActionResults
- type RedirectInfoResult
- type RegionDefaults
- type RegisterRemoteRelation
- type RegisterRemoteRelations
- 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 RemoteApplication
- type RemoteApplicationChange
- type RemoteApplicationChanges
- type RemoteApplicationInfo
- type RemoteApplicationInfoResult
- type RemoteApplicationInfoResults
- type RemoteApplicationResult
- type RemoteApplicationResults
- type RemoteApplicationStatus
- type RemoteApplicationWatchResult
- type RemoteApplicationWatchResults
- type RemoteEndpoint
- type RemoteEntities
- type RemoteEntityArg
- type RemoteEntityArgs
- type RemoteEntityId
- type RemoteEntityIdResult
- type RemoteEntityIdResults
- type RemoteRelation
- type RemoteRelationChangeEvent
- type RemoteRelationResult
- type RemoteRelationResults
- type RemoteRelationUnitChange
- type RemoteRelationsChanges
- type RemoveBlocksArgs
- type ResolveCharmResult
- type ResolveCharmResults
- type ResolveCharms
- type Resolved
- type ResolvedMode
- type ResolvedModeResult
- type ResolvedModeResults
- type ResolvedResults
- type Resource
- type ResourceUploadResult
- type ResourcesResult
- type ResourcesResults
- type RestoreArgs
- type ResumeReplicationParams
- type RetryStrategy
- type RetryStrategyResult
- type RetryStrategyResults
- type RunParams
- type RunResult
- type RunResults
- type SSHAddressResult
- type SSHAddressResults
- type SSHAddressesResult
- type SSHAddressesResults
- type SSHHostKeySet
- type SSHHostKeys
- type SSHProxyResult
- type SSHPublicKeysResult
- type SSHPublicKeysResults
- type SecretKeyLoginRequest
- type SecretKeyLoginRequestPayload
- type SecretKeyLoginResponse
- type SecretKeyLoginResponsePayload
- type SerializedModel
- type SerializedModelResource
- type SerializedModelResourceRevision
- type SerializedModelTools
- type SetAnnotations
- type SetConstraints
- type SetMachineBlockDevices
- type SetMachineNetworkConfig
- type SetMachinesAddresses
- type SetMigrationPhaseArgs
- type SetMigrationStatusMessageArgs
- type SetModelAgentVersion
- type SetModelDefaults
- type SetPayloadStatusArg
- type SetPayloadStatusArgs
- type SetStatus
- type Settings
- type SettingsResult
- type SettingsResults
- type SingularClaim
- type SingularClaims
- type Space
- type SpaceResult
- type SpaceResults
- type StateServingInfo
- type StatusHistoryFilter
- type StatusHistoryPruneArgs
- type StatusHistoryRequest
- type StatusHistoryRequests
- type StatusHistoryResult
- 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 TrackPayloadArgs
- type UndertakerModelInfo
- type UndertakerModelInfoResult
- type UnitNetworkConfig
- type UnitNetworkConfigResult
- type UnitNetworkConfigResults
- type UnitResourceResult
- type UnitResources
- type UnitResourcesResult
- type UnitSettings
- type UnitStatus
- type UnitsNetworkConfig
- type UnsetModelDefaults
- type UpdateBehavior
- type UpdateCloudCredential
- type UpdateCloudCredentials
- type UpgradeMongoParams
- type UploadResult
- type UserAccess
- type UserAccessPermission
- type UserAccessResult
- type UserAccessResults
- type UserCloud
- type UserClouds
- type UserInfo
- type UserInfoRequest
- type UserInfoResult
- type UserInfoResults
- type UserModel
- type UserModelList
- type Version
- type VersionResult
- type VersionResults
- type Volume
- type VolumeAttachment
- type VolumeAttachmentDetails
- 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" CodeUserNotFound = "user not found" CodeModelNotFound = "model not found" CodeLoginExpired = "login expired" CodeNoCreds = "no credentials provided" CodeCannotEnterScope = "cannot enter scope" CodeCannotEnterScopeYet = "cannot enter scope yet" CodeExcessiveContention = "excessive contention" CodeUnitHasSubordinates = "unit has subordinates" CodeNotAssigned = "not assigned" CodeStopped = "stopped" CodeDead = "dead" CodeHasAssignedUnits = "machine has assigned units" CodeHasHostedModels = "controller has hosted models" CodeMachineHasAttachedStorage = "machine has attached storage" CodeNotProvisioned = "not provisioned" CodeNoAddressSet = "no address set" CodeTryAgain = "try again" CodeNotImplemented = "not implemented" // asserted to match rpc.codeNotImplemented in rpc/rpc_test.go CodeAlreadyExists = "already exists" CodeUpgradeInProgress = "upgrade in progress" CodeMigrationInProgress = "model migration in progress" CodeActionNotAvailable = "action no longer available" CodeOperationBlocked = "operation is blocked" CodeLeadershipClaimDenied = "leadership claim denied" CodeLeaseClaimDenied = "lease claim denied" CodeNotSupported = "not supported" CodeBadRequest = "bad request" CodeMethodNotAllowed = "method not allowed" CodeForbidden = "forbidden" CodeDischargeRequired = "macaroon discharge required" CodeRedirect = "redirection required" CodeRetry = "retry" )
The Code constants hold error codes for some kinds of error.
const ( // DigestSHA is the HTTP digest algorithm value used in juju's HTTP code. DigestSHA256 DigestAlgorithm = "SHA-256" // ContentTypeJSON is the HTTP content-type value used for JSON content. ContentTypeJSON = "application/json" // ContentTypeRaw is the HTTP content-type value used for raw, unformattedcontent. ContentTypeRaw = "application/octet-stream" // ContentTypeJS is the HTTP content-type value used for javascript. ContentTypeJS = "application/javascript" // ContentTypeXJS is the outdated HTTP content-type value used for javascript. ContentTypeXJS = "application/x-javascript" )
const MachineNonceHeader = "X-Juju-Nonce"
const MigrationModelHTTPHeader = "X-Juju-Migration-Model-UUID"
MigrationModelHTTPHeader is the key for the HTTP header value that is used to specify the model UUID for the model being migrated for the uploading of the binaries for that model.
Variables ¶
var MigrationInProgressError = errors.New(CodeMigrationInProgress)
MigrationInProgressError signifies a migration is in progress.
var UpgradeInProgressError = errors.New(CodeUpgradeInProgress)
UpgradeInProgressError signifies an upgrade is in progress.
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 IsCodeLoginExpired ¶
func IsCodeModelNotFound ¶
func IsCodeNoAddressSet ¶
func IsCodeNoCreds ¶
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 IsCodeUserNotFound ¶
func IsMethodNotAllowed ¶
func IsRedirect ¶
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:"action-tag"` Status string `json:"status"` Results map[string]interface{} `json:"results,omitempty"` Message string `json:"message,omitempty"` }
ActionExecutionResult holds the action tag and output used when recording the result of an action.
type ActionExecutionResults ¶
type ActionExecutionResults struct {
Results []ActionExecutionResult `json:"results,omitempty"`
}
ActionExecutionResults holds a slice of ActionExecutionResult for a bulk action API call
type ActionResult ¶
type ActionResult struct { Action *Action `json:"action,omitempty"` Enqueued time.Time `json:"enqueued,omitempty"` Started time.Time `json:"started,omitempty"` Completed time.Time `json:"completed,omitempty"` Status string `json:"status,omitempty"` Message string `json:"message,omitempty"` Output map[string]interface{} `json:"output,omitempty"` Error *Error `json:"error,omitempty"` }
ActionResult describes an Action that will be or has been completed.
type ActionResults ¶
type ActionResults struct {
Results []ActionResult `json:"results,omitempty"`
}
ActionResults is a slice of ActionResult for bulk requests.
type ActionSpec ¶
type ActionSpec struct { Description string `json:"description"` Params map[string]interface{} `json:"params"` }
ActionSpec is a definition of the parameters and traits of an Action. The Params map is expected to conform to JSON-Schema Draft 4 as defined at http://json-schema.org/draft-04/schema# (see http://json-schema.org/latest/json-schema-core.html)
type Actions ¶
type Actions struct {
Actions []Action `json:"actions,omitempty"`
}
Actions is a slice of Action for bulk requests.
type ActionsByName ¶
type ActionsByName struct { Name string `json:"name,omitempty"` Actions []ActionResult `json:"actions,omitempty"` Error *Error `json:"error,omitempty"` }
ActionsByName is a bulk API call wrapper containing actions as results.
type ActionsByNames ¶
type ActionsByNames struct {
Actions []ActionsByName `json:"actions,omitempty"`
}
ActionsByNames wrap a slice of Actions for API calls.
type ActionsByReceiver ¶
type ActionsByReceiver struct { Receiver string `json:"receiver,omitempty"` Actions []ActionResult `json:"actions,omitempty"` Error *Error `json:"error,omitempty"` }
ActionsByReceiver is a bulk API call wrapper containing Actions, either as input paramters or as results.
type ActionsByReceivers ¶
type ActionsByReceivers struct {
Actions []ActionsByReceiver `json:"actions,omitempty"`
}
ActionsByReceivers wrap a slice of Actions for API calls.
type ActionsQueryResult ¶
type ActionsQueryResult struct { Receiver string `json:"receiver,omitempty"` Action ActionResult `json:"action,omitempty"` Error *Error `json:"error,omitempty"` }
ActionsQueryResult holds the name and parameters of an query result.
type ActionsQueryResults ¶
type ActionsQueryResults struct {
Results []ActionsQueryResult `json:"results,omitempty"`
}
ActionsQueryResults holds a slice of responses from the Actions query.
type AddApplicationOffer ¶
type AddApplicationOffer struct { OfferName string `json:"offer-name"` ApplicationName string `json:"application-name"` ApplicationDescription string `json:"application-description"` Endpoints map[string]string `json:"endpoints"` }
AddApplicationOffer values are used to create an application offer.
type AddApplicationOffers ¶
type AddApplicationOffers struct {
Offers []AddApplicationOffer
}
AddApplicationOffers is used when adding offers to a application directory.
type AddApplicationUnits ¶
type AddApplicationUnits struct { ApplicationName string `json:"application"` NumUnits int `json:"num-units"` Placement []*instance.Placement `json:"placement"` }
AddApplicationUnits holds parameters for the AddUnits call.
type AddApplicationUnitsResults ¶
type AddApplicationUnitsResults struct {
Units []string `json:"units"`
}
AddApplicationUnitsResults holds the names of the units added by the AddUnits call.
type AddCharmWithAuthorization ¶
type AddCharmWithAuthorization struct { URL string `json:"url"` Channel string `json:"channel"` CharmStoreMacaroon *macaroon.Macaroon `json:"macaroon"` }
AddCharmWithAuthorization holds the arguments for making an AddCharmWithAuthorization API call.
type AddMachineParams ¶
type AddMachineParams struct { // The following fields hold attributes that will be given to the // new machine when it is created. Series string `json:"series"` Constraints constraints.Value `json:"constraints"` Jobs []multiwatcher.MachineJob `json:"jobs"` // Disks describes constraints for disks that must be attached to // the machine when it is provisioned. Disks []storage.Constraints `json:"disks,omitempty"` // If Placement is non-nil, it contains a placement directive // that will be used to decide how to instantiate the machine. Placement *instance.Placement `json:"placement,omitempty"` // If ParentId is non-empty, it specifies the id of the // parent machine within which the new machine will // be created. In that case, ContainerType must also be // set. ParentId string `json:"parent-id"` // ContainerType optionally gives the container type of the // new machine. If it is non-empty, the new machine // will be implemented by a container. If it is specified // but ParentId is empty, a new top level machine will // be created to hold the container with given series, // constraints and jobs. ContainerType instance.ContainerType `json:"container-type"` // If InstanceId is non-empty, it will be associated with // the new machine along with the given nonce, // hardware characteristics and addresses. // All the following fields will be ignored if ContainerType // is set. InstanceId instance.Id `json:"instance-id"` Nonce string `json:"nonce"` HardwareCharacteristics instance.HardwareCharacteristics `json:"hardware-characteristics"` Addrs []Address `json:"addresses"` }
AddMachineParams encapsulates the parameters used to create a new machine.
type AddMachines ¶
type AddMachines struct {
MachineParams []AddMachineParams `json:"params"`
}
AddMachines holds the parameters for making the AddMachines call.
type AddMachinesResult ¶
type AddMachinesResult struct { Machine string `json:"machine"` Error *Error `json:"error,omitempty"` }
AddMachinesResult holds the name of a machine added by the api.client.AddMachine call for a single machine.
type AddMachinesResults ¶
type AddMachinesResults struct {
Machines []AddMachinesResult `json:"machines"`
}
AddMachinesResults holds the results of an AddMachines call.
type AddPendingResourcesArgs ¶
type AddPendingResourcesArgs struct { Entity AddCharmWithAuthorization // Resources is the list of resources to add as pending. Resources []CharmResource `json:"resources"` }
AddPendingResourcesArgs holds the arguments to the AddPendingResources API endpoint.
type AddPendingResourcesResult ¶
type AddPendingResourcesResult struct { ErrorResult // PendingIDs holds the "pending ID" for each of the requested // resources. PendingIDs []string `json:"pending-ids"` }
AddPendingResourcesResult holds the result of the AddPendingResources API endpoint.
type AddRelation ¶
type AddRelation struct {
Endpoints []string `json:"endpoints"`
}
AddRelation holds the parameters for making the AddRelation call. The endpoints specified are unordered.
type AddRelationResults ¶
type AddRelationResults struct {
Endpoints map[string]CharmRelation `json:"endpoints"`
}
AddRelationResults holds the results of a AddRelation call. The Endpoints field maps application names to the involved endpoints.
type AddSubnetParams ¶
type AddSubnetParams struct { SubnetTag string `json:"subnet-tag,omitempty"` SubnetProviderId string `json:"subnet-provider-id,omitempty"` SpaceTag string `json:"space-tag"` VLANTag int `json:"vlan-tag,omitempty"` Zones []string `json:"zones,omitempty"` }
AddSubnetParams holds a subnet and space tags, subnet provider ID, and a list of zones to associate the subnet to. Either SubnetTag or SubnetProviderId must be set, but not both. Zones can be empty if they can be discovered
type AddSubnetsParams ¶
type AddSubnetsParams struct {
Subnets []AddSubnetParams `json:"subnets"`
}
AddSubnetsParams holds the arguments of AddSubnets API call.
type AddUser ¶
type AddUser struct { Username string `json:"username"` DisplayName string `json:"display-name"` // Password is optional. If it is empty, then // a secret key will be generated for the user // and returned in AddUserResult. It will not // be possible to login with a password until // registration with the secret key is completed. Password string `json:"password,omitempty"` }
AddUser stores the parameters to add one user.
type AddUserResult ¶
type AddUserResult struct { Tag string `json:"tag,omitempty"` SecretKey []byte `json:"secret-key,omitempty"` Error *Error `json:"error,omitempty"` }
AddUserResult returns the tag of the newly created user and the secret key required to complete registration, or an error.
type AddUserResults ¶
type AddUserResults struct {
Results []AddUserResult `json:"results"`
}
AddUserResults holds the results of the bulk AddUser API call.
type AddUsers ¶
type AddUsers struct {
Users []AddUser `json:"users"`
}
AddUsers holds the parameters for adding new users.
type Address ¶
type Address struct { Value string `json:"value"` Type string `json:"type"` Scope string `json:"scope"` SpaceName string `json:"space-name,omitempty"` }
Address represents the location of a machine, including metadata about what kind of location the address describes. It's used in the API requests/responses. See also network.Address, from/to which this is transformed.
func FromNetworkAddress ¶
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 AdoptResourcesArgs ¶
type AdoptResourcesArgs struct { // ModelTag identifies the model that owns the resources. ModelTag string `json:"model-tag"` // SourceControllerVersion indicates the version of the calling // controller. This is needed in case the way the resources are // tagged has changed between versions - the provider should // ensure it looks for the original tags in the correct format for // that version. SourceControllerVersion version.Number `json:"source-controller-version"` }
AdoptResourcesArgs holds the information required to ask the provider to update the controller tags for a model's resources.
type AgentGetEntitiesResult ¶
type AgentGetEntitiesResult struct { Life Life `json:"life"` Jobs []multiwatcher.MachineJob `json:"jobs"` ContainerType instance.ContainerType `json:"container-type"` Error *Error `json:"error,omitempty"` }
AgentGetEntitiesResult holds the results of a machineagent.API.GetEntities call for a single entity.
type AgentGetEntitiesResults ¶
type AgentGetEntitiesResults struct {
Entities []AgentGetEntitiesResult `json:"entities"`
}
AgentGetEntitiesResults holds the results of a agent.API.GetEntities call.
type AgentVersionResult ¶
AgentVersionResult is used to return the current version number of the agent running the API server.
type AllWatcherId ¶
type AllWatcherId struct {
AllWatcherId string `json:"watcher-id"`
}
AllWatcherId holds the id of an AllWatcher.
type AllWatcherNextResults ¶
type AllWatcherNextResults struct {
Deltas []multiwatcher.Delta `json:"deltas"`
}
AllWatcherNextResults holds deltas returned from calling AllWatcher.Next().
type AnnotationsGetResult ¶
type AnnotationsGetResult struct { EntityTag string `json:"entity"` Annotations map[string]string `json:"annotations"` Error ErrorResult `json:"error,omitempty"` }
AnnotationsGetResult holds entity annotations or retrieval error.
type AnnotationsGetResults ¶
type AnnotationsGetResults struct {
Results []AnnotationsGetResult `json:"results"`
}
AnnotationsGetResults holds annotations associated with entities.
type AnnotationsSet ¶
type AnnotationsSet struct {
Annotations []EntityAnnotations `json:"annotations"`
}
AnnotationsSet stores parameters for making Set call on Annotations client.
type ApplicationCharmActionsResult ¶
type ApplicationCharmActionsResult struct { ApplicationTag string `json:"application-tag,omitempty"` Actions map[string]ActionSpec `json:"actions,omitempty"` Error *Error `json:"error,omitempty"` }
ApplicationCharmActionsResult holds application name and charm.Actions for the application. If an error such as a missing charm or malformed application name occurs, it is encapsulated in this type.
type ApplicationCharmRelations ¶
type ApplicationCharmRelations struct {
ApplicationName string `json:"application"`
}
ApplicationCharmRelations holds parameters for making the application CharmRelations call.
type ApplicationCharmRelationsResults ¶
type ApplicationCharmRelationsResults struct {
CharmRelations []string `json:"charm-relations"`
}
ApplicationCharmRelationsResults holds the results of the application CharmRelations call.
type ApplicationDeploy ¶
type ApplicationDeploy struct { ApplicationName string `json:"application"` Series string `json:"series"` CharmURL string `json:"charm-url"` Channel string `json:"channel"` NumUnits int `json:"num-units"` Config map[string]string `json:"config,omitempty"` ConfigYAML string `json:"config-yaml"` // Takes precedence over config if both are present. Constraints constraints.Value `json:"constraints"` Placement []*instance.Placement `json:"placement,omitempty"` Storage map[string]storage.Constraints `json:"storage,omitempty"` EndpointBindings map[string]string `json:"endpoint-bindings,omitempty"` Resources map[string]string `json:"resources,omitempty"` }
ApplicationDeploy holds the parameters for making the application Deploy call.
type ApplicationDestroy ¶
type ApplicationDestroy struct {
ApplicationName string `json:"application"`
}
ApplicationDestroy holds the parameters for making the application Destroy call.
type ApplicationExpose ¶
type ApplicationExpose struct {
ApplicationName string `json:"application"`
}
ApplicationExpose holds the parameters for making the application Expose call.
type ApplicationGet ¶
type ApplicationGet struct {
ApplicationName string `json:"application"`
}
ApplicationGet holds parameters for making the Get or GetCharmURL calls.
type ApplicationGetResults ¶
type ApplicationGetResults struct { Application string `json:"application"` Charm string `json:"charm"` Config map[string]interface{} `json:"config"` Constraints constraints.Value `json:"constraints"` Series string `json:"series"` }
ApplicationGetResults holds results of the application Get call.
type ApplicationMetricCredential ¶
type ApplicationMetricCredential struct { ApplicationName string `json:"application"` MetricCredentials []byte `json:"metrics-credentials"` }
ApplicationMetricCredential holds parameters for the SetApplicationCredentials call.
type ApplicationMetricCredentials ¶
type ApplicationMetricCredentials struct {
Creds []ApplicationMetricCredential `json:"creds"`
}
ApplicationMetricCredentials holds multiple ApplicationMetricCredential parameters.
type ApplicationOffer ¶
type ApplicationOffer struct { OfferURL string `json:"offer-url"` OfferName string `json:"offer-name"` ApplicationDescription string `json:"application-description"` Endpoints []RemoteEndpoint `json:"endpoints"` }
ApplicationOffer represents an application offering from an external model.
type ApplicationOfferDetails ¶
type ApplicationOfferDetails struct { ApplicationOffer ApplicationName string `json:"application-name"` CharmName string `json:"charm-name"` ConnectedCount int `json:"connected-count"` }
ApplicationOfferDetails represents an application offering, including details about how it has been deployed.
type ApplicationOfferResult ¶
type ApplicationOfferResult struct { // Result contains application offer information. Result ApplicationOffer `json:"result"` // Error contains related error. Error *Error `json:"error,omitempty"` }
ApplicationOfferResult is a result of listing a remote application offer.
type ApplicationOffersResults ¶
type ApplicationOffersResults struct { // Result contains collection of remote application results. Results []ApplicationOfferResult `json:"results,omitempty"` }
ApplicationOffersResults is a result of listing remote application offers.
type ApplicationSet ¶
type ApplicationSet struct { ApplicationName string `json:"application"` Options map[string]string `json:"options"` }
ApplicationSet holds the parameters for an application Set command. Options contains the configuration data.
type ApplicationSetCharm ¶
type ApplicationSetCharm struct { // ApplicationName is the name of the application to set the charm on. ApplicationName string `json:"application"` // CharmURL is the new url for the charm. CharmURL string `json:"charm-url"` // Channel is the charm store channel from which the charm came. Channel string `json:"channel"` // ConfigSettings is the charm settings to set during the upgrade. // This field is only understood by Application facade version 2 // and greater. ConfigSettings map[string]string `json:"config-settings,omitempty"` // ConfigSettingsYAML is the charm settings in YAML format to set // during the upgrade. If this is non-empty, it will take precedence // over ConfigSettings. This field is only understood by Application // facade version 2 ConfigSettingsYAML string `json:"config-settings-yaml,omitempty"` // ForceUnits forces the upgrade on units in an error state. ForceUnits bool `json:"force-units"` // ForceSeries forces the use of the charm even if it doesn't match the // series of the unit. ForceSeries bool `json:"force-series"` // ResourceIDs is a map of resource names to resource IDs to activate during // the upgrade. ResourceIDs map[string]string `json:"resource-ids,omitempty"` // StorageConstraints is a map of storage names to storage constraints to // update during the upgrade. This field is only understood by Application // facade version 2 and greater. StorageConstraints map[string]StorageConstraints `json:"storage-constraints,omitempty"` }
ApplicationSetCharm sets the charm for a given application.
type ApplicationStatus ¶
type ApplicationStatus struct { Err error `json:"err,omitempty"` Charm string `json:"charm"` Series string `json:"series"` Exposed bool `json:"exposed"` Life string `json:"life"` Relations map[string][]string `json:"relations"` CanUpgradeTo string `json:"can-upgrade-to"` SubordinateTo []string `json:"subordinate-to"` Units map[string]UnitStatus `json:"units"` MeterStatuses map[string]MeterStatus `json:"meter-statuses"` Status DetailedStatus `json:"status"` WorkloadVersion string `json:"workload-version"` }
ApplicationStatus holds status info about an application.
type ApplicationStatusResult ¶
type ApplicationStatusResult struct { Application StatusResult `json:"application"` Units map[string]StatusResult `json:"units"` Error *Error `json:"error,omitempty"` }
ApplicationStatusResult holds results for an application Full Status.
type ApplicationStatusResults ¶
type ApplicationStatusResults struct {
Results []ApplicationStatusResult `json:"results"`
}
ApplicationStatusResults holds multiple StatusResult.
type ApplicationURLs ¶
type ApplicationURLs struct { // ApplicationURLs contains collection of urls for applications that are to be shown. ApplicationURLs []string `json:"application-urls,omitempty"` }
ApplicationURLs is a collection of remote application URLs
type ApplicationUnexpose ¶
type ApplicationUnexpose struct {
ApplicationName string `json:"application"`
}
ApplicationUnexpose holds parameters for the application Unexpose call.
type ApplicationUnset ¶
type ApplicationUnset struct { ApplicationName string `json:"application"` Options []string `json:"options"` }
ApplicationUnset holds the parameters for an application Unset command. Options contains the option attribute names to unset.
type ApplicationUpdate ¶
type ApplicationUpdate struct { ApplicationName string `json:"application"` CharmURL string `json:"charm-url"` ForceCharmURL bool `json:"force-charm-url"` ForceSeries bool `json:"force-series"` MinUnits *int `json:"min-units,omitempty"` SettingsStrings map[string]string `json:"settings,omitempty"` SettingsYAML string `json:"settings-yaml"` // Takes precedence over SettingsStrings if both are present. Constraints *constraints.Value `json:"constraints,omitempty"` }
ApplicationUpdate holds the parameters for making the application Update call.
type ApplicationsCharmActionsResults ¶
type ApplicationsCharmActionsResults struct {
Results []ApplicationCharmActionsResult `json:"results,omitempty"`
}
ApplicationsCharmActionsResults holds a slice of ApplicationCharmActionsResult for a bulk result of charm Actions for Applications.
type ApplicationsDeploy ¶
type ApplicationsDeploy struct {
Applications []ApplicationDeploy `json:"applications"`
}
ApplicationsDeploy holds the parameters for deploying one or more applications.
type AuthUserInfo ¶
type AuthUserInfo struct { DisplayName string `json:"display-name"` Identity string `json:"identity"` LastConnection *time.Time `json:"last-connection,omitempty"` // Credentials contains an optional opaque credential value to be held by // the client, if any. Credentials *string `json:"credentials,omitempty"` // ControllerAccess holds the access the user has to the connected controller. // It will be empty if the user has no access to the controller. ControllerAccess string `json:"controller-access"` // ModelAccess holds the access the user has to the connected model. ModelAccess string `json:"model-access"` }
AuthUserInfo describes a logged-in local user or remote identity.
type BackupsCreateArgs ¶
type BackupsCreateArgs struct {
Notes string `json:"notes"`
}
BackupsCreateArgs holds the args for the API Create method.
type BackupsDownloadArgs ¶
type BackupsDownloadArgs struct {
ID string `json:"id"`
}
BackupsDownloadArgs holds the args for the API Download method.
type BackupsInfoArgs ¶
type BackupsInfoArgs struct {
ID string `json:"id"`
}
BackupsInfoArgs holds the args for the API Info method.
type BackupsListArgs ¶
type BackupsListArgs struct { }
BackupsListArgs holds the args for the API List method.
type BackupsListResult ¶
type BackupsListResult struct {
List []BackupsMetadataResult `json:"list"`
}
BackupsListResult holds the list of all stored backups.
type BackupsMetadataResult ¶
type BackupsMetadataResult struct { ID string `json:"id"` Checksum string `json:"checksum"` ChecksumFormat string `json:"checksum-format"` Size int64 `json:"size"` Stored time.Time `json:"stored"` // May be zero... Started time.Time `json:"started"` Finished time.Time `json:"finished"` // May be zero... Notes string `json:"notes"` Model string `json:"model"` Machine string `json:"machine"` Hostname string `json:"hostname"` Version version.Number `json:"version"` Series string `json:"series"` CACert string `json:"ca-cert"` CAPrivateKey string `json:"ca-private-key"` }
BackupsMetadataResult holds the metadata for a backup as returned by an API backups method (such as Create).
type BackupsRemoveArgs ¶
type BackupsRemoveArgs struct {
ID string `json:"id"`
}
BackupsRemoveArgs holds the args for the API Remove method.
type BackupsUploadArgs ¶
type BackupsUploadArgs struct { Data []byte `json:"data"` Metadata BackupsMetadataResult `json:"metadata"` }
BackupsUploadArgs holds the args for the API Upload method.
type BackupsUploadResult ¶
type BackupsUploadResult struct {
ID string `json:"id"`
}
BackupsListResult holds the list of all stored backups.
type Block ¶
type Block struct { // Id is this blocks id. Id string `json:"id"` // Tag holds the tag of the entity that is blocked. Tag string `json:"tag"` // Type is block type as per state.multiwatcher.BlockType. // Valid types are "BlockDestroy", "BlockRemove" and "BlockChange". Type string `json:"type"` // Message is a descriptive or an explanatory message // that the block was created with. Message string `json:"message,omitempty"` }
Block describes a Juju block that protects model from corruption.
type BlockDeviceResult ¶
type BlockDeviceResult struct { Result storage.BlockDevice `json:"result"` Error *Error `json:"error,omitempty"` }
BlockDeviceResult holds the result of an API call to retrieve details of a block device.
type BlockDeviceResults ¶
type BlockDeviceResults struct {
Results []BlockDeviceResult `json:"results,omitempty"`
}
BlockDeviceResults holds the result of an API call to retrieve details of multiple block devices.
type BlockDevicesResult ¶
type BlockDevicesResult struct { Result []storage.BlockDevice `json:"result"` Error *Error `json:"error,omitempty"` }
BlockDevicesResult holds the result of an API call to retrieve details of all block devices relating to some entity.
type BlockDevicesResults ¶
type BlockDevicesResults struct {
Results []BlockDevicesResult `json:"results,omitempty"`
}
BlockDevicseResults holds the result of an API call to retrieve details of all block devices relating to some entities.
type BlockResult ¶
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 `json:"results"`
}
BoolResults holds multiple results with BoolResult each.
type BundleChange ¶
type BundleChange struct { // Id is the unique identifier for this change. Id string `json:"id"` // Method is the action to be performed to apply this change. Method string `json:"method"` // Args holds a list of arguments to pass to the method. Args []interface{} `json:"args"` // Requires holds a list of dependencies for this change. Each dependency // is represented by the corresponding change id, and must be applied // before this change is applied. Requires []string `json:"requires"` }
BundleChange holds a single change required to deploy a bundle.
type BundleChangesParams ¶
type BundleChangesParams struct { // BundleDataYAML is the YAML-encoded charm bundle data // (see "github.com/juju/charm.BundleData"). BundleDataYAML string `json:"yaml"` }
BundleChangesParams holds parameters for making Bundle.GetChanges calls.
type BundleChangesResults ¶
type BundleChangesResults struct { // Changes holds the list of changes required to deploy the bundle. // It is omitted if the provided bundle YAML has verification errors. Changes []*BundleChange `json:"changes,omitempty"` // Errors holds possible bundle verification errors. Errors []string `json:"errors,omitempty"` }
BundleChangesResults holds results of the Bundle.GetChanges call.
type BytesResult ¶
type BytesResult struct {
Result []byte `json:"result"`
}
BytesResult holds the result of an API call that returns a slice of bytes.
type CharmActionSpec ¶
type CharmActionSpec struct { Description string `json:"description"` Params map[string]interface{} `json:"params"` }
CharmActionSpec mirrors charm.ActionSpec.
type CharmActions ¶
type CharmActions struct {
ActionSpecs map[string]CharmActionSpec `json:"specs,omitempty"`
}
CharmActions mirrors charm.Actions.
type CharmInfo ¶
type CharmInfo struct { Revision int `json:"revision"` URL string `json:"url"` Config map[string]CharmOption `json:"config"` Meta *CharmMeta `json:"meta,omitempty"` Actions *CharmActions `json:"actions,omitempty"` Metrics *CharmMetrics `json:"metrics,omitempty"` }
CharmInfo holds all the charm data that the client needs. To be honest, it probably returns way more than what is actually needed.
type CharmMeta ¶
type CharmMeta struct { Name string `json:"name"` Summary string `json:"summary"` Description string `json:"description"` Subordinate bool `json:"subordinate"` Provides map[string]CharmRelation `json:"provides,omitempty"` Requires map[string]CharmRelation `json:"requires,omitempty"` Peers map[string]CharmRelation `json:"peers,omitempty"` ExtraBindings map[string]string `json:"extra-bindings,omitempty"` Categories []string `json:"categories,omitempty"` Tags []string `json:"tags,omitempty"` Series []string `json:"series,omitempty"` Storage map[string]CharmStorage `json:"storage,omitempty"` PayloadClasses map[string]CharmPayloadClass `json:"payload-classes,omitempty"` Resources map[string]CharmResourceMeta `json:"resources,omitempty"` Terms []string `json:"terms,omitempty"` MinJujuVersion string `json:"min-juju-version,omitempty"` }
CharmMeta mirrors charm.Meta.
type CharmMetric ¶
CharmMetric mirrors charm.Metric.
type CharmMetrics ¶
type CharmMetrics struct { Metrics map[string]CharmMetric `json:"metrics"` Plan CharmPlan `json:"plan"` }
CharmMetrics mirrors charm.Metrics.
type CharmOption ¶
type CharmOption struct { Type string `json:"type"` Description string `json:"description,omitempty"` Default interface{} `json:"default,omitempty"` }
CharmOption mirrors charm.Option
type CharmPayloadClass ¶
CharmPayloadClass mirrors charm.PayloadClass.
type CharmPlan ¶
type CharmPlan struct {
Required bool `json:"required"`
}
CharmPlan mirrors charm.Plan
type CharmRelation ¶
type CharmRelation struct { Name string `json:"name"` Role string `json:"role"` Interface string `json:"interface"` Optional bool `json:"optional"` Limit int `json:"limit"` Scope string `json:"scope"` }
CharmRelation mirrors charm.Relation.
type CharmResource ¶
type CharmResource struct { // Name identifies the resource. Name string `json:"name"` // Type is the name of the resource type. Type string `json:"type"` // Path is where the resource will be stored. Path string `json:"path"` // Description contains user-facing info about the resource. Description string `json:"description,omitempty"` // Origin is where the resource will come from. Origin string `json:"origin"` // Revision is the revision, if applicable. Revision int `json:"revision"` // Fingerprint is the SHA-384 checksum for the resource blob. Fingerprint []byte `json:"fingerprint"` // Size is the size of the resource, in bytes. Size int64 `json:"size"` }
CharmResource contains the definition for a resource.
type CharmResourceMeta ¶
type CharmResourceMeta struct { Name string `json:"name"` Type string `json:"type"` Path string `json:"path"` Description string `json:"description"` }
CharmResourceMeta mirrors charm.ResourceMeta.
type CharmStorage ¶
type CharmStorage struct { Name string `json:"name"` Description string `json:"description"` Type string `json:"type"` ReadOnly bool `json:"read-only"` CountMin int `json:"count-min"` CountMax int `json:"count-max"` MinimumSize uint64 `json:"minimum-size"` Location string `json:"location,omitempty"` Properties []string `json:"properties,omitempty"` }
CharmStorage mirrors charm.Storage.
type CharmURL ¶
type CharmURL struct {
URL string `json:"url"`
}
CharmURL identifies a single charm URL.
type CharmURLs ¶
type CharmURLs struct {
URLs []CharmURL `json:"urls"`
}
CharmURLs identifies multiple charm URLs.
type CharmsList ¶
type CharmsList struct {
Names []string `json:"names"`
}
CharmsList stores parameters for a charms.List call
type CharmsListResult ¶
type CharmsListResult struct {
CharmURLs []string `json:"charm-urls"`
}
CharmsListResult stores result from a charms.List call
type CharmsResponse ¶
type CharmsResponse struct { Error string `json:"error,omitempty"` // ErrorCode holds the code associated with the error. // Ideally, Error would hold an Error object and the // code would be in that, but for backward compatibility, // we cannot do that. ErrorCode string `json:"error-code,omitempty"` // ErrorInfo holds extra information associated with the error. // Like ErrorCode, this should really be in an Error object. ErrorInfo *ErrorInfo `json:"error-info,omitempty"` CharmURL string `json:"charm-url,omitempty"` Files []string `json:"files,omitempty"` }
CharmsResponse is the server response to charm upload or GET requests.
type ClaimLeadershipBulkParams ¶
type ClaimLeadershipBulkParams struct { // Params are the parameters for making a bulk leadership claim. Params []ClaimLeadershipParams `json:"params"` }
ClaimLeadershipBulkParams is a collection of parameters for making a bulk leadership claim.
type ClaimLeadershipBulkResults ¶
type ClaimLeadershipBulkResults ErrorResults
ClaimLeadershipBulkResults is the collection of results from a bulk leadership claim.
type ClaimLeadershipParams ¶
type ClaimLeadershipParams struct { // ApplicationTag is the application for which you want to make a // leadership claim. ApplicationTag string `json:"application-tag"` // UnitTag is the unit which is making the leadership claim. UnitTag string `json:"unit-tag"` // DurationSeconds is the number of seconds for which the lease is required. DurationSeconds float64 `json:"duration"` }
ClaimLeadershipParams are the parameters needed for making a leadership claim.
type Cloud ¶
type Cloud struct { Type string `json:"type"` AuthTypes []string `json:"auth-types,omitempty"` Endpoint string `json:"endpoint,omitempty"` IdentityEndpoint string `json:"identity-endpoint,omitempty"` StorageEndpoint string `json:"storage-endpoint,omitempty"` Regions []CloudRegion `json:"regions,omitempty"` }
Cloud holds information about a cloud.
type CloudCredential ¶
type CloudCredential struct { // AuthType is the authentication type. AuthType string `json:"auth-type"` // Attributes contains non-secret credential values. Attributes map[string]string `json:"attrs,omitempty"` // Redacted is a list of redacted attributes Redacted []string `json:"redacted,omitempty"` }
CloudCredential contains a cloud credential possibly with secrets redacted.
type CloudCredentialResult ¶
type CloudCredentialResult struct { Result *CloudCredential `json:"result,omitempty"` Error *Error `json:"error,omitempty"` }
CloudCredentialResult contains a CloudCredential or an error.
type CloudCredentialResults ¶
type CloudCredentialResults struct {
Results []CloudCredentialResult `json:"results,omitempty"`
}
CloudCredentialResults contains a set of CloudCredentialResults.
type CloudImageMetadata ¶
type CloudImageMetadata struct { // ImageId is an image identifier. ImageId string `json:"image-id"` // Stream contains reference to a particular stream, // for e.g. "daily" or "released" Stream string `json:"stream,omitempty"` // Region is the name of cloud region associated with the image. Region string `json:"region"` // Version is OS version, for e.g. "12.04". Version string `json:"version"` // Series is OS series, for e.g. "trusty". Series string `json:"series"` // Arch is the architecture for this cloud image, for e.g. "amd64" Arch string `json:"arch"` // VirtType contains the virtualisation type of the cloud image, for e.g. "pv", "hvm". "kvm". VirtType string `json:"virt-type,omitempty"` // RootStorageType contains type of root storage, for e.g. "ebs", "instance". RootStorageType string `json:"root-storage-type,omitempty"` // RootStorageSize contains size of root storage in gigabytes (GB). RootStorageSize *uint64 `json:"root-storage-size,omitempty"` // Source describes where this image is coming from: is it public? custom? Source string `json:"source"` // Priority is an importance factor for image metadata. // Higher number means higher priority. // This will allow to sort metadata by importance. Priority int `json:"priority"` }
CloudImageMetadata holds cloud image metadata properties.
type CloudImageMetadataList ¶
type CloudImageMetadataList struct {
Metadata []CloudImageMetadata `json:"metadata,omitempty"`
}
CloudImageMetadataList holds a list of cloud image metadata.
type CloudInstanceTypesConstraint ¶
type CloudInstanceTypesConstraint struct { // CloudTag is the tag of the cloud for which instances types // should be returned. CloudTag string `json:"cloud-tag"` // CloudRegion is the name of the region for which instance // types should be returned. CloudRegion string `json:"region"` // Constraints, if specified, contains the constraints to filter // the instance types by. If Constraints is not specified, then // no filtering by constraints will take place: all instance // types supported by the region will be returned. Constraints *constraints.Value `json:"constraints,omitempty"` }
CloudInstanceTypesConstraint contains the cloud information and constraits necessary to query for instance types on a given cloud.
type CloudInstanceTypesConstraints ¶
type CloudInstanceTypesConstraints struct {
Constraints []CloudInstanceTypesConstraint `json:"constraints"`
}
CloudInstanceTypesConstraints contains a slice of CloudInstanceTypesConstraint.
type CloudRegion ¶
type CloudRegion struct { Name string `json:"name"` Endpoint string `json:"endpoint,omitempty"` IdentityEndpoint string `json:"identity-endpoint,omitempty"` StorageEndpoint string `json:"storage-endpoint,omitempty"` }
CloudRegion holds information about a cloud region.
type CloudResult ¶
type CloudResult struct { Cloud *Cloud `json:"cloud,omitempty"` Error *Error `json:"error,omitempty"` }
CloudResult contains a cloud definition or an error.
type CloudResults ¶
type CloudResults struct {
Results []CloudResult `json:"results,omitempty"`
}
CloudResults contains a set of CloudResults.
type CloudSpec ¶
type CloudSpec struct { Type string `json:"type"` Name string `json:"name"` Region string `json:"region,omitempty"` Endpoint string `json:"endpoint,omitempty"` IdentityEndpoint string `json:"identity-endpoint,omitempty"` StorageEndpoint string `json:"storage-endpoint,omitempty"` Credential *CloudCredential `json:"credential,omitempty"` }
CloudSpec holds a cloud specification.
type CloudSpecResult ¶
type CloudSpecResult struct { Result *CloudSpec `json:"result,omitempty"` Error *Error `json:"error,omitempty"` }
CloudSpecResult contains a CloudSpec or an error.
type CloudSpecResults ¶
type CloudSpecResults struct {
Results []CloudSpecResult `json:"results,omitempty"`
}
CloudSpecResults contains a set of CloudSpecResults.
type CloudsResult ¶
type CloudsResult struct { // Clouds is a map of clouds, keyed by cloud tag. Clouds map[string]Cloud `json:"clouds,omitempty"` }
CloudsResult contains a set of Clouds.
type ConfigSettings ¶
type ConfigSettings map[string]interface{}
ConfigSettings holds unit, application or cham configuration settings with string keys and arbitrary values.
type ConfigSettingsResult ¶
type ConfigSettingsResult struct { Error *Error `json:"error,omitempty"` Settings ConfigSettings `json:"settings"` }
ConfigSettingsResult holds a configuration map or an error.
type ConfigSettingsResults ¶
type ConfigSettingsResults struct {
Results []ConfigSettingsResult `json:"results"`
}
ConfigSettingsResults holds multiple configuration maps or errors.
type ConfigValue ¶
type ConfigValue struct { Value interface{} `json:"value"` Source string `json:"source"` }
ConfigValue encapsulates a configuration value and its source.
type ConstraintsResult ¶
type ConstraintsResult struct { Error *Error `json:"error,omitempty"` Constraints constraints.Value `json:"constraints"` }
ConstraintsResult holds machine constraints or an error.
type ConstraintsResults ¶
type ConstraintsResults struct {
Results []ConstraintsResult `json:"results"`
}
ConstraintsResults holds multiple constraints results.
type ConsumeApplicationArg ¶
type ConsumeApplicationArg struct { // ApplicationURLs contains collection of urls for applications that are to be shown. ApplicationURL string `json:"application-url"` // ApplicationAlias is the name of the alias to use for the application name. ApplicationAlias string `json:"application-alias,omitempty"` }
ConsumeApplicationArg holds the arguments for consuming a remote application.
type ConsumeApplicationArgs ¶
type ConsumeApplicationArgs struct {
Args []ConsumeApplicationArg `json:"args,omitempty"`
}
ConsumeApplicationArgs is a collection of arg for consuming applications.
type ConsumeApplicationResult ¶
type ConsumeApplicationResult struct { LocalName string `json:"local-name,omitempty"` Error *Error `json:"error,omitempty"` }
ConsumeApplicationResult is the response for one request to consume a remote application.
type ConsumeApplicationResults ¶
type ConsumeApplicationResults struct {
Results []ConsumeApplicationResult `json:"results"`
}
ConsumeApplicationResults is the result of a Consume call.
type ContainerConfig ¶
type ContainerConfig struct { ProviderType string `json:"provider-type"` AuthorizedKeys string `json:"authorized-keys"` SSLHostnameVerification bool `json:"ssl-hostname-verification"` Proxy proxy.Settings `json:"proxy"` AptProxy proxy.Settings `json:"apt-proxy"` AptMirror string `json:"apt-mirror"` *UpdateBehavior }
ContainerConfig contains information from the model config that is needed for container cloud-init.
type ContainerManagerConfig ¶
ContainerManagerConfig contains information from the model config that is needed for configuring the container manager.
type ContainerManagerConfigParams ¶
type ContainerManagerConfigParams struct {
Type instance.ContainerType `json:"type"`
}
ContainerManagerConfigParams contains the parameters for the ContainerManagerConfig provisioner API call.
type ControllerAction ¶
type ControllerAction string
ControllerAction is an action that can be performed on a model.
const ( GrantControllerAccess ControllerAction = "grant" RevokeControllerAccess ControllerAction = "revoke" )
Actions that can be preformed on a model.
type ControllerConfig ¶
type ControllerConfig map[string]interface{}
ControllerConfig holds a controller configuration.
type ControllerConfigResult ¶
type ControllerConfigResult struct {
Config ControllerConfig `json:"config"`
}
ControllerConfigResult holds controller configuration.
type ControllersChangeResult ¶
type ControllersChangeResult struct { Result ControllersChanges `json:"result"` Error *Error `json:"error,omitempty"` }
ControllersChangeResult contains the results of a single EnableHA API call or an error.
type ControllersChangeResults ¶
type ControllersChangeResults struct {
Results []ControllersChangeResult `json:"results"`
}
ControllersChangeResults contains the results of the EnableHA API call.
type ControllersChanges ¶
type ControllersChanges struct { Added []string `json:"added,omitempty"` Maintained []string `json:"maintained,omitempty"` Removed []string `json:"removed,omitempty"` Promoted []string `json:"promoted,omitempty"` Demoted []string `json:"demoted,omitempty"` Converted []string `json:"converted,omitempty"` }
ControllersChanges lists the servers that have been added, removed or maintained in the pool as a result of an enable-ha operation.
type ControllersSpec ¶
type ControllersSpec struct { NumControllers int `json:"num-controllers"` Constraints constraints.Value `json:"constraints,omitempty"` // Series is the series to associate with new controller machines. // If this is empty, then the model's default series is used. Series string `json:"series,omitempty"` // Placement defines specific machines to become new controller machines. Placement []string `json:"placement,omitempty"` }
ControllersServersSpec contains arguments for the EnableHA client API call.
type ControllersSpecs ¶
type ControllersSpecs struct {
Specs []ControllersSpec `json:"specs"`
}
ControllersServersSpecs contains all the arguments for the EnableHA API call.
type CreateSpaceParams ¶
type CreateSpaceParams struct { SubnetTags []string `json:"subnet-tags"` SpaceTag string `json:"space-tag"` Public bool `json:"public"` ProviderId string `json:"provider-id,omitempty"` }
CreateSpaceParams holds the space tag and at least one subnet tag required to create a new space.
type CreateSpacesParams ¶
type CreateSpacesParams struct {
Spaces []CreateSpaceParams `json:"spaces"`
}
CreateSpacesParams olds the arguments of the AddSpaces API call.
type CreateSubnetParams ¶
type CreateSubnetParams struct { SubnetTag string `json:"subnet-tag,omitempty"` SpaceTag string `json:"space-tag"` Zones []string `json:"zones,omitempty"` VLANTag int `json:"vlan-tag,omitempty"` IsPublic bool `json:"is-public"` }
CreateSubnetParams holds a subnet and space tags, vlan tag, and a list of zones to associate the subnet to.
type CreateSubnetsParams ¶
type CreateSubnetsParams struct {
Subnets []CreateSubnetParams `json:"subnets"`
}
CreateSubnetsParams holds the arguments of CreateSubnets API call.
type Creds ¶
type Creds struct { AuthTag string `json:"auth-tag"` Password string `json:"password"` Nonce string `json:"nonce"` }
Creds holds credentials for identifying an entity.
type DeployerConnectionValues ¶
type DeployerConnectionValues struct { StateAddresses []string `json:"state-addresses"` APIAddresses []string `json:"api-addresses"` }
DeployerConnectionValues containers the result of deployer.ConnectionInfo API call.
type DestroyApplicationInfo ¶
type DestroyApplicationInfo struct { // DetachedStorage is the tags of storage instances that will be // detached from the application's units, and will remain in the // model after the units are removed. DetachedStorage []Entity `json:"detached-storage,omitempty"` // DestroyedStorage is the tags of storage instances that will be // destroyed as a result of destroying the application. DestroyedStorage []Entity `json:"destroyed-storage,omitempty"` // DestroyedUnits is the tags of units that will be destroyed // as a result of destroying the application. DestroyedUnits []Entity `json:"destroyed-units,omitempty"` }
DestroyApplicationInfo contains information related to the removal of an application.
type DestroyApplicationResult ¶
type DestroyApplicationResult struct { Error *Error `json:"error,omitempty"` Info *DestroyApplicationInfo `json:"info,omitempty"` }
DestroyApplicationResult contains one of the results of a DestroyApplication API request.
type DestroyApplicationResults ¶
type DestroyApplicationResults struct {
Results []DestroyApplicationResult `json:"results,omitempty"`
}
DestroyApplicationResults contains the results of a DestroyApplication API request.
type DestroyApplicationUnits ¶
type DestroyApplicationUnits struct {
UnitNames []string `json:"unit-names"`
}
DestroyApplicationUnits holds parameters for the DestroyUnits call.
type DestroyControllerArgs ¶
type DestroyControllerArgs struct { // DestroyModels specifies whether or not the hosted models // should be destroyed as well. If this is not specified, and there are // other hosted models, the destruction of the controller will fail. DestroyModels bool `json:"destroy-models"` }
DestroyControllerArgs holds the arguments for destroying a controller.
type DestroyMachineInfo ¶
type DestroyMachineInfo struct { // DetachedStorage is the tags of storage instances that will be // detached from the machine (assigned units) as a result of // destroying the machine, and will remain in the model after // the machine and unit are removed. DetachedStorage []Entity `json:"detached-storage,omitempty"` // DestroyedStorage is the tags of storage instances that will be // destroyed as a result of destroying the machine. DestroyedStorage []Entity `json:"destroyed-storage,omitempty"` // DestroyedStorage is the tags of units that will be destroyed // as a result of destroying the machine. DestroyedUnits []Entity `json:"destroyed-units,omitempty"` }
DestroyMachineInfo contains information related to the removal of a machine.
type DestroyMachineResult ¶
type DestroyMachineResult struct { Error *Error `json:"error,omitempty"` Info *DestroyMachineInfo `json:"info,omitempty"` }
DestroyMachineResult contains one of the results of a MachineManager.Destroy API request.
type DestroyMachineResults ¶
type DestroyMachineResults struct {
Results []DestroyMachineResult `json:"results,omitempty"`
}
DestroyMachineResults contains the results of a MachineManager.Destroy API request.
type DestroyMachines ¶
type DestroyMachines struct { MachineNames []string `json:"machine-names"` Force bool `json:"force"` }
DestroyMachines holds parameters for the DestroyMachines call.
type DestroyRelation ¶
type DestroyRelation struct {
Endpoints []string `json:"endpoints"`
}
DestroyRelation holds the parameters for making the DestroyRelation call. The endpoints specified are unordered.
type DestroyUnitInfo ¶
type DestroyUnitInfo struct { // DetachedStorage is the tags of storage instances that will be // detached from the unit, and will remain in the model after // the unit is removed. DetachedStorage []Entity `json:"detached-storage,omitempty"` // DestroyedStorage is the tags of storage instances that will be // destroyed as a result of destroying the unit. DestroyedStorage []Entity `json:"destroyed-storage,omitempty"` }
DestroyUnitInfo contains information related to the removal of an application unit.
type DestroyUnitResult ¶
type DestroyUnitResult struct { Error *Error `json:"error,omitempty"` Info *DestroyUnitInfo `json:"info,omitempty"` }
DestroyUnitResult contains one of the results of a DestroyUnit API request.
type DestroyUnitResults ¶
type DestroyUnitResults struct {
Results []DestroyUnitResult `json:"results,omitempty"`
}
DestroyUnitResults contains the results of a DestroyUnit API request.
type DetailedStatus ¶
type DetailedStatus struct { Status string `json:"status"` Info string `json:"info"` Data map[string]interface{} `json:"data"` Since *time.Time `json:"since"` Kind string `json:"kind"` Version string `json:"version"` Life string `json:"life"` Err error `json:"err,omitempty"` }
DetailedStatus holds status info about a machine or unit agent.
type DeviceBridgeInfo ¶
type DeviceBridgeInfo struct { HostDeviceName string `json:"host-device-name"` BridgeName string `json:"bridge-name"` }
DeviceBridgeInfo lists the host device and the expected bridge to be created.
type DigestAlgorithm ¶
type DigestAlgorithm string
DigestAlgorithm is one of the values in the IANA registry. See RFC 3230 and 5843.
type DiscoverSpacesResults ¶
type DiscoverSpacesResults struct {
Results []ProviderSpace `json:"results"`
}
DiscoverSpacesResults holds the list of all provider spaces.
type DistributionGroupResult ¶
type DistributionGroupResult struct { Error *Error `json:"error,omitempty"` Result []instance.Id `json:"result"` }
DistributionGroupResult contains the result of the DistributionGroup provisioner API call.
type DistributionGroupResults ¶
type DistributionGroupResults struct {
Results []DistributionGroupResult `json:"results"`
}
DistributionGroupResults is the bulk form of DistributionGroupResult.
type EndpointFilterAttributes ¶
type EndpointFilterAttributes struct { Role charm.RelationRole `json:"role"` Interface string `json:"interface"` Name string `json:"name"` }
EndpointFilterAttributes is used to filter offers matching the specified endpoint criteria.
type EndpointStatus ¶
type EndpointStatus struct { ApplicationName string `json:"application"` Name string `json:"name"` Role string `json:"role"` Subordinate bool `json:"subordinate"` }
EndpointStatus holds status info about a single endpoint.
func (*EndpointStatus) String ¶
func (epStatus *EndpointStatus) String() string
type Entities ¶
type Entities struct {
Entities []Entity `json:"entities"`
}
Entities identifies multiple entities.
type EntitiesCharmURL ¶
type EntitiesCharmURL struct {
Entities []EntityCharmURL `json:"entities"`
}
EntitiesCharmURL holds the parameters for making a SetCharmURL API call.
type EntitiesPortRanges ¶
type EntitiesPortRanges struct {
Entities []EntityPortRange `json:"entities"`
}
EntitiesPortRanges holds the parameters for making an OpenPorts or ClosePorts on some entities.
type EntitiesPorts ¶
type EntitiesPorts struct {
Entities []EntityPort `json:"entities"`
}
EntitiesPorts holds the parameters for making an OpenPort or ClosePort on some entities.
type EntitiesResult ¶
type EntitiesResult struct { Entities []Entity `json:"entities"` Error *Error `json:"error,omitempty"` }
EntitiesResult is the result of one query that either yields some set of entities or an error.
type EntitiesResults ¶
type EntitiesResults struct {
Results []EntitiesResult `json:"results"`
}
EntitiesResults contains multiple Entities results (where each Entities is the result of a query).
type EntitiesVersion ¶
type EntitiesVersion struct {
AgentTools []EntityVersion `json:"agent-tools"`
}
EntitiesVersion specifies what tools are being run for multiple entities.
type EntitiesWatchResult ¶
type EntitiesWatchResult struct { // Note legacy serialization tag. EntitiesWatcherId string `json:"watcher-id"` Changes []string `json:"changes,omitempty"` Error *Error `json:"error,omitempty"` }
EntitiesWatchResult holds a EntitiesWatcher id, changes and an error (if any).
type EntitiesWatchResults ¶
type EntitiesWatchResults struct {
Results []EntitiesWatchResult `json:"results"`
}
EntitiesWatchResults holds the results for any API call which ends up returning a list of EntitiesWatchers.
type EntityAnnotations ¶
type EntityAnnotations struct { EntityTag string `json:"entity"` Annotations map[string]string `json:"annotations"` }
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 `json:"changes"`
}
EntityPasswords holds the parameters for making a SetPasswords call.
type EntityPort ¶
type EntityPort struct { Tag string `json:"tag"` Protocol string `json:"protocol"` Port int `json:"port"` }
EntityPort holds an entity's tag, a protocol and a port.
type EntityPortRange ¶
type EntityPortRange struct { Tag string `json:"tag"` Protocol string `json:"protocol"` FromPort int `json:"from-port"` ToPort int `json:"to-port"` }
EntityPortRange holds an entity's tag, a protocol and a port range.
type EntityStatus ¶
type EntityStatus struct { Status status.Status `json:"status"` Info string `json:"info"` Data map[string]interface{} `json:"data,omitempty"` Since *time.Time `json:"since"` }
EntityStatus holds the status of an entity.
type EntityStatusArgs ¶
type EntityStatusArgs struct { Tag string `json:"tag"` Status string `json:"status"` Info string `json:"info"` Data map[string]interface{} `json:"data"` }
EntityStatusArgs holds parameters for setting the status of a single entity.
type EntityVersion ¶
EntityVersion specifies the tools version to be set for an entity with the given tag. version.Binary directly.
type EntityWorkloadVersion ¶
type EntityWorkloadVersion struct { Tag string `json:"tag"` WorkloadVersion string `json:"workload-version"` }
EntityWorkloadVersion holds the workload version for an entity.
type EntityWorkloadVersions ¶
type EntityWorkloadVersions struct {
Entities []EntityWorkloadVersion `json:"entities"`
}
EntityWorkloadVersions holds the parameters for setting the workload version for a set of entities.
type Error ¶
type Error struct { Message string `json:"message"` Code string `json:"code"` Info *ErrorInfo `json:"info,omitempty"` }
Error is the type of error returned by any call to the state API.
type ErrorInfo ¶
type ErrorInfo struct { // Macaroon may hold a macaroon that, when // discharged, may allow access to the juju API. // This field is associated with the ErrDischargeRequired // error code. Macaroon *macaroon.Macaroon `json:"macaroon,omitempty"` // MacaroonPath holds the URL path to be associated // with the macaroon. The macaroon is potentially // valid for all URLs under the given path. // If it is empty, the macaroon will be associated with // the original URL from which the error was returned. MacaroonPath string `json:"macaroon-path,omitempty"` }
ErrorInfo holds additional information provided by an error. Note that although these fields are compatible with the same fields in httpbakery.ErrorInfo, the Juju API server does not implement endpoints directly compatible with that protocol because the error response format varies according to the endpoint.
type ErrorResult ¶
type ErrorResult struct {
Error *Error `json:"error,omitempty"`
}
ErrorResult holds the error status of a single operation.
type ErrorResults ¶
type ErrorResults struct { // Results contains the error results from each operation. Results []ErrorResult `json:"results"` }
ErrorResults holds the results of calling a bulk operation which returns no data, only an error result. The order and number of elements matches the operations specified in the request.
func (ErrorResults) Combine ¶
func (result ErrorResults) Combine() error
Combine returns one error from the result which is an accumulation of the errors. If there are no errors in the result, the return value is nil. Otherwise the error values are combined with new-line characters.
func (ErrorResults) OneError ¶
func (result ErrorResults) OneError() error
OneError returns the error from the result of a bulk operation on a single value.
type FacadeVersions ¶
FacadeVersions describes the available Facades and what versions of each one are available
type Filesystem ¶
type Filesystem struct { FilesystemTag string `json:"filesystem-tag"` VolumeTag string `json:"volume-tag,omitempty"` Info FilesystemInfo `json:"info"` }
Filesystem identifies and describes a storage filesystem in the model.
type FilesystemAttachment ¶
type FilesystemAttachment struct { FilesystemTag string `json:"filesystem-tag"` MachineTag string `json:"machine-tag"` Info FilesystemAttachmentInfo `json:"info"` }
FilesystemAttachment identifies and describes a filesystem attachment.
type FilesystemAttachmentDetails ¶
type FilesystemAttachmentDetails struct { // NOTE(axw) for backwards-compatibility, this must not be given a // json tag. This ensures that we collapse FilesystemAttachmentInfo. // // TODO(axw) when we can break backwards-compatibility (Juju 3.0), // give this a field name of "info", like we have in FilesystemDetails // above. FilesystemAttachmentInfo // Life contains the lifecycle state of the filesystem attachment. // Juju controllers older than 2.2 do not populate this // field, so it may be omitted. Life Life `json:"life,omitempty"` }
FilesystemAttachmentDetails describes a filesystem attachment.
type FilesystemAttachmentInfo ¶
type FilesystemAttachmentInfo struct { MountPoint string `json:"mount-point,omitempty"` ReadOnly bool `json:"read-only,omitempty"` }
FilesystemAttachmentInfo describes a filesystem attachment.
type FilesystemAttachmentParams ¶
type FilesystemAttachmentParams struct { FilesystemTag string `json:"filesystem-tag"` MachineTag string `json:"machine-tag"` FilesystemId string `json:"filesystem-id,omitempty"` InstanceId string `json:"instance-id,omitempty"` Provider string `json:"provider"` MountPoint string `json:"mount-point,omitempty"` ReadOnly bool `json:"read-only,omitempty"` }
FilesystemAttachmentParams holds the parameters for creating a filesystem attachment.
type FilesystemAttachmentParamsResult ¶
type FilesystemAttachmentParamsResult struct { Result FilesystemAttachmentParams `json:"result"` Error *Error `json:"error,omitempty"` }
FilesystemAttachmentParamsResults holds provisioning parameters for a filesystem attachment.
type FilesystemAttachmentParamsResults ¶
type FilesystemAttachmentParamsResults struct {
Results []FilesystemAttachmentParamsResult `json:"results,omitempty"`
}
FilesystemAttachmentParamsResults holds provisioning parameters for multiple filesystem attachments.
type FilesystemAttachmentResult ¶
type FilesystemAttachmentResult struct { Result FilesystemAttachment `json:"result"` Error *Error `json:"error,omitempty"` }
FilesystemAttachmentResult holds the details of a single filesystem attachment, or an error.
type FilesystemAttachmentResults ¶
type FilesystemAttachmentResults struct {
Results []FilesystemAttachmentResult `json:"results,omitempty"`
}
FilesystemAttachmentResults holds a set of FilesystemAttachmentResults.
type FilesystemAttachments ¶
type FilesystemAttachments struct {
FilesystemAttachments []FilesystemAttachment `json:"filesystem-attachments"`
}
FilesystemAttachments describes a set of storage filesystem attachments.
type FilesystemDetails ¶
type FilesystemDetails struct { // FilesystemTag is the tag for the filesystem. FilesystemTag string `json:"filesystem-tag"` // VolumeTag is the tag for the volume backing the // filesystem, if any. VolumeTag string `json:"volume-tag,omitempty"` // Info contains information about the filesystem. Info FilesystemInfo `json:"info"` // Life contains the lifecycle state of the filesystem. // Juju controllers older than 2.2 do not populate this // field, so it may be omitted. Life Life `json:"life,omitempty"` // Status contains the status of the filesystem. Status EntityStatus `json:"status"` // MachineAttachments contains a mapping from // machine tag to filesystem attachment information. MachineAttachments map[string]FilesystemAttachmentDetails `json:"machine-attachments,omitempty"` // Storage contains details about the storage instance // that the volume is assigned to, if any. Storage *StorageDetails `json:"storage,omitempty"` }
FilesystemDetails describes a storage filesystem in the model for the purpose of filesystem CLI commands.
This is kept separate from Filesystem which contains only information specific to the filesystem model, whereas FilesystemDetails is intended to contain complete information about a filesystem and related information (status, attachments, storage).
type FilesystemDetailsListResult ¶
type FilesystemDetailsListResult struct { Result []FilesystemDetails `json:"result,omitempty"` Error *Error `json:"error,omitempty"` }
FilesystemDetailsListResult holds a collection of filesystem details.
type FilesystemDetailsListResults ¶
type FilesystemDetailsListResults struct {
Results []FilesystemDetailsListResult `json:"results,omitempty"`
}
FilesystemDetailsListResults holds a collection of collections of filesystem details.
type FilesystemDetailsResult ¶
type FilesystemDetailsResult struct { Result *FilesystemDetails `json:"result,omitempty"` Error *Error `json:"error,omitempty"` }
FilesystemDetailsResult contains details about a filesystem, its attachments or an error preventing retrieving those details.
type FilesystemDetailsResults ¶
type FilesystemDetailsResults struct {
Results []FilesystemDetailsResult `json:"results,omitempty"`
}
FilesystemDetailsResults holds filesystem details.
type FilesystemFilter ¶
type FilesystemFilter struct { // Machines are machine tags to filter on. Machines []string `json:"machines,omitempty"` }
FilesystemFilter holds a filter for filter list API call.
func (*FilesystemFilter) IsEmpty ¶
func (f *FilesystemFilter) IsEmpty() bool
IsEmpty determines if filter is empty
type FilesystemFilters ¶
type FilesystemFilters struct {
Filters []FilesystemFilter `json:"filters,omitempty"`
}
FilesystemFilters holds a collection of filesystem filters.
type FilesystemInfo ¶
type FilesystemInfo struct { FilesystemId string `json:"filesystem-id"` // Pool is the name of the storage pool used to // allocate the filesystem. Juju controllers older // than 2.2 do not populate this field, so it may // be omitted. Pool string `json:"pool"` // Size is the size of the filesystem in MiB. Size uint64 `json:"size"` }
Filesystem describes a storage filesystem in the model.
type FilesystemParams ¶
type FilesystemParams struct { FilesystemTag string `json:"filesystem-tag"` VolumeTag string `json:"volume-tag,omitempty"` Size uint64 `json:"size"` Provider string `json:"provider"` Attributes map[string]interface{} `json:"attributes,omitempty"` Tags map[string]string `json:"tags,omitempty"` Attachment *FilesystemAttachmentParams `json:"attachment,omitempty"` }
FilesystemParams holds the parameters for creating a storage filesystem.
type FilesystemParamsResult ¶
type FilesystemParamsResult struct { Result FilesystemParams `json:"result"` Error *Error `json:"error,omitempty"` }
FilesystemParamsResults holds provisioning parameters for a filesystem.
type FilesystemParamsResults ¶
type FilesystemParamsResults struct {
Results []FilesystemParamsResult `json:"results,omitempty"`
}
FilesystemParamsResults holds provisioning parameters for multiple filesystems.
type FilesystemResult ¶
type FilesystemResult struct { Result Filesystem `json:"result"` Error *Error `json:"error,omitempty"` }
FilesystemResult holds information about a filesystem.
type FilesystemResults ¶
type FilesystemResults struct {
Results []FilesystemResult `json:"results,omitempty"`
}
FilesystemResults holds information about multiple filesystems.
type Filesystems ¶
type Filesystems struct {
Filesystems []Filesystem `json:"filesystems"`
}
Filesystems describes a set of storage filesystems in the model.
type FindActionsByNames ¶
type FindActionsByNames struct {
ActionNames []string `json:"names,omitempty"`
}
FindActionsByName finds actions given an action name.
type FindApplicationOffersResults ¶
type FindApplicationOffersResults struct { // Results contains application offers matching each filter. Results []ApplicationOffer `json:"results"` }
FindApplicationOffersResults is a result of finding remote application offers.
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 `json:"number"` // MajorVersion will be used to match the major version if non-zero. MajorVersion int `json:"major"` // MinorVersion will be used to match the major version if greater // than or equal to zero, and Number is zero. MinorVersion int `json:"minor"` // Arch will be used to match tools by architecture if non-empty. Arch string `json:"arch"` // Series will be used to match tools by series if non-empty. Series string `json:"series"` }
FindToolsParams defines parameters for the FindTools method.
type FindToolsResult ¶
FindToolsResult holds a list of tools from FindTools and any error.
type FullStatus ¶
type FullStatus struct { Model ModelStatusInfo `json:"model"` Machines map[string]MachineStatus `json:"machines"` Applications map[string]ApplicationStatus `json:"applications"` RemoteApplications map[string]RemoteApplicationStatus `json:"remote-applications"` Relations []RelationStatus `json:"relations"` }
FullStatus holds information about the status of a juju model.
type GUIArchiveResponse ¶
type GUIArchiveResponse struct {
Versions []GUIArchiveVersion `json:"versions"`
}
GUIArchiveResponse holds the response to /gui-archive GET requests.
type GUIArchiveVersion ¶
type GUIArchiveVersion struct { // Version holds the Juju GUI version number. Version version.Number `json:"version"` // SHA256 holds the SHA256 hash of the GUI tar.bz2 archive. SHA256 string `json:"sha256"` // Current holds whether this specific version is the current one served // by the controller. Current bool `json:"current"` }
GUIArchiveVersion holds information on a specific GUI archive version.
type GUIVersionRequest ¶
type GUIVersionRequest struct { // Version holds the Juju GUI version number. Version version.Number `json:"version"` }
GUIVersionRequest holds the body for /gui-version PUT requests.
type GetAnnotations ¶
type GetAnnotations struct {
Tag string `json:"tag"`
}
GetAnnotations stores parameters for making the GetAnnotations call.
type GetAnnotationsResults ¶
GetAnnotationsResults holds annotations associated with an entity.
type GetApplicationConstraints ¶
type GetApplicationConstraints struct {
ApplicationName string `json:"application"`
}
GetApplicationConstraints stores parameters for making the GetApplicationConstraints call.
type GetConstraintsResults ¶
type GetConstraintsResults struct {
Constraints constraints.Value `json:"constraints"`
}
GetConstraintsResults holds results of the GetConstraints call.
type GetLeadershipSettingsBulkResults ¶
type GetLeadershipSettingsBulkResults struct {
Results []GetLeadershipSettingsResult `json:"results"`
}
GetLeadershipSettingsBulkResults is the collection of results from a bulk request for leadership settings.
type GetLeadershipSettingsResult ¶
type GetLeadershipSettingsResult struct { Settings Settings `json:"settings"` Error *Error `json:"error,omitempty"` }
GetLeadershipSettingsResult is the results from requesting leadership settings.
type GetTokenArg ¶
type GetTokenArg struct { // ModelTag is the tag of the model hosting the entity. ModelTag string `json:"model-tag"` // Tag is the tag of the entity for which we want the token. Tag string `json:"tag"` }
GetTokenArg holds the model and entity for which we want a token.
type GetTokenArgs ¶
type GetTokenArgs struct {
Args []GetTokenArg
}
GetTokenArgs holds the arguments to a GetTokens API call.
type HAMember ¶
type HAMember struct { Tag string `json:"tag"` PublicAddress network.Address `json:"public-address"` Series string `json:"series"` }
HAMember holds information that identifies one member of HA.
type History ¶
type History struct { Statuses []DetailedStatus `json:"statuses"` Error *Error `json:"error,omitempty"` }
History holds many DetailedStatus.
type HostNetworkChange ¶
type HostNetworkChange struct { Error *Error `json:"error,omitempty"` // NewBridges lists the bridges that need to be created and what host // device they should be connected to. NewBridges []DeviceBridgeInfo `json:"new-bridges"` // ReconfigureDelay is the duration in seconds to sleep before // raising the bridged interface ReconfigureDelay int `json:"reconfigure-delay"` }
HostNetworkChange holds the information about how a host machine should be modified to prepare for a container.
type HostNetworkChangeResults ¶
type HostNetworkChangeResults struct {
Results []HostNetworkChange `json:"results"`
}
HostNetworkChangeResults holds the network changes that are necessary for multiple containers to be created.
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 HostedModelConfig ¶
type HostedModelConfig struct { Name string `json:"name"` OwnerTag string `json:"owner"` Config map[string]interface{} `json:"config,omitempty"` CloudSpec *CloudSpec `json:"cloud-spec,omitempty"` Error *Error `json:"error,omitempty"` }
HostedModelConfig contains the model config and the cloud spec for the model, both things that a client needs to talk directly with the provider. This is used to take down mis-behaving models aggressively.
type HostedModelConfigsResults ¶
type HostedModelConfigsResults struct {
Models []HostedModelConfig `json:"models"`
}
HostedModelConfigsResults contains an entry for each hosted model in the controller.
type ImageFilterParams ¶
type ImageFilterParams struct {
Images []ImageSpec `json:"images"`
}
ImageFilterParams holds the parameters used to specify images to delete.
type ImageMetadata ¶
type ImageMetadata struct { Kind string `json:"kind"` Arch string `json:"arch"` Series string `json:"series"` URL string `json:"url"` Created time.Time `json:"created"` }
ImageMetadata represents an image in storage.
type ImageMetadataFilter ¶
type ImageMetadataFilter struct { // Region stores metadata region. Region string `json:"region,omitempty"` // Series stores all desired series. Series []string `json:"series,omitempty"` // Arches stores all desired architectures. Arches []string `json:"arches,omitempty"` // Stream can be "" or "released" for the default "released" stream, // or "daily" for daily images, or any other stream that the available // simplestreams metadata supports. Stream string `json:"stream,omitempty"` // VirtType stores virtualisation type. VirtType string `json:"virt-type,omitempty"` // RootStorageType stores storage type. RootStorageType string `json:"root-storage-type,omitempty"` }
ImageMetadataFilter holds filter properties used to search for image metadata. It amalgamates both simplestreams.MetadataLookupParams and simplestreams.LookupParams and adds additional properties to satisfy existing and new use cases.
type ImageSpec ¶
type ImageSpec struct { Kind string `json:"kind"` Arch string `json:"arch"` Series string `json:"series"` }
ImageSpec defines the parameters to select images list or delete.
type IngressSubnetInfo ¶
type IngressSubnetInfo struct { // CIDRs is the set if CIDRs which need to be allowed ingress to the application. CIDRs []string `json:"cidrs,omitempty"` }
IngressSubnetInfo is the result of an IngressSubnetsForRelation call.
type IngressSubnetResult ¶
type IngressSubnetResult struct { Error *Error `json:"error,omitempty"` Result *IngressSubnetInfo `json:"result,omitempty"` }
IngressSubnetResult holds ingress network information and an error.
type IngressSubnetResults ¶
type IngressSubnetResults struct {
Results []IngressSubnetResult `json:"results"`
}
IngressSubnetResults holds the result of an API call that returns information about ingress networks for multiple remote relations.
type InitiateMigrationArgs ¶
type InitiateMigrationArgs struct {
Specs []MigrationSpec `json:"specs"`
}
InitiateMigrationArgs holds the details required to start one or more model migrations.
type InitiateMigrationResult ¶
type InitiateMigrationResult struct { ModelTag string `json:"model-tag"` Error *Error `json:"error,omitempty"` MigrationId string `json:"migration-id"` }
InitiateMigrationResult is used to return the result of one model migration initiation attempt.
type InitiateMigrationResults ¶
type InitiateMigrationResults struct {
Results []InitiateMigrationResult `json:"results"`
}
InitiateMigrationResults is used to return the result of one or more attempts to start model migrations.
type InstanceInfo ¶
type InstanceInfo struct { Tag string `json:"tag"` InstanceId instance.Id `json:"instance-id"` Nonce string `json:"nonce"` Characteristics *instance.HardwareCharacteristics `json:"characteristics"` Volumes []Volume `json:"volumes"` // VolumeAttachments is a mapping from volume tag to // volume attachment info. VolumeAttachments map[string]VolumeAttachmentInfo `json:"volume-attachments"` NetworkConfig []NetworkConfig `json:"network-config"` }
InstanceInfo holds a machine tag, provider-specific instance id, a nonce, and network config.
type InstanceType ¶
type InstanceType struct { Name string `json:"name,omitempty"` Arches []string `json:"arches"` CPUCores int `json:"cpu-cores"` Memory int `json:"memory"` RootDiskSize int `json:"root-disk,omitempty"` VirtType string `json:"virt-type,omitempty"` Deprecated bool `json:"deprecated,omitempty"` Cost int `json:"cost,omitempty"` }
InstanceType represents an available instance type in a cloud.
type InstanceTypesResult ¶
type InstanceTypesResult struct { InstanceTypes []InstanceType `json:"instance-types,omitempty"` CostUnit string `json:"cost-unit,omitempty"` CostCurrency string `json:"cost-currency,omitempty"` // CostDivisor Will be present only when the Cost is not expressed in CostUnit. CostDivisor uint64 `json:"cost-divisor,omitempty"` Error *Error `json:"error,omitempty"` }
InstanceTypesResult contains the result of prompting a cloud for its instance types.
type InstanceTypesResults ¶
type InstanceTypesResults struct {
Results []InstanceTypesResult `json:"results"`
}
InstanceTypesResults contains the bulk result of prompting a cloud for its instance types.
type InstancesInfo ¶
type InstancesInfo struct {
Machines []InstanceInfo `json:"machines"`
}
InstancesInfo holds the parameters for making a SetInstanceInfo call for multiple machines.
type IntResult ¶
type IntResult struct { // Error holds the error (if any) of this call. Error *Error `json:"error,omitempty"` // Result holds the integer result of the call (if Error is nil). Result int `json:"result"` }
IntResult holds the result of an API call that returns a int or an error.
type IntResults ¶
type IntResults struct { // Results holds a list of results for calls that return an int or error. Results []IntResult `json:"results"` }
IntResults holds multiple results with an int in each.
type IsMasterResult ¶
type IsMasterResult struct { // Master reports whether the connected agent // lives on the same instance as the mongo replica // set master. Master bool `json:"master"` }
IsMasterResult holds the result of an IsMaster API call.
type IsMeteredResult ¶
type IsMeteredResult struct {
Metered bool `json:"metered"`
}
IsMeteredResult stores result from a charms.IsMetered call
type JobsResult ¶
type JobsResult struct { Jobs []multiwatcher.MachineJob `json:"jobs"` Error *Error `json:"error,omitempty"` }
JobsResult holds the jobs for a machine that are returned by a call to Jobs.
type JobsResults ¶
type JobsResults struct {
Results []JobsResult `json:"results"`
}
JobsResults holds the result of a call to Jobs.
type Life ¶
type Life multiwatcher.Life
Life describes the lifecycle state of an entity ("alive", "dying" or "dead").
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 `json:"results"`
}
LifeResults holds the life or error status of multiple entities.
type ListApplicationOffersResults ¶
type ListApplicationOffersResults struct { // Results contains application offers matching each filter. Results []ApplicationOfferDetails `json:"results"` }
ListApplicationOffersResults is a result of listing application offers.
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 ListResourcesArgs ¶
type ListResourcesArgs Entities
ListResourcesArgs are the arguments for the ListResources endpoint.
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 ListUnitResourcesArgs ¶
type ListUnitResourcesArgs struct { // ResourceNames holds the names of the application's resources for // which information should be provided. ResourceNames []string `json:"resource-names"` }
ListResourcesArgs holds the arguments for an API request to list resources for an application. The application is implicit to the uniter- specific HTTP connection.
type LogForwardingGetLastSentParams ¶
type LogForwardingGetLastSentParams struct { // IDs holds the list of IDs for which individual "last sent" // timestamps should be returned (in the same order). IDs []LogForwardingID `json:"ids"` }
LogForwardingGetLastSentParams holds the arguments for a call to the GetLastSent method of the LogForwarding facade.
type LogForwardingGetLastSentResult ¶
type LogForwardingGetLastSentResult struct { // RecordID is the ID of the last log record that was // forwarded for a given model and sink. If Error is set then the // meaning of this value is undefined. RecordID int64 `json:"record-id"` // RecordTimestamp is the timestamp of the last log record that was // forwarded for a given model and sink. If Error is set then the // meaning of this value is undefined. RecordTimestamp int64 `json:"record-timestamp"` // Error holds the error, if any, that resulted while handling the // request for a specific ID. Error *Error `json:"err"` }
LogForwardingGetLastSentResult holds a single result from a call to the GetLastSent method of the LogForwarding facade.
type LogForwardingGetLastSentResults ¶
type LogForwardingGetLastSentResults struct { // Results holds the list of results that correspond to the IDs // sent in a GetLastSent call. Results []LogForwardingGetLastSentResult `json:"results"` }
LogForwardingGetLastSentResults holds the results of a call to the GetLastSent method of the LogForwarding facade.
type LogForwardingID ¶
type LogForwardingID struct { // ModelTag identifies the model associated with the log record. ModelTag string `json:"model"` // Sink is the name of the log forwarding target to which a log // record was last sent. Sink string `json:"sink"` }
LogForwardingID is the API data that identifies a log forwarding "last sent" value. The controller has a mapping from a set of IDs to a timestamp (for each ID). The timestamp corresponds to the last log record that the specific log forwarding machinery sent to the identified "sink" (for a given model).
type LogForwardingSetLastSentParam ¶
type LogForwardingSetLastSentParam struct { LogForwardingID // RecordID identifies the record ID to set for the given ID. RecordID int64 `json:"record-id"` // RecordTimestamp identifies the record timestamp to set for the given ID. RecordTimestamp int64 `json:"record-timestamp"` }
LogForwardingSetLastSentParams holds holds the info needed to set a new "last sent" value via a call to the SetLastSent method of the LogForwarding facade.
type LogForwardingSetLastSentParams ¶
type LogForwardingSetLastSentParams struct { // Params holds the list of individual requests for "last sent" info. Params []LogForwardingSetLastSentParam `json:"params"` }
LogForwardingSetLastSentParams holds the arguments for a call to the SetLastSent method of the LogForwarding facade.
type LogMessage ¶
type LogMessage struct { Entity string `json:"tag"` Timestamp time.Time `json:"ts"` Severity string `json:"sev"` Module string `json:"mod"` Location string `json:"loc"` Message string `json:"msg"` }
LogMessage is a structured logging entry.
type LogRecord ¶
type LogRecord struct { Time time.Time `json:"t"` Module string `json:"m"` Location string `json:"l"` Level string `json:"v"` Message string `json:"x"` Entity string `json:"e,omitempty"` }
LogRecord is used to transmit log messages to the logsink API endpoint. Single character field names are used for serialisation to keep the size down. These messages are going to be sent a lot.
type LogStreamConfig ¶
type LogStreamConfig struct { // AllModels indicates whether logs for all the controller's models // should be included or just those of the connection's model. AllModels bool `schema:"all" url:"all,omitempty"` // Sink identifies the target to which log records will be streamed. // This is used as a bookmark for where to start the next time logs // are streamed for the same sink. Sink string `schema:"sink" url:"sink,omitempty"` // MaxLookbackDuration is the maximum time duration from the past to stream. // It must be a valid time duration string. MaxLookbackDuration string `schema:"maxlookbackduration" url:"maxlookbackduration,omitempty"` // MaxLookbackRecords is the maximum number of log records to stream from the past. MaxLookbackRecords int `schema:"maxlookbackrecords" url:"maxlookbackrecords,omitempty"` }
LogStreamConfig holds all the information necessary to open a streaming connection to the API endpoint for reading log records.
The field tags relate to the following 2 libraries:
github.com/google/go-querystring/query (encoding) github.com/gorilla/schema (decoding)
See apiserver/debuglog.go:debugLogParams for additional things we may consider supporting here.
type LogStreamRecord ¶
type LogStreamRecord struct { ID int64 `json:"id"` ModelUUID string `json:"mid"` Entity string `json:"ent"` Version string `json:"ver,omitempty"` Timestamp time.Time `json:"ts"` Module string `json:"mod"` Location string `json:"lo"` Level string `json:"lv"` Message string `json:"msg"` }
LogStreamRecord describes a single log record being streamed from the server.
type LogStreamRecords ¶
type LogStreamRecords struct {
Records []LogStreamRecord `json:"records"`
}
LogStreamRecord contains a slice of LogStreamRecords.
type LoginRequest ¶
type LoginRequest struct { AuthTag string `json:"auth-tag"` Credentials string `json:"credentials"` Nonce string `json:"nonce"` Macaroons []macaroon.Slice `json:"macaroons"` UserData string `json:"user-data"` }
LoginRequest holds credentials for identifying an entity to the Login v1 facade. AuthTag holds the tag of the user to connect as. If it is empty, then the provided macaroon slices will be used for authentication (if any one is valid, the authentication succeeds). If there are no valid macaroons and macaroon authentication is configured, the LoginResponse will contain a macaroon that when discharged, may allow access.
type LoginRequestCompat ¶
type LoginRequestCompat struct { LoginRequest `json:"login-request"` Creds `json:"creds"` }
LoginRequestCompat holds credentials for identifying an entity to the Login v1 or earlier (v0 or even pre-facade).
type LoginResult ¶
type LoginResult struct { // DischargeRequired implies that the login request has failed, and none of // the other fields are populated. It contains a macaroon which, when // discharged, will grant access on a subsequent call to Login. // Note: It is OK to use the Macaroon type here as it is explicitely // designed to provide stable serialisation of macaroons. It's good // practice to only use primitives in types that will be serialised, // however because of the above it is suitable to use the Macaroon type // here. DischargeRequired *macaroon.Macaroon `json:"discharge-required,omitempty"` // DischargeRequiredReason holds the reason that the above discharge was // required. DischargeRequiredReason string `json:"discharge-required-error,omitempty"` // Servers is the list of API server addresses. Servers [][]HostPort `json:"servers,omitempty"` // ModelTag is the tag for the model that is being connected to. ModelTag string `json:"model-tag,omitempty"` // ControllerTag is the tag for the controller that runs the API servers. ControllerTag string `json:"controller-tag,omitempty"` // UserInfo describes the authenticated user, if any. UserInfo *AuthUserInfo `json:"user-info,omitempty"` // Facades describes all the available API facade versions to the // authenticated client. Facades []FacadeVersions `json:"facades,omitempty"` // ServerVersion is the string representation of the server version // if the server supports it. ServerVersion string `json:"server-version,omitempty"` }
LoginResult holds the result of an Admin Login call.
type LookUpPayloadArg ¶
type LookUpPayloadArg struct { // Name is the payload name. Name string `json:"name"` // ID uniquely identifies the payload for the given name. ID string `json:"id"` }
LookUpPayloadArg contains all the information necessary to identify a payload.
type LookUpPayloadArgs ¶
type LookUpPayloadArgs struct { // Args is the list of arguments to pass to this function. Args []LookUpPayloadArg `json:"args"` }
LookUpPayloadArgs are the arguments for the LookUp endpoint.
type MacaroonResult ¶
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,omitempty"` Addresses []Address `json:"addresses"` }
MachineAddressesResult holds a list of machine addresses or an error.
type MachineAddressesResults ¶
type MachineAddressesResults struct {
Results []MachineAddressesResult `json:"results"`
}
MachineAddressesResults holds the results of calling an API method returning a list of addresses per machine.
type MachineBlockDevices ¶
type MachineBlockDevices struct { Machine string `json:"machine"` BlockDevices []storage.BlockDevice `json:"block-devices,omitempty"` }
MachineBlockDevices holds a machine tag and the block devices present on that machine.
type MachineContainers ¶
type MachineContainers struct { MachineTag string `json:"machine-tag"` ContainerTypes []instance.ContainerType `json:"container-types"` }
MachineContainers holds the arguments for making an SetSupportedContainers call on a given machine.
type MachineContainersParams ¶
type MachineContainersParams struct {
Params []MachineContainers `json:"params"`
}
MachineContainersParams holds the arguments for making a SetSupportedContainers API call.
type MachineHardware ¶
type MachineHardware struct { Arch *string `json:"arch,omitempty"` Mem *uint64 `json:"mem,omitempty"` RootDisk *uint64 `json:"root-disk,omitempty"` Cores *uint64 `json:"cores,omitempty"` CpuPower *uint64 `json:"cpu-power,omitempty"` Tags *[]string `json:"tags,omitempty"` AvailabilityZone *string `json:"availability-zone,omitempty"` }
MachineHardware holds information about a machine's hardware characteristics.
type MachineNetworkConfigResult ¶
type MachineNetworkConfigResult struct { Error *Error `json:"error,omitempty"` // Tagged to Info due to compatibility reasons. Config []NetworkConfig `json:"info"` }
MachineNetworkConfigResult holds network configuration for a single machine.
type MachineNetworkConfigResults ¶
type MachineNetworkConfigResults struct {
Results []MachineNetworkConfigResult `json:"results"`
}
MachineNetworkConfigResults holds network configuration for multiple machines.
type MachinePortRange ¶
type MachinePortRange struct { UnitTag string `json:"unit-tag"` RelationTag string `json:"relation-tag"` PortRange PortRange `json:"port-range"` }
MachinePortRange holds a single port range open on a machine for the given unit and relation tags.
type MachinePorts ¶
type MachinePorts struct { MachineTag string `json:"machine-tag"` SubnetTag string `json:"subnet-tag"` }
MachinePorts holds a machine and subnet tags. It's used when referring to opened ports on the machine for a subnet.
type MachinePortsParams ¶
type MachinePortsParams struct {
Params []MachinePorts `json:"params"`
}
MachinePortsParams holds the arguments for making a FirewallerAPIV1.GetMachinePorts() API call.
type MachinePortsResult ¶
type MachinePortsResult struct { Error *Error `json:"error,omitempty"` Ports []MachinePortRange `json:"ports"` }
MachinePortsResult holds a single result of the FirewallerAPIV1.GetMachinePorts() and UniterAPI.AllMachinePorts() API calls.
type MachinePortsResults ¶
type MachinePortsResults struct {
Results []MachinePortsResult `json:"results"`
}
MachinePortsResults holds all the results of the FirewallerAPIV1.GetMachinePorts() and UniterAPI.AllMachinePorts() API calls.
type MachineStatus ¶
type MachineStatus struct { AgentStatus DetailedStatus `json:"agent-status"` InstanceStatus DetailedStatus `json:"instance-status"` DNSName string `json:"dns-name"` // IPAddresses holds the IP addresses known for this machine. It is // here for backwards compatibility. It should be similar to its // namesakes in NetworkInterfaces, but may also include any // public/floating IP addresses not actually bound to the machine but // known to the provider. IPAddresses []string `json:"ip-addresses,omitempty"` // InstanceId holds the unique identifier for this machine, based on // what is supplied by the provider. InstanceId instance.Id `json:"instance-id"` // Series holds the name of the operating system release installed on // this machine. Series string `json:"series"` // Id is the Juju identifier for this machine in this model. Id string `json:"id"` // NetworkInterfaces holds a map of NetworkInterface for this machine. NetworkInterfaces map[string]NetworkInterface `json:"network-interfaces,omitempty"` // Containers holds the MachineStatus of any containers hosted on this // machine. Containers map[string]MachineStatus `json:"containers"` // Constraints holds a string of space-separated key=value pairs for // each constraint datum. Constraints string `json:"constraints"` // Hardware holds a string of space-separated key=value pairs for each // hardware specification datum. Hardware string `json:"hardware"` Jobs []multiwatcher.MachineJob `json:"jobs"` HasVote bool `json:"has-vote"` WantsVote bool `json:"wants-vote"` }
MachineStatus holds status info about a machine.
type MachineStorageId ¶
type MachineStorageId struct { MachineTag string `json:"machine-tag"` // AttachmentTag is the tag of the volume or filesystem whose // attachment to the machine is represented. AttachmentTag string `json:"attachment-tag"` }
MachineStorageId identifies the attachment of a storage entity to a machine, by their tags.
type MachineStorageIds ¶
type MachineStorageIds struct {
Ids []MachineStorageId `json:"ids"`
}
MachineStorageIds holds a set of machine/storage-entity attachment identifiers.
type MachineStorageIdsWatchResult ¶
type MachineStorageIdsWatchResult struct { MachineStorageIdsWatcherId string `json:"watcher-id"` Changes []MachineStorageId `json:"changes"` Error *Error `json:"error,omitempty"` }
MachineStorageIdsWatchResult holds a MachineStorageIdsWatcher id, changes and an error (if any).
type MachineStorageIdsWatchResults ¶
type MachineStorageIdsWatchResults struct {
Results []MachineStorageIdsWatchResult `json:"results"`
}
MachineStorageIdsWatchResults holds the results for any API call which ends up returning a list of MachineStorageIdsWatchers.
type MapResult ¶
type MapResult struct { Result map[string]interface{} `json:"result"` Error *Error `json:"error,omitempty"` }
MapResult holds a generic map or an error.
type MapResults ¶
type MapResults struct {
Results []MapResult `json:"results"`
}
MapResults holds the bulk operation result of an API call that returns a map or an error.
type MasterMigrationStatus ¶
type MasterMigrationStatus struct { Spec MigrationSpec `json:"spec"` MigrationId string `json:"migration-id"` Phase string `json:"phase"` PhaseChangedTime time.Time `json:"phase-changed-time"` }
MasterMigrationStatus is used to report the current status of a model migration for the migrationmaster. It includes authentication details for the remote controller.
type MergeLeadershipSettingsBulkParams ¶
type MergeLeadershipSettingsBulkParams struct { // Params are the parameters for making a bulk leadership settings // merge. Params []MergeLeadershipSettingsParam `json:"params"` }
MergeLeadershipSettingsBulkParams is a collection of parameters for making a bulk merge of leadership settings.
type MergeLeadershipSettingsParam ¶
type MergeLeadershipSettingsParam struct { // ApplicationTag is the application for which you want to merge // leadership settings. ApplicationTag string `json:"application-tag"` // Settings are the Leadership settings you wish to merge in. Settings Settings `json:"settings"` }
MergeLeadershipSettingsParam are the parameters needed for merging in leadership settings.
type MetadataImageIds ¶
type MetadataImageIds struct {
Ids []string `json:"image-ids"`
}
MetadataImageIds holds image ids and can be used to identify related image metadata.
type MetadataSaveParams ¶
type MetadataSaveParams struct {
Metadata []CloudImageMetadataList `json:"metadata,omitempty"`
}
MetadataSaveParams holds lists of cloud image metadata to save. Each list will be saved atomically.
type MeterStatus ¶
MeterStatus represents the meter status of a unit.
type MeterStatusParam ¶
type MeterStatusParam struct { Tag string `json:"tag"` Code string `json:"code"` Info string `json:"info, omitempty"` }
MeterStatusParam holds meter status information to be set for the specified tag.
type MeterStatusParams ¶
type MeterStatusParams struct {
Statuses []MeterStatusParam `json:"statues"`
}
MeterStatusParams holds parameters for making SetMeterStatus calls.
type MeterStatusResult ¶
type MeterStatusResult struct { Code string `json:"code"` Info string `json:"info"` Error *Error `json:"error,omitempty"` }
MeterStatusResult holds unit meter status or error.
type MeterStatusResults ¶
type MeterStatusResults struct {
Results []MeterStatusResult `json:"results"`
}
MeterStatusResults holds meter status results for multiple units.
type Metric ¶
type Metric struct { Key string `json:"key"` Value string `json:"value"` Time time.Time `json:"time"` }
Metric holds a single metric.
type MetricBatch ¶
type MetricBatch struct { UUID string `json:"uuid"` CharmURL string `json:"charm-url"` Created time.Time `json:"created"` Metrics []Metric `json:"metrics"` }
MetricBatch is a list of metrics with metadata.
type MetricBatchParam ¶
type MetricBatchParam struct { Tag string `json:"tag"` Batch MetricBatch `json:"batch"` }
MetricBatchParam contains a single metric batch.
type MetricBatchParams ¶
type MetricBatchParams struct {
Batches []MetricBatchParam `json:"batches"`
}
MetricBatchParams contains multiple metric batches.
type MetricResult ¶
type MetricResult struct { Time time.Time `json:"time"` Key string `json:"key"` Value string `json:"value"` Unit string `json:"unit"` }
MetricResult contains a single metric.
type MetricResults ¶
type MetricResults struct {
Results []EntityMetrics `json:"results"`
}
MetricResults contains results from a GetMetrics call, with one item per Entity given as an argument to the command.
func (*MetricResults) OneError ¶
func (m *MetricResults) OneError() error
OneError returns the first error
type MetricsParam ¶
MetricsParam contains the metrics for a single unit.
type MetricsParams ¶
type MetricsParams struct {
Metrics []MetricsParam `json:"metrics"`
}
MetricsParams contains the metrics for multiple units.
type MigrationModelInfo ¶
type MigrationModelInfo struct { UUID string `json:"uuid"` Name string `json:"name"` OwnerTag string `json:"owner-tag"` AgentVersion version.Number `json:"agent-version"` ControllerAgentVersion version.Number `json:"controller-agent-version"` }
MigrationModelInfo is used to report basic model information to the migrationmaster worker.
type MigrationSpec ¶
type MigrationSpec struct { ModelTag string `json:"model-tag"` TargetInfo MigrationTargetInfo `json:"target-info"` ExternalControl bool `json:"external-control"` // SkipInitialPrechecks allows the migration prechecks run during // handling of the InitiateMigration API call to be bypassed. It // is only honoured if ExternalControl is true. SkipInitialPrechecks bool `json:"skip-initial-prechecks"` }
MigrationSpec holds the details required to start the migration of a single model.
type MigrationStatus ¶
type MigrationStatus struct { MigrationId string `json:"migration-id"` Attempt int `json:"attempt"` Phase string `json:"phase"` ExternalControl bool `json:"external-control"` // TODO(mjs): I'm not convinced these Source fields will get used. SourceAPIAddrs []string `json:"source-api-addrs"` SourceCACert string `json:"source-ca-cert"` TargetAPIAddrs []string `json:"target-api-addrs"` TargetCACert string `json:"target-ca-cert"` }
MigrationStatus reports the current status of a model migration.
type MigrationTargetInfo ¶
type MigrationTargetInfo struct { ControllerTag string `json:"controller-tag"` Addrs []string `json:"addrs"` CACert string `json:"ca-cert"` AuthTag string `json:"auth-tag"` Password string `json:"password,omitempty"` Macaroons string `json:"macaroons,omitempty"` }
MigrationTargetInfo holds the details required to connect to and authenticate with a remote controller for model migration.
type MinionReport ¶
type MinionReport struct { // MigrationId holds the id of the migration the agent is // reporting about. MigrationId string `json:"migration-id"` // Phase holds the phase of the migration the agent is // reporting about. Phase string `json:"phase"` // Success is true if the agent successfully completed its actions // for the migration phase, false otherwise. Success bool `json:"success"` }
MinionReport holds the details of whether a migration minion succeeded or failed for a specific migration phase.
type MinionReports ¶
type MinionReports struct { // MigrationId holds the id of the migration the reports related to. MigrationId string `json:"migration-id"` // Phase holds the phase of the migration the reports related to. Phase string `json:"phase"` // SuccessCount holds the number of agents which have successfully // completed a given migration phase. SuccessCount int `json:"success-count"` // UnknownCount holds the number of agents still to report for a // given migration phase. UnknownCount int `json:"unknown-count"` // UnknownSample holds the tags of a limited number of agents // that are still to report for a given migration phase (for // logging or showing in a user interface). UnknownSample []string `json:"unknown-sample"` // Failed contains the tags of all agents which have reported a // failed to complete a given migration phase. Failed []string `json:"failed"` }
MinionReports holds the details of whether a migration minion succeeded or failed for a specific migration phase.
type Model ¶
type Model struct { Name string `json:"name"` UUID string `json:"uuid"` OwnerTag string `json:"owner-tag"` }
Model holds the result of an API call returning a name and UUID for a model and the tag of the server in which it is running.
type ModelAction ¶
type ModelAction string
ModelAction is an action that can be performed on a model.
const ( GrantModelAccess ModelAction = "grant" RevokeModelAccess ModelAction = "revoke" )
Actions that can be preformed on a model.
type ModelArgs ¶
type ModelArgs struct {
ModelTag string `json:"model-tag"`
}
ModelArgs wraps a simple model tag.
type ModelBlockInfo ¶
type ModelBlockInfo struct { Name string `json:"name"` UUID string `json:"model-uuid"` OwnerTag string `json:"owner-tag"` Blocks []string `json:"blocks"` }
ModelBlockInfo holds information about an model and its current blocks.
type ModelBlockInfoList ¶
type ModelBlockInfoList struct {
Models []ModelBlockInfo `json:"models,omitempty"`
}
ModelBlockInfoList holds information about the blocked models for a controller.
type ModelConfigResult ¶
type ModelConfigResult struct {
Config ModelConfig `json:"config"`
}
ModelConfigResult holds model configuration.
type ModelConfigResults ¶
type ModelConfigResults struct {
Config map[string]ConfigValue `json:"config"`
}
ModelConfigResults contains the result of client API calls to get model config values.
type ModelCreateArgs ¶
type ModelCreateArgs struct { // Name is the name for the new model. Name string `json:"name"` // OwnerTag represents the user that will own the new model. // The OwnerTag must be a valid user tag. If the user tag represents // a local user, that user must exist. OwnerTag string `json:"owner-tag"` // Config defines the model config, which includes the name of the // model. A model UUID is allocated by the API server during the // creation of the model. Config map[string]interface{} `json:"config,omitempty"` // CloudTag is the tag of the cloud to create the model in. // If this is empty, the model will be created in the same // cloud as the controller model. CloudTag string `json:"cloud-tag,omitempty"` // CloudRegion is the name of the cloud region to create the // model in. If the cloud does not support regions, this must // be empty. If this is empty, and CloudTag is empty, the model // will be created in the same region as the controller model. CloudRegion string `json:"region,omitempty"` // CloudCredentialTag is the tag of the cloud credential to use // for managing the model's resources. If the cloud does not // require credentials, this may be empty. If this is empty, // and the owner is the controller owner, the same credential // used for the controller model will be used. CloudCredentialTag string `json:"credential,omitempty"` }
ModelCreateArgs holds the arguments that are necessary to create a model.
type ModelDefaultValues ¶
type ModelDefaultValues struct { CloudTag string `json:"cloud-tag,omitempty"` CloudRegion string `json:"cloud-region,omitempty"` Config map[string]interface{} `json:"config"` }
ModelDefaultValues contains the default model values for a cloud/region.
type ModelDefaults ¶
type ModelDefaults struct { Default interface{} `json:"default,omitempty"` Controller interface{} `json:"controller,omitempty"` Regions []RegionDefaults `json:"regions,omitempty"` }
ModelDefaults holds the settings for a given ModelDefaultsResult config attribute.
type ModelDefaultsResult ¶
type ModelDefaultsResult struct {
Config map[string]ModelDefaults `json:"config"`
}
ModelDefaultsResult contains the result of client API calls to get the model default values.
type ModelInfo ¶
type ModelInfo struct { Name string `json:"name"` UUID string `json:"uuid"` ControllerUUID string `json:"controller-uuid"` ProviderType string `json:"provider-type"` DefaultSeries string `json:"default-series"` CloudTag string `json:"cloud-tag"` CloudRegion string `json:"cloud-region,omitempty"` CloudCredentialTag string `json:"cloud-credential-tag,omitempty"` // OwnerTag is the tag of the user that owns the model. OwnerTag string `json:"owner-tag"` // Life is the current lifecycle state of the model. Life Life `json:"life"` // Status is the current status of the model. Status EntityStatus `json:"status"` // Users contains information about the users that have access // to the model. Owners and administrators can see all users // that have access; other users can only see their own details. Users []ModelUserInfo `json:"users"` // Machines contains information about the machines in the model. // This information is available to owners and users with write // access or greater. Machines []ModelMachineInfo `json:"machines"` // Migration contains information about the latest failed or // currently-running migration. It'll be nil if there isn't one. Migration *ModelMigrationStatus `json:"migration,omitempty"` }
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 ModelInstanceTypesConstraint ¶
type ModelInstanceTypesConstraint struct { // Value, if specified, contains the constraints to filter // the instance types by. If Value is not specified, then // no filtering by constraints will take place: all instance // types supported by the region will be returned. Value *constraints.Value `json:"value,omitempty"` }
ModelInstanceTypesConstraint contains a constraint applied when filtering instance types.
type ModelInstanceTypesConstraints ¶
type ModelInstanceTypesConstraints struct { // Constraints, if specified, contains the constraints to filter // the instance types by. If Constraints is not specified, then // no filtering by constraints will take place: all instance // types supported by the model will be returned. Constraints []ModelInstanceTypesConstraint `json:"constraints"` }
ModelInstanceTypesConstraints contains a slice of InstanceTypesConstraint.
type ModelMachineInfo ¶
type ModelMachineInfo struct { Id string `json:"id"` Hardware *MachineHardware `json:"hardware,omitempty"` InstanceId string `json:"instance-id,omitempty"` Status string `json:"status,omitempty"` HasVote bool `json:"has-vote,omitempty"` WantsVote bool `json:"wants-vote,omitempty"` }
ModelMachineInfo holds information about a machine in a model.
type ModelMigrationStatus ¶
type ModelMigrationStatus struct { Status string `json:"status"` Start *time.Time `json:"start"` End *time.Time `json:"end,omitempty"` }
ModelMigrationStatus holds information about the progress of a (possibly failed) migration.
type ModelResult ¶
type ModelResult struct { Error *Error `json:"error,omitempty"` Name string `json:"name"` UUID string `json:"uuid"` }
ModelResult holds the result of an API call returning a name and UUID for a model.
type ModelSet ¶
type ModelSet struct {
Config map[string]interface{} `json:"config"`
}
ModelSet contains the arguments for ModelSet client API call.
type ModelStatus ¶
type ModelStatus struct { ModelTag string `json:"model-tag"` Life Life `json:"life"` HostedMachineCount int `json:"hosted-machine-count"` ApplicationCount int `json:"application-count"` OwnerTag string `json:"owner-tag"` Machines []ModelMachineInfo `json:"machines,omitempty"` }
ModelStatus holds information about the status of a juju model.
type ModelStatusInfo ¶
type ModelStatusInfo struct { Name string `json:"name"` CloudTag string `json:"cloud-tag"` CloudRegion string `json:"region,omitempty"` Version string `json:"version"` AvailableVersion string `json:"available-version"` ModelStatus DetailedStatus `json:"model-status"` }
ModelStatusInfo holds status information about the model itself.
type ModelStatusResults ¶
type ModelStatusResults struct {
Results []ModelStatus `json:"models"`
}
ModelStatusResults holds status information about a group of models.
type ModelUnset ¶
type ModelUnset struct {
Keys []string `json:"keys"`
}
ModelUnset contains the arguments for ModelUnset client API call.
type ModelUnsetKeys ¶
type ModelUnsetKeys struct { CloudTag string `json:"cloud-tag,omitempty"` CloudRegion string `json:"cloud-region,omitempty"` Keys []string `json:"keys"` }
ModelUnsetKeys contains the config keys to unset for a cloud/region.
type ModelUserInfo ¶
type ModelUserInfo struct { UserName string `json:"user"` DisplayName string `json:"display-name"` LastConnection *time.Time `json:"last-connection"` Access UserAccessPermission `json:"access"` }
ModelUserInfo holds information on a user who has access to a model. Owners of a model can see this information for all users who have access, so it should not include sensitive information.
type ModelUserInfoResult ¶
type ModelUserInfoResult struct { Result *ModelUserInfo `json:"result,omitempty"` Error *Error `json:"error,omitempty"` }
ModelUserInfoResult holds the result of an ModelUserInfo call.
type ModelUserInfoResults ¶
type ModelUserInfoResults struct {
Results []ModelUserInfoResult `json:"results"`
}
ModelUserInfoResults holds the result of a bulk ModelUserInfo API call.
type ModifyControllerAccess ¶
type ModifyControllerAccess struct { UserTag string `json:"user-tag"` Action ControllerAction `json:"action"` Access string `json:"access"` }
type ModifyControllerAccessRequest ¶
type ModifyControllerAccessRequest struct {
Changes []ModifyControllerAccess `json:"changes"`
}
ModifyControllerAccessRequest holds the parameters for making grant and revoke controller calls.
type ModifyModelAccess ¶
type ModifyModelAccess struct { UserTag string `json:"user-tag"` Action ModelAction `json:"action"` Access UserAccessPermission `json:"access"` ModelTag string `json:"model-tag"` }
type ModifyModelAccessRequest ¶
type ModifyModelAccessRequest struct {
Changes []ModifyModelAccess `json:"changes"`
}
ModifyModelAccessRequest holds the parameters for making grant and revoke model calls.
type ModifyUserSSHKeys ¶
ModifyUserSSHKeys stores parameters used for a KeyManager.Add|Delete|Import call for a user.
type MongoUpgradeResults ¶
type MongoUpgradeResults struct { RsMembers []replicaset.Member `json:"rs-members"` Master HAMember `json:"master"` Members []HAMember `json:"ha-members"` }
MongoUpgradeResults holds the results of an attempt to enter upgrade mongo mode.
type MongoVersion ¶
type NetworkConfig ¶
type NetworkConfig struct { // DeviceIndex specifies the order in which the network interface // appears on the host. The primary interface has an index of 0. DeviceIndex int `json:"device-index"` // MACAddress is the network interface's hardware MAC address // (e.g. "aa:bb:cc:dd:ee:ff"). MACAddress string `json:"mac-address"` // CIDR of the network, in 123.45.67.89/24 format. CIDR string `json:"cidr"` // MTU is the Maximum Transmission Unit controlling the maximum size of the // protocol packats that the interface can pass through. It is only used // when > 0. MTU int `json:"mtu"` // ProviderId is a provider-specific network interface id. ProviderId string `json:"provider-id"` // ProviderSubnetId is a provider-specific subnet id, to which the // interface is attached to. ProviderSubnetId string `json:"provider-subnet-id"` // ProviderSpaceId is a provider-specific space id, to which the interface // is attached to, if known and supported. ProviderSpaceId string `json:"provider-space-id"` // ProviderAddressId is the provider-specific id of the assigned address, if // supported and known. ProviderAddressId string `json:"provider-address-id"` // ProviderVLANId is the provider-specific id of the assigned address's // VLAN, if supported and known. ProviderVLANId string `json:"provider-vlan-id"` // VLANTag needs to be between 1 and 4094 for VLANs and 0 for // normal networks. It's defined by IEEE 802.1Q standard. VLANTag int `json:"vlan-tag"` // InterfaceName is the raw OS-specific network device name (e.g. // "eth1", even for a VLAN eth1.42 virtual interface). InterfaceName string `json:"interface-name"` // ParentInterfaceName is the name of the parent interface to use, if known. ParentInterfaceName string `json:"parent-interface-name"` // InterfaceType is the type of the interface. InterfaceType string `json:"interface-type"` // Disabled is true when the interface needs to be disabled on the // machine, e.g. not to configure it at all or stop it if running. Disabled bool `json:"disabled"` // NoAutoStart is true when the interface should not be configured // to start automatically on boot. By default and for // backwards-compatibility, interfaces are configured to // auto-start. NoAutoStart bool `json:"no-auto-start,omitempty"` // ConfigType, if set, defines what type of configuration to use. // See network.InterfaceConfigType for more info. If not set, for // backwards-compatibility, "dhcp" is assumed. ConfigType string `json:"config-type,omitempty"` // Address contains an optional static IP address to configure for // this network interface. The subnet mask to set will be inferred // from the CIDR value. Address string `json:"address,omitempty"` // DNSServers contains an optional list of IP addresses and/or // hostnames to configure as DNS servers for this network // interface. DNSServers []string `json:"dns-servers,omitempty"` // DNSServers contains an optional list of IP addresses and/or // hostnames to configure as DNS servers for this network // interface. DNSSearchDomains []string `json:"dns-search-domains,omitempty"` // Gateway address, if set, defines the default gateway to // configure for this network interface. For containers this // usually (one of) the host address(es). GatewayAddress string `json:"gateway-address,omitempty"` // Routes is a list of routes that should be applied when this interface is // active. Routes []NetworkRoute `json:"routes,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 NetworkInterface ¶
type NetworkInterface struct { // IPAddresses holds the IP addresses bound to this machine. IPAddresses []string `json:"ip-addresses"` MACAddress string `json:"mac-address"` Gateway string `json:"gateway,omitempty"` DNSNameservers []string `json:"dns-nameservers,omitempty"` // Space holds the name of a space in which this devices IP addr's // subnet belongs. Space string `json:"space,omitempty"` // Is this interface up? IsUp bool `json:"is-up"` }
NetworkInterfaceStatus holds a /etc/network/interfaces-type data and the space name for any device with at least one associated IP address.
type NetworkRoute ¶
type NetworkRoute struct { // DestinationCIDR is the Subnet CIDR of traffic that needs a custom route. DestinationCIDR string `json:"destination-cidr"` // GatewayIP is the target IP to use as the next-hop when sending traffic to DestinationCIDR GatewayIP string `json:"gateway-ip"` // Metric is the cost for this particular route. Metric int `json:"metric"` }
NetworkRoute describes a special route that should be added for a given network interface.
type NotifyWatchResult ¶
NotifyWatchResult holds a NotifyWatcher id and an error (if any).
type NotifyWatchResults ¶
type NotifyWatchResults struct {
Results []NotifyWatchResult `json:"results"`
}
NotifyWatchResults holds the results for any API call which ends up returning a list of NotifyWatchers
type OfferFilter ¶
type OfferFilter struct { ModelName string `json:"model-name"` OfferName string `json:"offer-name"` ApplicationName string `json:"application-name"` ApplicationDescription string `json:"application-description"` ApplicationUser string `json:"application-user"` Endpoints []EndpointFilterAttributes `json:"endpoints"` AllowedUserTags []string `json:"allowed-users"` }
OfferFilter is used to query offers.
type OfferFilters ¶
type OfferFilters struct {
Filters []OfferFilter
}
OfferFilters is used to query offers. Offers matching any of the filters are returned.
type Payload ¶
type Payload struct { // Class is the name of the payload class. Class string `json:"class"` // Type is the name of the payload type. Type string `json:"type"` // ID is a unique string identifying the payload to // the underlying technology. ID string `json:"id"` // Status is the Juju-level status for the payload. Status string `json:"status"` // Labels are labels associated with the payload. Labels []string `json:"labels"` // Unit identifies the unit tag associated with the payload. Unit string `json:"unit"` // Machine identifies the machine tag associated with the payload. Machine string `json:"machine"` }
Payload contains full information about a payload.
type PayloadListArgs ¶
type PayloadListArgs struct { // Patterns is the list of patterns against which to filter. Patterns []string `json:"patterns"` }
PayloadListArgs are the arguments for the Payloads.List endpoint.
type PayloadListResults ¶
type PayloadListResults struct { // Results is the list of payload results. Results []Payload `json:"results"` }
PayloadListResults returns the result of the Payload.List endpoint.
type PayloadResult ¶
type PayloadResult struct { Entity // Payload holds the details of the payload, if any. Payload *Payload `json:"payload"` // NotFound indicates that the payload was not found in state. NotFound bool `json:"not-found"` // Error is the error (if any) for the call referring to ID. Error *Error `json:"error,omitempty"` }
PayloadResult contains the result for a single call.
type PayloadResults ¶
type PayloadResults struct {
Results []PayloadResult `json:"results"`
}
PayloadResults is the result for a call that makes one or more requests about payloads.
type PhaseResult ¶
type PhaseResult struct { Phase string `json:"phase,omitempty"` Error *Error `json:"error,omitempty"` }
PhaseResult holds the phase of a single model migration, or an error if the phase could not be determined.
type PhaseResults ¶
type PhaseResults struct {
Results []PhaseResult `json:"results"`
}
PhasesResults holds the phase of one or more model migrations.
type Port ¶
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:"from-port"` ToPort int `json:"to-port"` Protocol string `json:"protocol"` }
PortRange represents a single range of ports. It is used in API requests/responses. See also network.PortRange, from/to which this is transformed.
func FromNetworkPortRange ¶
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 `json:"target"`
}
PrivateAddress holds parameters for the PrivateAddress call.
type PrivateAddressResults ¶
type PrivateAddressResults struct {
PrivateAddress string `json:"private-address"`
}
PrivateAddressResults holds results of the PrivateAddress call.
type ProviderInterfaceInfo ¶
type ProviderInterfaceInfo struct { InterfaceName string `json:"interface-name"` MACAddress string `json:"mac-address"` ProviderId string `json:"provider-id"` }
ProviderInterfaceInfo stores the details needed to identify an interface to a provider. It's the params equivalent of network.ProviderInterfaceInfo, defined here separately to ensure that API structures aren't inadvertently changed by internal changes.
type ProviderInterfaceInfoResult ¶
type ProviderInterfaceInfoResult struct { MachineTag string `json:"machine-tag"` Interfaces []ProviderInterfaceInfo `json:"interfaces"` Error *Error `json:"error,omitempty"` }
ProviderInterfaceInfoResult stores the provider interface information for one machine, or any error that occurred getting the information for that machine.
type ProviderInterfaceInfoResults ¶
type ProviderInterfaceInfoResults struct {
Results []ProviderInterfaceInfoResult `json:"results"`
}
ProviderInterfaceInfoResults holds the results of a GetProviderInterfaceInfo call.
type ProviderSpace ¶
type ProviderSpace struct { Name string `json:"name"` ProviderId string `json:"provider-id"` Subnets []Subnet `json:"subnets"` Error *Error `json:"error,omitempty"` }
ProviderSpace holds the information about a single space and its associated subnets.
type ProvisioningInfo ¶
type ProvisioningInfo struct { Constraints constraints.Value `json:"constraints"` Series string `json:"series"` Placement string `json:"placement"` Jobs []multiwatcher.MachineJob `json:"jobs"` Volumes []VolumeParams `json:"volumes,omitempty"` Tags map[string]string `json:"tags,omitempty"` SubnetsToZones map[string][]string `json:"subnets-to-zones,omitempty"` ImageMetadata []CloudImageMetadata `json:"image-metadata,omitempty"` EndpointBindings map[string]string `json:"endpoint-bindings,omitempty"` ControllerConfig map[string]interface{} `json:"controller-config,omitempty"` }
ProvisioningInfo holds machine provisioning info.
type ProvisioningInfoResult ¶
type ProvisioningInfoResult struct { Error *Error `json:"error,omitempty"` Result *ProvisioningInfo `json:"result"` }
ProvisioningInfoResult holds machine provisioning info or an error.
type ProvisioningInfoResults ¶
type ProvisioningInfoResults struct {
Results []ProvisioningInfoResult `json:"results"`
}
ProvisioningInfoResults holds multiple machine provisioning info results.
type ProvisioningScriptParams ¶
type ProvisioningScriptParams struct { MachineId string `json:"machine-id"` Nonce string `json:"nonce"` // DataDir may be "", in which case the default will be used. DataDir string `json:"data-dir"` // DisablePackageCommands may be set to disable all // package-related commands. It is then the responsibility of the // provisioner to ensure that all the packages required by Juju // are available. DisablePackageCommands bool `json:"disable-package-commands"` }
ProvisioningScriptParams contains the parameters for the ProvisioningScript client API call.
type ProvisioningScriptResult ¶
type ProvisioningScriptResult struct {
Script string `json:"script"`
}
ProvisioningScriptResult contains the result of the ProvisioningScript client API call.
type ProxyConfig ¶
type ProxyConfigResult ¶
type ProxyConfigResult struct { ProxySettings ProxyConfig `json:"proxy-settings"` APTProxySettings ProxyConfig `json:"apt-proxy-settings"` Error *Error `json:"error,omitempty"` }
ProxyConfigResult contains information needed to configure a clients proxy settings
type ProxyConfigResults ¶
type ProxyConfigResults struct {
Results []ProxyConfigResult `json:"results"`
}
ProxyConfigResults contains information needed to configure multiple clients proxy settings
type PubSubMessage ¶
PubSubMessage is used to propagate pubsub messages from one api server to the others.
type PublicAddress ¶
type PublicAddress struct {
Target string `json:"target"`
}
PublicAddress holds parameters for the PublicAddress call.
type PublicAddressResults ¶
type PublicAddressResults struct {
PublicAddress string `json:"public-address"`
}
PublicAddressResults holds results of the PublicAddress call.
type ReauthRequest ¶
ReauthRequest holds a challenge/response token meaningful to the identity provider.
type RebootAction ¶
type RebootAction string
RebootAction defines the action a machine should take when a hook needs to reboot
const ( // ShouldDoNothing instructs a machine agent that no action // is required on its part ShouldDoNothing RebootAction = "noop" // ShouldReboot instructs a machine to reboot // this happens when a hook running on a machine, requests // a reboot ShouldReboot RebootAction = "reboot" // ShouldShutdown instructs a machine to shut down. This usually // happens when running inside a container, and a hook on the parent // machine requests a reboot ShouldShutdown RebootAction = "shutdown" )
type RebootActionResult ¶
type RebootActionResult struct { Result RebootAction `json:"result,omitempty"` Error *Error `json:"error,omitempty"` }
RebootActionResult holds the result of a single call to machine.ShouldRebootOrShutdown.
type RebootActionResults ¶
type RebootActionResults struct {
Results []RebootActionResult `json:"results,omitempty"`
}
RebootActionResults holds a list of RebootActionResult and any error.
type RedirectInfoResult ¶
type RedirectInfoResult struct { // Servers holds an entry for each server that holds the // addresses for the server. Servers [][]HostPort `json:"servers"` // CACert holds the CA certificate for the server. // TODO(rogpeppe) allow this to be empty if the // server has a globally trusted certificate? CACert string `json:"ca-cert"` }
RedirectInfoResult holds the result of a RedirectInfo call.
type RegionDefaults ¶
type RegionDefaults struct { RegionName string `json:"region-name"` Value interface{} `json:"value"` }
RegionDefaults contains the settings for regions in a ModelDefaults.
type RegisterRemoteRelation ¶
type RegisterRemoteRelation struct { // ApplicationId is the application id on the remote model. ApplicationId RemoteEntityId `json:"application-id"` // RelationId is the relation id on the remote model. RelationId RemoteEntityId `json:"relation-id"` // RemoteEndpoint contains info about the endpoint in the remote model. RemoteEndpoint RemoteEndpoint `json:"remote-endpoint"` // OfferName is the name of the application offer from the local model. OfferName string `json:"offer-name"` // LocalEndpointName is the name of the endpoint in the local model. LocalEndpointName string `json:"local-endpoint-name"` }
RegisterRemoteRelation holds attributes used to register a remote relation.
type RegisterRemoteRelations ¶
type RegisterRemoteRelations struct {
Relations []RegisterRemoteRelation `json:"relations"`
}
RegisterRemoteRelations holds args used to add remote relations.
type RelationIds ¶
type RelationIds struct {
RelationIds []int `json:"relation-ids"`
}
RelationIds holds multiple relation ids.
type RelationResult ¶
type RelationResult struct { Error *Error `json:"error,omitempty"` Life Life `json:"life"` Id int `json:"id"` Key string `json:"key"` Endpoint multiwatcher.Endpoint `json:"endpoint"` }
RelationResult returns information about a single relation, or an error.
type RelationResults ¶
type RelationResults struct {
Results []RelationResult `json:"results"`
}
RelationResults holds the result of an API call that returns information about multiple relations.
type RelationStatus ¶
type RelationStatus struct { Id int `json:"id"` Key string `json:"key"` Interface string `json:"interface"` Scope string `json:"scope"` Endpoints []EndpointStatus `json:"endpoints"` }
RelationStatus holds status info about a relation.
type RelationUnit ¶
RelationUnit holds a relation and a unit tag.
type RelationUnitPair ¶
type RelationUnitPair struct { Relation string `json:"relation"` LocalUnit string `json:"local-unit"` RemoteUnit string `json:"remote-unit"` }
RelationUnitPair holds a relation tag, a local and remote unit tags.
type RelationUnitPairs ¶
type RelationUnitPairs struct {
RelationUnitPairs []RelationUnitPair `json:"relation-unit-pairs"`
}
RelationUnitPairs holds the parameters for API calls expecting multiple sets of a relation tag, a local and remote unit tags.
type RelationUnitSettings ¶
type RelationUnitSettings struct { Relation string `json:"relation"` Unit string `json:"unit"` Settings Settings `json:"settings"` }
RelationUnitSettings holds a relation tag, a unit tag and local unit settings.
type RelationUnits ¶
type RelationUnits struct {
RelationUnits []RelationUnit `json:"relation-units"`
}
RelationUnits holds the parameters for API calls expecting a pair of relation and unit tags.
type RelationUnitsChange ¶
type RelationUnitsChange struct { // Changed holds a set of units that are known to be in scope, and the // latest known settings version for each. Changed map[string]UnitSettings `json:"changed"` // Departed holds a set of units that have previously been reported to // be in scope, but which no longer are. Departed []string `json:"departed,omitempty"` }
RelationUnitsChange describes the membership and settings of; or changes to; some relation scope.
type RelationUnitsSettings ¶
type RelationUnitsSettings struct {
RelationUnits []RelationUnitSettings `json:"relation-units"`
}
RelationUnitsSettings holds the arguments for making a EnterScope or WriteSettings API calls.
type RelationUnitsWatchResult ¶
type RelationUnitsWatchResult struct { RelationUnitsWatcherId string `json:"watcher-id"` Changes RelationUnitsChange `json:"changes"` Error *Error `json:"error,omitempty"` }
RelationUnitsWatchResult holds a RelationUnitsWatcher id, baseline state (in the Changes field), and an error (if any).
type RelationUnitsWatchResults ¶
type RelationUnitsWatchResults struct {
Results []RelationUnitsWatchResult `json:"results"`
}
RelationUnitsWatchResults holds the results for any API call which ends up returning a list of RelationUnitsWatchers.
type ReleaseLeadershipBulkParams ¶
type ReleaseLeadershipBulkParams struct {
Params []ReleaseLeadershipParams `json:"params"`
}
ReleaseLeadershipBulkParams is a collection of parameters needed to make a bulk release leadership call.
type ReleaseLeadershipBulkResults ¶
type ReleaseLeadershipBulkResults ErrorResults
ReleaseLeadershipBulkResults is a type which contains results from a bulk leadership call.
type ReleaseLeadershipParams ¶
type ReleaseLeadershipParams struct { // ApplicationTag is the application for which you want to make a // leadership claim. ApplicationTag string `json:"application-tag"` // UnitTag is the unit which is making the leadership claim. UnitTag string `json:"unit-tag"` }
ReleaseLeadershipParams are the parameters needed to release a leadership claim.
type RemoteApplication ¶
type RemoteApplication struct { // Name is the name of the application. Name string `json:"name"` // OfferName is the name of the application on the offering side. OfferName string `json:"offer-name"` // Life is the current lifecycle state of the application. Life Life `json:"life"` // Status is the current status of the application. Status string `json:"status"` // ModelUUID is the UUId of the model hosting the application. ModelUUID string `json:"model-uuid"` // IsConsumerProxy returns the application is created // from a registration operation by a consuming model. Registered bool `json:"registered"` }
RemoteApplication describes the current state of an application involved in a cross- model relation, from the perspective of the local environment.
type RemoteApplicationChange ¶
type RemoteApplicationChange struct { // ApplicationTag is the tag of the application. ApplicationTag string `json:"application-tag"` // Life is the current lifecycle state of the application. Life Life `json:"life"` }
RemoteApplicationChange describes changes to an application.
type RemoteApplicationChanges ¶
type RemoteApplicationChanges struct {
Changes []RemoteApplicationChange `json:"changes,omitempty"`
}
RemoteApplicationChanges describes a set of changes to remote applications.
type RemoteApplicationInfo ¶
type RemoteApplicationInfo struct { ModelTag string `json:"model-tag"` Name string `json:"name"` Description string `json:"description"` ApplicationURL string `json:"application-url"` // SourceModelLabel is only populated if the application // originates from another model on the same controller // rather than via an offer URL. SourceModelLabel string `json:"source-model-label,omitempty"` Endpoints []RemoteEndpoint `json:"endpoints"` // IconURLPath is relative to the model api endpoint IconURLPath string `json:"icon-url-path"` }
RemoteApplicationInfo has attributes for a remote application.
type RemoteApplicationInfoResult ¶
type RemoteApplicationInfoResult struct { Result *RemoteApplicationInfo `json:"result,omitempty"` Error *Error `json:"error,omitempty"` }
RemoteApplicationInfoResult holds the result of loading remote application info at a URL.
type RemoteApplicationInfoResults ¶
type RemoteApplicationInfoResults struct {
Results []RemoteApplicationInfoResult `json:"results"`
}
RemoteApplicationInfoResults represents the result of a RemoteApplicationInfo call.
type RemoteApplicationResult ¶
type RemoteApplicationResult struct { Result *RemoteApplication `json:"result,omitempty"` Error *Error `json:"error,omitempty"` }
RemoteApplicationResult holds a remote application and an error.
type RemoteApplicationResults ¶
type RemoteApplicationResults struct {
Results []RemoteApplicationResult `json:"results,omitempty"`
}
RemoteApplicationResults holds a set of remote application results.
type RemoteApplicationStatus ¶
type RemoteApplicationStatus struct { Err error `json:"err,omitempty"` ApplicationURL string `json:"application-url"` ApplicationName string `json:"application-name"` Endpoints []RemoteEndpoint `json:"endpoints"` Life string `json:"life"` Relations map[string][]string `json:"relations"` Status DetailedStatus `json:"status"` }
RemoteApplicationStatus holds status info about a remote application.
type RemoteApplicationWatchResult ¶
type RemoteApplicationWatchResult struct { RemoteApplicationWatcherId string `json:"id"` Change *RemoteApplicationChange `json:"change,omitempty"` Error *Error `json:"error,omitempty"` }
RemoteApplicationWatchResult holds a RemoteApplicationWatcher id, changes and an error (if any).
type RemoteApplicationWatchResults ¶
type RemoteApplicationWatchResults struct {
Results []RemoteApplicationWatchResult `json:"results,omitempty"`
}
RemoteApplicationWatchResults holds the results for any API call which ends up returning a list of RemoteServiceWatchers.
type RemoteEndpoint ¶
type RemoteEndpoint struct { Name string `json:"name"` Role charm.RelationRole `json:"role"` Interface string `json:"interface"` Limit int `json:"limit"` Scope charm.RelationScope `json:"scope"` }
RemoteEndpoint represents a remote application endpoint.
type RemoteEntities ¶
type RemoteEntities struct {
Entities []RemoteEntityId `json:"remote-entities"`
}
RemoteEntities identifies multiple remote entities.
type RemoteEntityArg ¶
type RemoteEntityArg struct { // ModelTag is the tag of the model hosting the entity. ModelTag string `json:"model-tag"` // Tag is the tag of the entity. Tag string `json:"tag"` // Token is the token of the entity. Token string `json:"token,omitempty"` }
RemoteEntityArg holds the model, entity and token to be operated on.
type RemoteEntityArgs ¶
type RemoteEntityArgs struct {
Args []RemoteEntityArg
}
RemoteEntityArgs holds the arguments to an API call dealing with remote entities.
type RemoteEntityId ¶
RemoteEntityId is an identifier for an entity that may be involved in a cross-model relation. This object comprises the UUID of the model to which the entity belongs, and an opaque token that is unique to that model.
type RemoteEntityIdResult ¶
type RemoteEntityIdResult struct { Result *RemoteEntityId `json:"result,omitempty"` Error *Error `json:"error,omitempty"` }
RemoteEntityIdResult holds a remote entity id and an error.
type RemoteEntityIdResults ¶
type RemoteEntityIdResults struct {
Results []RemoteEntityIdResult `json:"results,omitempty"`
}
RemoteEntityIdResults has a set of remote entity id results.
type RemoteRelation ¶
type RemoteRelation struct { Life Life `json:"life"` Id int `json:"id"` Key string `json:"key"` ApplicationName string `json:"application-name"` Endpoint RemoteEndpoint `json:"endpoint"` RemoteEndpointName string `json:"remote-endpoint-name"` SourceModelUUID string `json:"source-model-uuid"` }
RemoteRelation describes the current state of a cross-model relation from the perspective of the local model.
type RemoteRelationChangeEvent ¶
type RemoteRelationChangeEvent struct { // RelationId is the remote id of the relation. RelationId RemoteEntityId `json:"relation-id"` // Life is the current lifecycle state of the relation. Life Life `json:"life"` // ApplicationId is the application id on the remote model. ApplicationId RemoteEntityId `json:"application-id"` // ChangedUnits maps unit tokens to relation unit changes. ChangedUnits []RemoteRelationUnitChange `json:"changed-units,omitempty"` // DepartedUnits contains the ids of units that have departed // the relation since the last change. DepartedUnits []int `json:"departed-units,omitempty"` }
RemoteRelationChangeEvent is pushed to the remote model to communicate changes to relation units from the local model.
type RemoteRelationResult ¶
type RemoteRelationResult struct { Error *Error `json:"error,omitempty"` Result *RemoteRelation `json:"result,omitempty"` }
RemoteRelationResult holds a remote relation and an error.
type RemoteRelationResults ¶
type RemoteRelationResults struct {
Results []RemoteRelationResult `json:"results"`
}
RemoteRelationResults holds the result of an API call that returns information about multiple remote relations.
type RemoteRelationUnitChange ¶
type RemoteRelationUnitChange struct { // UnitId uniquely identifies the remote unit. UnitId int `json:"unit-id"` // Settings is the current settings for the relation unit. Settings map[string]interface{} `json:"settings,omitempty"` }
RemoteRelationUnitChange describes a relation unit change which has occurred in a remote model.
type RemoteRelationsChanges ¶
type RemoteRelationsChanges struct {
Changes []RemoteRelationChangeEvent `json:"changes,omitempty"`
}
RemoteRelationsChanges holds a set of RemoteRelationsChange structures.
type RemoveBlocksArgs ¶
type RemoveBlocksArgs struct {
All bool `json:"all"`
}
RemoveBlocksArgs holds the arguments for the RemoveBlocks command. It is a struct to facilitate the easy addition of being able to remove blocks for individual models at a later date.
type ResolveCharmResult ¶
type ResolveCharmResult struct { // URL is a string representation of charm.URL. URL string `json:"url,omitempty"` Error string `json:"error,omitempty"` }
ResolveCharmResult holds the result of resolving a charm reference to a URL, or any error that occurred.
type ResolveCharmResults ¶
type ResolveCharmResults struct {
URLs []ResolveCharmResult `json:"urls"`
}
ResolveCharmResults holds results of the ResolveCharms call.
type ResolveCharms ¶
type ResolveCharms struct {
References []string `json:"references"`
}
ResolveCharms stores charm references for a ResolveCharms call.
type ResolvedMode ¶
type ResolvedMode string
ResolvedMode describes the way state transition errors are resolved.
const ( ResolvedNone ResolvedMode = "" ResolvedRetryHooks ResolvedMode = "retry-hooks" ResolvedNoHooks ResolvedMode = "no-hooks" )
type ResolvedModeResult ¶
type ResolvedModeResult struct { Error *Error `json:"error,omitempty"` Mode ResolvedMode `json:"mode"` }
ResolvedModeResult holds a resolved mode or an error.
type ResolvedModeResults ¶
type ResolvedModeResults struct {
Results []ResolvedModeResult `json:"results"`
}
ResolvedModeResults holds the bulk operation result of an API call that returns a resolved mode or an error.
type ResolvedResults ¶
type ResolvedResults struct { Application string `json:"application"` Charm string `json:"charm"` Settings map[string]interface{} `json:"settings"` }
ResolvedResults holds results of the Resolved call.
type Resource ¶
type Resource struct { CharmResource // ID uniquely identifies a resource-application pair within the model. // Note that the model ignores pending resources (those with a // pending ID) except for in a few clearly pending-related places. ID string `json:"id"` // PendingID identifies that this resource is pending and // distinguishes it from other pending resources with the same model // ID (and from the active resource). PendingID string `json:"pending-id"` // ApplicationID identifies the application for the resource. ApplicationID string `json:"application"` // Username is the ID of the user that added the revision // to the model (whether implicitly or explicitly). Username string `json:"username"` // Timestamp indicates when the resource was added to the model. Timestamp time.Time `json:"timestamp"` }
Resource contains info about a Resource.
type ResourceUploadResult ¶
type ResourceUploadResult struct { // Error will contain details about a failed upload attempt. Error *Error `json:"error,omitempty"` // ID uniquely identifies a resource-application pair within the model. ID string `json:"id"` // Timestamp indicates when the resource was added to the model. Timestamp time.Time `json:"timestamp"` }
ResourceUploadResult is used to return some details about an uploaded resource.
type ResourcesResult ¶
type ResourcesResult struct { ErrorResult // Resources is the list of resources for the application. Resources []Resource `json:"resources"` // CharmStoreResources is the list of resources associated with the charm in // the charmstore. CharmStoreResources []CharmResource `json:"charm-store-resources"` // UnitResources contains a list of the resources for each unit in the // application. UnitResources []UnitResources `json:"unit-resources"` }
ResourcesResult holds the resources that result from an API call for a single application.
type ResourcesResults ¶
type ResourcesResults struct { // Results is the list of resource results. Results []ResourcesResult `json:"results"` }
ResourcesResults holds the resources that result from a bulk API call.
type RestoreArgs ¶
type RestoreArgs struct { // BackupId holds the id of the backup in server if any BackupId string `json:"backup-id"` }
RestoreArgs Holds the backup file or id
type ResumeReplicationParams ¶
type ResumeReplicationParams struct {
Members []replicaset.Member `json:"members"`
}
ResumeReplicationParams holds the members of a HA that must be resumed.
type RetryStrategy ¶
type RetryStrategy struct { ShouldRetry bool `json:"should-retry"` MinRetryTime time.Duration `json:"min-retry-time"` MaxRetryTime time.Duration `json:"max-retry-time"` JitterRetryTime bool `json:"jitter-retry-time"` RetryTimeFactor int64 `json:"retry-time-factor"` }
RetryStrategy holds the necessary information to configure retries.
type RetryStrategyResult ¶
type RetryStrategyResult struct { Error *Error `json:"error,omitempty"` Result *RetryStrategy `json:"result,omitempty"` }
RetryStrategyResult holds a RetryStrategy or an error.
type RetryStrategyResults ¶
type RetryStrategyResults struct {
Results []RetryStrategyResult `json:"results"`
}
RetryStrategyResults holds the bulk operation result of an API call that returns a RetryStrategy or an error.
type RunParams ¶
type RunParams struct { Commands string `json:"commands"` Timeout time.Duration `json:"timeout"` Machines []string `json:"machines,omitempty"` Applications []string `json:"applications,omitempty"` Units []string `json:"units,omitempty"` }
RunParams is used to provide the parameters to the Run method. Commands and Timeout are expected to have values, and one or more values should be in the Machines, Applications, or Units slices.
type RunResult ¶
type RunResult struct { Code int `json:"code-id"` Stdout []byte `json:"stdout,omitempty"` Stderr []byte `json:"stderr,omitempty"` // FIXME: should be tags not id strings MachineId string `json:"machine-id"` UnitId string `json:"unit-id"` Error string `json:"error"` }
RunResult contains the result from an individual run call on a machine. UnitId is populated if the command was run inside the unit context.
type RunResults ¶
type RunResults struct {
Results []RunResult `json:"results"`
}
RunResults is used to return the slice of results. API server side calls need to return single structure values.
type SSHAddressResult ¶
type SSHAddressResult struct { Error *Error `json:"error,omitempty"` Address string `json:"address,omitempty"` }
SSHAddressResult defines a single SSH address result (see SSHAddressResults).
type SSHAddressResults ¶
type SSHAddressResults struct {
Results []SSHAddressResult `json:"results"`
}
SSHAddressResults defines the response from various APIs on the SSHClient facade.
type SSHAddressesResult ¶
type SSHAddressesResult struct { Error *Error `json:"error,omitempty"` Addresses []string `json:"addresses"` }
SSHAddressesResult defines a single result with multiple addresses (see SSHAddressesResults).
type SSHAddressesResults ¶
type SSHAddressesResults struct {
Results []SSHAddressesResult `json:"results"`
}
SSHAddressesResults defines the response from AllAddresses on the SSHClient API facade.
type SSHHostKeySet ¶
type SSHHostKeySet struct {
EntityKeys []SSHHostKeys `json:"entity-keys"`
}
SSHHostKeySet defines SSH host keys for one or more entities (typically machines).
type SSHHostKeys ¶
SSHHostKeys defines the SSH host keys for one entity.
type SSHProxyResult ¶
type SSHProxyResult struct {
UseProxy bool `json:"use-proxy"`
}
SSHProxyResult defines the response from the SSHClient.Proxy API.
type SSHPublicKeysResult ¶
type SSHPublicKeysResult struct { Error *Error `json:"error,omitempty"` PublicKeys []string `json:"public-keys,omitempty"` }
SSHPublicKeysResult is used to return the SSH public host keys for one SSH target (see SSHPublicKeysResults).
type SSHPublicKeysResults ¶
type SSHPublicKeysResults struct {
Results []SSHPublicKeysResult `json:"results"`
}
SSHPublicKeysResults is used to return SSH public host keys for one or more target for the SSHClient.PublicKeys API.
type SecretKeyLoginRequest ¶
type SecretKeyLoginRequest struct { // User is the tag-representation of the user that the // requester wishes to authenticate as. User string `json:"user"` // Nonce is the nonce used by the client to encrypt // and authenticate PayloadCiphertext. Nonce []byte `json:"nonce"` // PayloadCiphertext is the encrypted and authenticated // payload. The payload is encrypted/authenticated using // NaCl Secretbox. PayloadCiphertext []byte `json:"cipher-text"` }
SecretKeyLoginRequest contains the parameters for completing the registration of a user. The request contains the tag of the user, and an encrypted and authenticated payload that proves that the requester has a secret key recorded on the controller.
type SecretKeyLoginRequestPayload ¶
type SecretKeyLoginRequestPayload struct { // Password is the new password to set for the user. Password string `json:"password"` }
SecretKeyLoginRequestPayload is JSON-encoded and then encrypted and authenticated with the NaCl Secretbox algorithm.
type SecretKeyLoginResponse ¶
type SecretKeyLoginResponse struct { // Nonce is the nonce used by the server to encrypt and // authenticate PayloadCiphertext. Nonce []byte `json:"nonce"` // PayloadCiphertext is the encrypted and authenticated // payload, which is a JSON-encoded SecretKeyLoginResponsePayload. PayloadCiphertext []byte `json:"cipher-text"` }
SecretKeyLoginResponse contains the result of completing a user registration. This contains an encrypted and authenticated payload, containing the information necessary to securely log into the controller via the standard password authentication method.
type SecretKeyLoginResponsePayload ¶
type SecretKeyLoginResponsePayload struct { // CACert is the CA certificate, required to establish a secure // TLS connection to the Juju controller CACert string `json:"ca-cert"` // ControllerUUID is the UUID of the Juju controller. ControllerUUID string `json:"controller-uuid"` }
SecretKeyLoginResponsePayload is JSON-encoded and then encrypted and authenticated with the NaCl Secretbox algorithm.
type SerializedModel ¶
type SerializedModel struct { Bytes []byte `json:"bytes"` Charms []string `json:"charms"` Tools []SerializedModelTools `json:"tools"` Resources []SerializedModelResource `json:"resources"` }
SerializedModel wraps a buffer contain a serialised Juju model. It also contains lists of the charms and tools used in the model.
type SerializedModelResource ¶
type SerializedModelResource struct { Application string `json:"application"` Name string `json:"name"` ApplicationRevision SerializedModelResourceRevision `json:"application-revision"` CharmStoreRevision SerializedModelResourceRevision `json:"charmstore-revision"` UnitRevisions map[string]SerializedModelResourceRevision `json:"unit-revisions"` }
SerializedModelResource holds the details for a single resource for an application in a serialized model.
type SerializedModelResourceRevision ¶
type SerializedModelResourceRevision struct { Revision int `json:"revision"` Type string `json:"type"` Path string `json:"path"` Description string `json:"description"` Origin string `json:"origin"` FingerprintHex string `json:"fingerprint"` Size int64 `json:"size"` Timestamp time.Time `json:"timestamp"` Username string `json:"username,omitempty"` }
SerializedModelResourceRevision holds the details for a single resource revision for an application in a serialized model.
type SerializedModelTools ¶
type SerializedModelTools struct { Version string `json:"version"` // URI holds the URI were a client can download the tools // (e.g. "/tools/1.2.3-xenial-amd64"). It will need to prefixed // with the API server scheme, address and model prefix before it // can be used. URI string `json:"uri"` }
SerializedModelTools holds the version and URI for a given tools version.
type SetAnnotations ¶
SetAnnotations stores parameters for making the SetAnnotations call.
type SetConstraints ¶
type SetConstraints struct { ApplicationName string `json:"application"` //optional, if empty, model constraints are set. Constraints constraints.Value `json:"constraints"` }
SetConstraints stores parameters for making the SetConstraints call.
type SetMachineBlockDevices ¶
type SetMachineBlockDevices struct {
MachineBlockDevices []MachineBlockDevices `json:"machine-block-devices"`
}
SetMachineBlockDevices holds the arguments for recording the block devices present on a set of machines.
type SetMachineNetworkConfig ¶
type SetMachineNetworkConfig struct { Tag string `json:"tag"` Config []NetworkConfig `json:"config"` }
SetMachineNetworkConfig holds the parameters for making an API call to update machine network config.
type SetMachinesAddresses ¶
type SetMachinesAddresses struct {
MachineAddresses []MachineAddresses `json:"machine-addresses"`
}
SetMachinesAddresses holds the parameters for making an API call to update machine addresses.
type SetMigrationPhaseArgs ¶
type SetMigrationPhaseArgs struct {
Phase string `json:"phase"`
}
SetMigrationPhaseArgs provides a migration phase to the migrationmaster.SetPhase API method.
type SetMigrationStatusMessageArgs ¶
type SetMigrationStatusMessageArgs struct {
Message string `json:"message"`
}
SetMigrationStatusMessageArgs provides a migration status message to the migrationmaster.SetStatusMessage API method.
type SetModelAgentVersion ¶
SetModelAgentVersion contains the arguments for SetModelAgentVersion client API call.
type SetModelDefaults ¶
type SetModelDefaults struct {
Config []ModelDefaultValues `json:"config"`
}
SetModelDefaults contains the arguments for SetModelDefaults client API call.
type SetPayloadStatusArg ¶
type SetPayloadStatusArg struct { Entity // Status is the new status of the payload. Status string `json:"status"` }
SetPayloadStatusArg are the arguments for a single call to the SetStatus endpoint.
type SetPayloadStatusArgs ¶
type SetPayloadStatusArgs struct { // Args is the list of arguments to pass to this function. Args []SetPayloadStatusArg `json:"args"` }
SetPayloadStatusArgs are the arguments for the PayloadsHookContext.SetStatus endpoint.
type SetStatus ¶
type SetStatus struct {
Entities []EntityStatusArgs `json:"entities"`
}
SetStatus holds the parameters for making a SetStatus/UpdateStatus call.
type SettingsResult ¶
type SettingsResult struct { Error *Error `json:"error,omitempty"` Settings Settings `json:"settings"` }
SettingsResult holds a relation settings map or an error.
type SettingsResults ¶
type SettingsResults struct {
Results []SettingsResult `json:"results"`
}
SettingsResults holds the result of an API calls that returns settings for multiple relations.
type SingularClaim ¶
type SingularClaim struct { ModelTag string `json:"model-tag"` ControllerTag string `json:"controller-tag"` Duration time.Duration `json:"duration"` }
SingularClaim represents a request for exclusive model administration access on the part of some controller.
type SingularClaims ¶
type SingularClaims struct {
Claims []SingularClaim `json:"claims"`
}
SingularClaims holds any number of SingularClaim~s.
type Space ¶
type Space struct { Name string `json:"name"` Subnets []Subnet `json:"subnets"` Error *Error `json:"error,omitempty"` }
Space holds the information about a single space and its associated subnets.
type SpaceResult ¶
SpaceResult holds a single space tag or an error.
type SpaceResults ¶
type SpaceResults struct {
Results []SpaceResult `json:"results"`
}
SpaceResults holds the bulk operation result of an API call that returns space tags or an errors.
type StateServingInfo ¶
type StateServingInfo struct { APIPort int `json:"api-port"` StatePort int `json:"state-port"` // The controller cert and corresponding private key. Cert string `json:"cert"` PrivateKey string `json:"private-key"` // The private key for the CA cert so that a new controller // cert can be generated when needed. CAPrivateKey string `json:"ca-private-key"` // this will be passed as the KeyFile argument to MongoDB SystemIdentity string `json:"system-identity"` }
StateServingInfo holds information needed by a state server.
type StatusHistoryFilter ¶
type StatusHistoryFilter struct { Size int `json:"size"` Date *time.Time `json:"date"` Delta *time.Duration `json:"delta"` Exclude []string `json:"exclude"` }
StatusHistoryFilter holds arguments that can be use to filter a status history backlog.
type StatusHistoryPruneArgs ¶
type StatusHistoryPruneArgs struct { MaxHistoryTime time.Duration `json:"max-history-time"` MaxHistoryMB int `json:"max-history-mb"` }
StatusHistoryPruneArgs holds arguments for status history prunning process.
type StatusHistoryRequest ¶
type StatusHistoryRequest struct { Kind string `json:"historyKind"` Size int `json:"size"` Filter StatusHistoryFilter `json:"filter"` Tag string `json:"tag"` }
StatusHistoryRequest holds the parameters to filter a status history query.
type StatusHistoryRequests ¶
type StatusHistoryRequests struct {
Requests []StatusHistoryRequest `json:"requests"`
}
StatusHistoryRequests holds a slice of StatusHistoryArgs.
type StatusHistoryResult ¶
type StatusHistoryResult struct { History History `json:"history"` Error *Error `json:"error,omitempty"` }
StatusHistoryResult holds a slice of statuses.
type StatusHistoryResults ¶
type StatusHistoryResults struct {
Results []StatusHistoryResult `json:"results"`
}
StatusHistoryResults holds a slice of StatusHistoryResult.
type StatusParams ¶
type StatusParams struct {
Patterns []string `json:"patterns"`
}
StatusParams holds parameters for the Status call.
type StatusResult ¶
type StatusResult struct { Error *Error `json:"error,omitempty"` Id string `json:"id"` Life Life `json:"life"` Status string `json:"status"` Info string `json:"info"` Data map[string]interface{} `json:"data"` Since *time.Time `json:"since"` }
StatusResult holds an entity status, extra information, or an error.
type StatusResults ¶
type StatusResults struct {
Results []StatusResult `json:"results"`
}
StatusResults holds multiple status results.
type StorageAddParams ¶
type StorageAddParams struct { // UnitTag is unit name. UnitTag string `json:"unit"` // StorageName is the name of the storage as specified in the charm. StorageName string `json:"name"` // Constraints are specified storage constraints. Constraints StorageConstraints `json:"storage"` }
StorageAddParams holds storage details to add to a unit dynamically.
type StorageAttachment ¶
type StorageAttachment struct { StorageTag string `json:"storage-tag"` OwnerTag string `json:"owner-tag"` UnitTag string `json:"unit-tag"` Kind StorageKind `json:"kind"` Location string `json:"location"` Life Life `json:"life"` }
StorageAttachment describes a unit's attached storage instance.
type StorageAttachmentDetails ¶
type StorageAttachmentDetails struct { // StorageTag is the tag of the storage instance. StorageTag string `json:"storage-tag"` // UnitTag is the tag of the unit attached to the storage instance. UnitTag string `json:"unit-tag"` // MachineTag is the tag of the machine that the attached unit is assigned to. MachineTag string `json:"machine-tag"` // Location holds location (mount point/device path) of // the attached storage. Location string `json:"location,omitempty"` // Life contains the lifecycle state of the storage attachment. // Juju controllers older than 2.2 do not populate this // field, so it may be omitted. Life Life `json:"life,omitempty"` }
StorageAttachmentDetails holds detailed information about a storage attachment.
type StorageAttachmentId ¶
type StorageAttachmentId struct { StorageTag string `json:"storage-tag"` UnitTag string `json:"unit-tag"` }
StorageAttachmentId identifies a storage attachment by the tags of the related unit and storage instance.
type StorageAttachmentIds ¶
type StorageAttachmentIds struct {
Ids []StorageAttachmentId `json:"ids"`
}
StorageAttachmentIds holds a set of storage attachment identifiers.
type StorageAttachmentIdsResult ¶
type StorageAttachmentIdsResult struct { Result StorageAttachmentIds `json:"result"` Error *Error `json:"error,omitempty"` }
StorageAttachmentIdsResult holds the result of an API call to retrieve the IDs of a unit's attached storage instances.
type StorageAttachmentIdsResults ¶
type StorageAttachmentIdsResults struct {
Results []StorageAttachmentIdsResult `json:"results,omitempty"`
}
StorageAttachmentIdsResult holds the result of an API call to retrieve the IDs of multiple units attached storage instances.
type StorageAttachmentResult ¶
type StorageAttachmentResult struct { Result StorageAttachment `json:"result"` Error *Error `json:"error,omitempty"` }
StorageAttachmentResult holds the result of an API call to retrieve details of a storage attachment.
type StorageAttachmentResults ¶
type StorageAttachmentResults struct {
Results []StorageAttachmentResult `json:"results,omitempty"`
}
StorageAttachmentResults holds the result of an API call to retrieve details of multiple storage attachments.
type StorageAttachmentsResult ¶
type StorageAttachmentsResult struct { Result []StorageAttachment `json:"result"` Error *Error `json:"error,omitempty"` }
StorageAttachmentsResult holds the result of an API call to retrieve details of a unit's attached storage instances.
type StorageAttachmentsResults ¶
type StorageAttachmentsResults struct {
Results []StorageAttachmentsResult `json:"results,omitempty"`
}
StorageAttachmentsResults holds the result of an API call to retrieve details of multiple units' attached storage instances.
type StorageConstraints ¶
type StorageConstraints struct { // Pool is the name of the storage pool from which to provision the // storage instance. Pool string `json:"pool,omitempty"` // Size is the required size of the storage instance, in MiB. Size *uint64 `json:"size,omitempty"` // Count is the required number of storage instances. Count *uint64 `json:"count,omitempty"` }
StorageConstraints contains constraints for storage instance.
type StorageDetails ¶
type StorageDetails struct { // StorageTag holds tag for this storage. StorageTag string `json:"storage-tag"` // OwnerTag holds tag for the owner of this storage, unit or application. OwnerTag string `json:"owner-tag"` // Kind holds what kind of storage this instance is. Kind StorageKind `json:"kind"` // Status contains the status of the storage instance. Status EntityStatus `json:"status"` // Life contains the lifecycle state of the storage. // Juju controllers older than 2.2 do not populate this // field, so it may be omitted. Life Life `json:"life,omitempty"` // Persistent reports whether or not the underlying volume or // filesystem is persistent; i.e. whether or not it outlives // the machine that it is attached to. Persistent bool `json:"persistent"` // Attachments contains a mapping from unit tag to // storage attachment details. Attachments map[string]StorageAttachmentDetails `json:"attachments,omitempty"` }
StorageDetails holds information about storage.
type StorageDetailsListResult ¶
type StorageDetailsListResult struct { Result []StorageDetails `json:"result,omitempty"` Error *Error `json:"error,omitempty"` }
StorageDetailsListResult holds a collection of storage details.
type StorageDetailsListResults ¶
type StorageDetailsListResults struct {
Results []StorageDetailsListResult `json:"results,omitempty"`
}
StorageDetailsListResults holds a collection of collections of storage details.
type StorageDetailsResult ¶
type StorageDetailsResult struct { Result *StorageDetails `json:"result,omitempty"` Error *Error `json:"error,omitempty"` }
StorageDetailsResult holds information about a storage instance or error related to its retrieval.
type StorageDetailsResults ¶
type StorageDetailsResults struct {
Results []StorageDetailsResult `json:"results,omitempty"`
}
StorageDetailsResults holds results for storage details or related storage error.
type StorageFilter ¶
type StorageFilter struct { }
StorageFilter holds filter terms for listing storage details.
type StorageFilters ¶
type StorageFilters struct {
Filters []StorageFilter `json:"filters,omitempty"`
}
StorageFilters holds a set of storage filters.
type StorageInstance ¶
type StorageInstance struct { StorageTag string `json:"storage-tag"` OwnerTag string `json:"owner-tag"` Kind StorageKind `json:"kind"` }
StorageInstance describes a storage instance.
type StorageInstanceResult ¶
type StorageInstanceResult struct { Result StorageInstance `json:"result"` Error *Error `json:"error,omitempty"` }
StorageInstanceResult holds the result of an API call to retrieve details of a storage instance.
type StorageInstanceResults ¶
type StorageInstanceResults struct {
Results []StorageInstanceResult `json:"results,omitempty"`
}
StorageInstanceResults holds the result of an API call to retrieve details of multiple storage instances.
type StorageKind ¶
type StorageKind int
StorageKind is the kind of a storage instance.
const ( StorageKindUnknown StorageKind = iota StorageKindBlock StorageKindFilesystem )
func (*StorageKind) String ¶
func (k *StorageKind) String() string
String returns representation of StorageKind for readability.
type StoragePool ¶
type StoragePool struct { // Name is the pool's name. Name string `json:"name"` // Provider is the type of storage provider this pool represents, eg "loop", "ebs". Provider string `json:"provider"` // Attrs are the pool's configuration attributes. Attrs map[string]interface{} `json:"attrs"` }
StoragePool holds data for a pool instance.
type StoragePoolFilter ¶
type StoragePoolFilter struct { // Names are pool's names to filter on. Names []string `json:"names,omitempty"` // Providers are pool's storage provider types to filter on. Providers []string `json:"providers,omitempty"` }
StoragePoolFilter holds a filter for matching storage pools.
type StoragePoolFilters ¶
type StoragePoolFilters struct {
Filters []StoragePoolFilter `json:"filters,omitempty"`
}
StoragePoolFilters holds a collection of storage pool filters.
type StoragePoolsResult ¶
type StoragePoolsResult struct { Result []StoragePool `json:"storage-pools,omitempty"` Error *Error `json:"error,omitempty"` }
StoragePoolsResult holds a collection of storage pools.
type StoragePoolsResults ¶
type StoragePoolsResults struct {
Results []StoragePoolsResult `json:"results,omitempty"`
}
StoragePoolsResults holds a collection of storage pools results.
type StoragesAddParams ¶
type StoragesAddParams struct {
Storages []StorageAddParams `json:"storages"`
}
StoragesAddParams holds storage details to add to units dynamically.
type StringBoolResult ¶
type StringBoolResult struct { Error *Error `json:"error,omitempty"` Result string `json:"result"` Ok bool `json:"ok"` }
StringBoolResult holds the result of an API call that returns a string and a boolean.
type StringBoolResults ¶
type StringBoolResults struct {
Results []StringBoolResult `json:"results"`
}
StringBoolResults holds multiple results with a string and a bool each.
type StringResult ¶
StringResult holds a string or an error.
type StringResults ¶
type StringResults struct {
Results []StringResult `json:"results"`
}
StringResults holds the bulk operation result of an API call that returns a string or an error.
type StringsResult ¶
type StringsResult struct { Error *Error `json:"error,omitempty"` Result []string `json:"result,omitempty"` }
StringsResult holds the result of an API call that returns a slice of strings or an error.
type StringsResults ¶
type StringsResults struct {
Results []StringsResult `json:"results"`
}
StringsResults holds the bulk operation result of an API call that returns a slice of strings or an error.
type StringsWatchResult ¶
type StringsWatchResult struct { StringsWatcherId string `json:"watcher-id"` Changes []string `json:"changes,omitempty"` Error *Error `json:"error,omitempty"` }
StringsWatchResult holds a StringsWatcher id, changes and an error (if any).
type StringsWatchResults ¶
type StringsWatchResults struct {
Results []StringsWatchResult `json:"results"`
}
StringsWatchResults holds the results for any API call which ends up returning a list of StringsWatchers.
type Subnet ¶
type Subnet struct { // CIDR of the subnet in IPv4 or IPv6 notation. CIDR string `json:"cidr"` // ProviderId is the provider-specific subnet ID (if applicable). ProviderId string `json:"provider-id,omitempty"` // VLANTag needs to be between 1 and 4094 for VLANs and 0 for // normal networks. It's defined by IEEE 802.1Q standard. VLANTag int `json:"vlan-tag"` // Life is the subnet's life cycle value - Alive means the subnet // is in use by one or more machines, Dying or Dead means the // subnet is about to be removed. Life Life `json:"life"` // SpaceTag is the Juju network space this subnet is associated // with. SpaceTag string `json:"space-tag"` // Zones contain one or more availability zones this subnet is // associated with. Zones []string `json:"zones"` // Status returns the status of the subnet, whether it is in use, not // in use or terminating. Status string `json:"status,omitempty"` }
Subnet describes a single subnet within a network.
type SubnetsFilters ¶
type SubnetsFilters struct { SpaceTag string `json:"space-tag,omitempty"` Zone string `json:"zone,omitempty"` }
SubnetsFilters holds an optional SpaceTag and Zone for filtering the subnets returned by a ListSubnets call.
type ToolsResult ¶
type ToolsResult struct { ToolsList tools.List `json:"tools"` DisableSSLHostnameVerification bool `json:"disable-ssl-hostname-verification"` Error *Error `json:"error,omitempty"` }
ToolsResult holds the tools and possibly error for a given Tools() API call.
type ToolsResults ¶
type ToolsResults struct {
Results []ToolsResult `json:"results"`
}
ToolsResults is a list of tools for various requested agents.
type TrackPayloadArgs ¶
type TrackPayloadArgs struct { // Payloads is the list of Payloads to track Payloads []Payload `json:"payloads"` }
TrackPayloadArgs are the arguments for the PayloadsHookContext.Track endpoint.
type UndertakerModelInfo ¶
type UndertakerModelInfo struct { UUID string `json:"uuid"` Name string `json:"name"` GlobalName string `json:"global-name"` IsSystem bool `json:"is-system"` Life Life `json:"life"` }
UndertakerModelInfo returns information on an model needed by the undertaker worker.
type UndertakerModelInfoResult ¶
type UndertakerModelInfoResult struct { Error *Error `json:"error,omitempty"` Result UndertakerModelInfo `json:"result"` }
UndertakerModelInfoResult holds the result of an API call that returns an UndertakerModelInfoResult or an error.
type UnitNetworkConfig ¶
type UnitNetworkConfig struct { UnitTag string `json:"unit-tag"` BindingName string `json:"binding-name"` }
UnitNetworkConfig holds a unit tag and an endpoint binding name.
type UnitNetworkConfigResult ¶
type UnitNetworkConfigResult struct { Error *Error `json:"error,omitempty"` // Tagged to Info due to compatibility reasons. Config []NetworkConfig `json:"info"` }
UnitNetworkConfigResult holds network configuration for a single unit.
type UnitNetworkConfigResults ¶
type UnitNetworkConfigResults struct {
Results []UnitNetworkConfigResult `json:"results"`
}
UnitNetworkConfigResults holds network configuration for multiple units.
type UnitResourceResult ¶
type UnitResourceResult struct { ErrorResult // Resource is the info for the requested resource. Resource Resource `json:"resource"` }
UnitResourceResult is the result for a single requested resource.
type UnitResources ¶
type UnitResources struct { Entity // Resources is a list of resources for the unit. Resources []Resource `json:"resources"` // DownloadProgress indicates the number of bytes of a resource file // have been downloaded so far the uniter. Only currently downloading // resources are included. DownloadProgress map[string]int64 `json:"download-progress"` }
A UnitResources contains a list of the resources the unit defined by Entity.
type UnitResourcesResult ¶
type UnitResourcesResult struct { ErrorResult // Resources is the list of results for the requested resources, // in the same order as requested. Resources []UnitResourceResult `json:"resources"` }
UnitResourcesResult holds the resource info for a list of requested resources.
type UnitSettings ¶
type UnitSettings struct {
Version int64 `json:"version"`
}
UnitSettings specifies the version of some unit's settings in some relation.
type UnitStatus ¶
type UnitStatus struct { // AgentStatus holds the status for a unit's agent. AgentStatus DetailedStatus `json:"agent-status"` // WorkloadStatus holds the status for a unit's workload. WorkloadStatus DetailedStatus `json:"workload-status"` WorkloadVersion string `json:"workload-version"` Machine string `json:"machine"` OpenedPorts []string `json:"opened-ports"` PublicAddress string `json:"public-address"` Charm string `json:"charm"` Subordinates map[string]UnitStatus `json:"subordinates"` Leader bool `json:"leader,omitempty"` }
UnitStatus holds status info about a unit.
type UnitsNetworkConfig ¶
type UnitsNetworkConfig struct {
Args []UnitNetworkConfig `json:"args"`
}
UnitsNetworkConfig holds the parameters for calling Uniter.NetworkConfig() API.
type UnsetModelDefaults ¶
type UnsetModelDefaults struct {
Keys []ModelUnsetKeys `json:"keys"`
}
UnsetModelDefaults contains the arguments for UnsetModelDefaults client API call.
type UpdateBehavior ¶
type UpdateBehavior struct { EnableOSRefreshUpdate bool `json:"enable-os-refresh-update"` EnableOSUpgrade bool `json:"enable-os-upgrade"` }
UpdateBehavior contains settings that are duplicated in several places. Let's just embed this instead.
type UpdateCloudCredential ¶
type UpdateCloudCredential struct { Tag string `json:"tag"` Credential CloudCredential `json:"credential"` }
UpdateCloudCredential contains a cloud credential and its tag, for updating in state.
type UpdateCloudCredentials ¶
type UpdateCloudCredentials struct {
Credentials []UpdateCloudCredential `json:"credentials,omitempty"`
}
UpdateCloudCredentials contains a set of tagged cloud credentials.
type UpgradeMongoParams ¶
type UpgradeMongoParams struct {
Target MongoVersion `json:"target"`
}
UpgradeMongoParams holds the arguments required to enter upgrade mongo mode.
type UploadResult ¶
type UploadResult struct { ErrorResult // Resource describes the resource that was stored in the model. Resource Resource `json:"resource"` }
UploadResult is the response from an upload request.
type UserAccess ¶
UserAccess holds the level of access a user has on a controller or model.
type UserAccessPermission ¶
type UserAccessPermission string
UserAccessPermission is the type of permission that a user has to access a model.
const ( ModelAdminAccess UserAccessPermission = "admin" ModelReadAccess UserAccessPermission = "read" ModelWriteAccess UserAccessPermission = "write" )
Model access permissions that may be set on a user.
type UserAccessResult ¶
type UserAccessResult struct { Result *UserAccess `json:"result,omitempty"` Error *Error `json:"error,omitempty"` }
UserAccessResult holds an access level for a user, or an error.
type UserAccessResults ¶
type UserAccessResults struct {
Results []UserAccessResult `json:"results,omitempty"`
}
UserAccessResults holds the results of an api call to look up access for users.
type UserCloud ¶
UserCloud contains a user/cloud tag pair, typically used for identifying a user's credentials for a cloud.
type UserClouds ¶
type UserClouds struct {
UserClouds []UserCloud `json:"user-clouds,omitempty"`
}
UserClouds contains a set of UserClouds.
type UserInfo ¶
type UserInfo struct { Username string `json:"username"` DisplayName string `json:"display-name"` Access string `json:"access"` CreatedBy string `json:"created-by"` DateCreated time.Time `json:"date-created"` LastConnection *time.Time `json:"last-connection,omitempty"` Disabled bool `json:"disabled"` }
UserInfo holds information on a user.
type UserInfoRequest ¶
type UserInfoRequest struct { Entities []Entity `json:"entities"` IncludeDisabled bool `json:"include-disabled"` }
UserInfoRequest defines the users to return. An empty Entities list indicates that all matching users should be returned.
type UserInfoResult ¶
type UserInfoResult struct { Result *UserInfo `json:"result,omitempty"` Error *Error `json:"error,omitempty"` }
UserInfoResult holds the result of a UserInfo call.
type UserInfoResults ¶
type UserInfoResults struct {
Results []UserInfoResult `json:"results"`
}
UserInfoResults holds the result of a bulk UserInfo API call.
type UserModel ¶
UserModel holds information about a model and the last time the model was accessed for a particular user.
type UserModelList ¶
type UserModelList struct {
UserModels []UserModel `json:"user-models"`
}
UserModelList holds information about a list of models for a particular user.
type VersionResult ¶
type VersionResult struct { Version *version.Number `json:"version,omitempty"` Error *Error `json:"error,omitempty"` }
VersionResult holds the version and possibly error for a given DesiredVersion() API call.
type VersionResults ¶
type VersionResults struct {
Results []VersionResult `json:"results"`
}
VersionResults is a list of versions for the requested entities.
type Volume ¶
type Volume struct { VolumeTag string `json:"volume-tag"` Info VolumeInfo `json:"info"` }
Volume identifies and describes a storage volume in the model.
type VolumeAttachment ¶
type VolumeAttachment struct { VolumeTag string `json:"volume-tag"` MachineTag string `json:"machine-tag"` Info VolumeAttachmentInfo `json:"info"` }
VolumeAttachment identifies and describes a volume attachment.
type VolumeAttachmentDetails ¶
type VolumeAttachmentDetails struct { // NOTE(axw) for backwards-compatibility, this must not be given a // json tag. This ensures that we collapse VolumeAttachmentInfo. // // TODO(axw) when we can break backwards-compatibility (Juju 3.0), // give this a field name of "info", like we have in VolumeDetails // above. VolumeAttachmentInfo // Life contains the lifecycle state of the volume attachment. // Juju controllers older than 2.2 do not populate this // field, so it may be omitted. Life Life `json:"life,omitempty"` }
VolumeAttachmentDetails describes a volume attachment.
type VolumeAttachmentInfo ¶
type VolumeAttachmentInfo struct { DeviceName string `json:"device-name,omitempty"` DeviceLink string `json:"device-link,omitempty"` BusAddress string `json:"bus-address,omitempty"` ReadOnly bool `json:"read-only,omitempty"` }
VolumeAttachmentInfo describes a volume attachment.
type VolumeAttachmentParams ¶
type VolumeAttachmentParams struct { VolumeTag string `json:"volume-tag"` MachineTag string `json:"machine-tag"` VolumeId string `json:"volume-id,omitempty"` InstanceId string `json:"instance-id,omitempty"` Provider string `json:"provider"` ReadOnly bool `json:"read-only,omitempty"` }
VolumeAttachmentParams holds the parameters for creating a volume attachment.
type VolumeAttachmentParamsResult ¶
type VolumeAttachmentParamsResult struct { Result VolumeAttachmentParams `json:"result"` Error *Error `json:"error,omitempty"` }
VolumeAttachmentParamsResults holds provisioning parameters for a volume attachment.
type VolumeAttachmentParamsResults ¶
type VolumeAttachmentParamsResults struct {
Results []VolumeAttachmentParamsResult `json:"results,omitempty"`
}
VolumeAttachmentParamsResults holds provisioning parameters for multiple volume attachments.
type VolumeAttachmentResult ¶
type VolumeAttachmentResult struct { Result VolumeAttachment `json:"result"` Error *Error `json:"error,omitempty"` }
VolumeAttachmentResult holds the details of a single volume attachment, or an error.
type VolumeAttachmentResults ¶
type VolumeAttachmentResults struct {
Results []VolumeAttachmentResult `json:"results,omitempty"`
}
VolumeAttachmentResults holds a set of VolumeAttachmentResults.
type VolumeAttachments ¶
type VolumeAttachments struct {
VolumeAttachments []VolumeAttachment `json:"volume-attachments"`
}
VolumeAttachments describes a set of storage volume attachments.
type VolumeAttachmentsResult ¶
type VolumeAttachmentsResult struct { Attachments []VolumeAttachment `json:"attachments,omitempty"` Error *Error `json:"error,omitempty"` }
VolumeAttachmentsResult holds the volume attachments for a single machine, or an error.
type VolumeAttachmentsResults ¶
type VolumeAttachmentsResults struct {
Results []VolumeAttachmentsResult `json:"results,omitempty"`
}
VolumeAttachmentsResults holds a set of VolumeAttachmentsResults for a set of machines.
type VolumeDetails ¶
type VolumeDetails struct { // VolumeTag is the tag for the volume. VolumeTag string `json:"volume-tag"` // Info contains information about the volume. Info VolumeInfo `json:"info"` // Life contains the lifecycle state of the volume. // Juju controllers older than 2.2 do not populate this // field, so it may be omitted. Life Life `json:"life,omitempty"` // Status contains the status of the volume. Status EntityStatus `json:"status"` // MachineAttachments contains a mapping from // machine tag to volume attachment information. MachineAttachments map[string]VolumeAttachmentDetails `json:"machine-attachments,omitempty"` // Storage contains details about the storage instance // that the volume is assigned to, if any. Storage *StorageDetails `json:"storage,omitempty"` }
VolumeDetails describes a storage volume in the model for the purpose of volume CLI commands.
This is kept separate from Volume which contains only information specific to the volume model, whereas VolumeDetails is intended to contain complete information about a volume and related information (status, attachments, storage).
type VolumeDetailsListResult ¶
type VolumeDetailsListResult struct { Result []VolumeDetails `json:"result,omitempty"` Error *Error `json:"error,omitempty"` }
VolumeDetailsListResult holds a collection of volume details.
type VolumeDetailsListResults ¶
type VolumeDetailsListResults struct {
Results []VolumeDetailsListResult `json:"results,omitempty"`
}
VolumeDetailsListResults holds a collection of collections of volume details.
type VolumeDetailsResult ¶
type VolumeDetailsResult struct { // Result describes the volume in detail. Result *VolumeDetails `json:"details,omitempty"` // Error contains volume retrieval error. Error *Error `json:"error,omitempty"` }
VolumeDetailsResult contains details about a volume, its attachments or an error preventing retrieving those details.
type VolumeDetailsResults ¶
type VolumeDetailsResults struct {
Results []VolumeDetailsResult `json:"results,omitempty"`
}
VolumeDetailsResults holds volume details.
type VolumeFilter ¶
type VolumeFilter struct { // Machines are machine tags to filter on. Machines []string `json:"machines,omitempty"` }
VolumeFilter holds a filter for volume list API call.
func (*VolumeFilter) IsEmpty ¶
func (f *VolumeFilter) IsEmpty() bool
IsEmpty determines if filter is empty
type VolumeFilters ¶
type VolumeFilters struct {
Filters []VolumeFilter `json:"filters,omitempty"`
}
VolumeFilters holds a collection of volume filters.
type VolumeInfo ¶
type VolumeInfo struct { VolumeId string `json:"volume-id"` HardwareId string `json:"hardware-id,omitempty"` // Pool is the name of the storage pool used to // allocate the volume. Juju controllers older // than 2.2 do not populate this field, so it may // be omitted. Pool string `json:"pool,omitempty"` // Size is the size of the volume in MiB. Size uint64 `json:"size"` Persistent bool `json:"persistent"` }
Volume describes a storage volume in the model.
type VolumeParams ¶
type VolumeParams struct { VolumeTag string `json:"volume-tag"` Size uint64 `json:"size"` Provider string `json:"provider"` Attributes map[string]interface{} `json:"attributes,omitempty"` Tags map[string]string `json:"tags,omitempty"` Attachment *VolumeAttachmentParams `json:"attachment,omitempty"` }
VolumeParams holds the parameters for creating a storage volume.
type VolumeParamsResult ¶
type VolumeParamsResult struct { Result VolumeParams `json:"result"` Error *Error `json:"error,omitempty"` }
VolumeParamsResults holds provisioning parameters for a volume.
type VolumeParamsResults ¶
type VolumeParamsResults struct {
Results []VolumeParamsResult `json:"results,omitempty"`
}
VolumeParamsResults holds provisioning parameters for multiple volumes.
type VolumeResult ¶
VolumeResult holds information about a volume.
type VolumeResults ¶
type VolumeResults struct {
Results []VolumeResult `json:"results,omitempty"`
}
VolumeResults holds information about multiple volumes.
type Volumes ¶
type Volumes struct {
Volumes []Volume `json:"volumes"`
}
Volumes describes a set of storage volumes in the model.
type WatchContainer ¶
type WatchContainer struct { MachineTag string `json:"machine-tag"` ContainerType string `json:"container-type"` }
WatchContainer identifies a single container type within a machine.
type WatchContainers ¶
type WatchContainers struct {
Params []WatchContainer `json:"params"`
}
WatchContainers holds the arguments for making a WatchContainers API call.
type ZoneResult ¶
type ZoneResult struct { Error *Error `json:"error,omitempty"` Name string `json:"name"` Available bool `json:"available"` }
ZoneResult holds the result of an API call that returns an availability zone name and whether it's available for use.
type ZoneResults ¶
type ZoneResults struct {
Results []ZoneResult `json:"results"`
}
ZoneResults holds multiple ZoneResult results
Source Files ¶
- actions.go
- annotations.go
- apierror.go
- backups.go
- block.go
- charms.go
- cloud.go
- constants.go
- controller.go
- crossmodel.go
- http.go
- image_metadata.go
- instance_information.go
- internal.go
- leadership.go
- logfwd.go
- logstream.go
- metrics.go
- migration.go
- model.go
- network.go
- params.go
- payloads.go
- payloads_unit.go
- registration.go
- resources.go
- resources_unit.go
- retrystrategy.go
- ssh.go
- status.go
- storage.go
- undertaker.go
- usermanager.go