juju

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: May 4, 2023 License: Apache-2.0 Imports: 33 Imported by: 1

Documentation

Index

Constants

View Source
const (
	PrefixUser = "user-"

	UnspecifiedRevision = -1
)

Variables

This section is empty.

Functions

func ConfigEntryToString

func ConfigEntryToString(input interface{}) string

ConfigEntryToString returns the string representation based on the current value.

Types

type AddCloudInput

type AddCloudInput struct {
	Cloud jujuCloud.Cloud
	Force bool
}

type AddCredentialInput

type AddCredentialInput struct {
	Credential     jujuCloud.Credential
	CredentialName string
	CloudName      string
}

type AddMachineInput

type AddMachineInput struct {
	MachineParams params.AddMachineParams
	ModelUUID     string
}

type AddUnitsInput

type AddUnitsInput struct {
	ApplicationName string
	ModelUUID       string
	NumUnits        int
	Placement       []*instance.Placement
}

type Application

type Application struct {
	Name     string
	Endpoint string
	Role     string
	OfferURL *string
}

type ApplicationExistsInput

type ApplicationExistsInput struct {
	ApplicationName string
	ModelUUID       string
}

type Client

type Client struct {
	Models       modelsClient
	Clouds       cloudsClient
	Credentials  credentialsClient
	Machines     machinesClient
	Controller   controllerClient
	Applications applicationsClient
	Integrations integrationsClient
	Users        usersClient
	Actions      actionsClient
}

func NewClient

func NewClient(config Configuration) (*Client, error)

type CloudExistsInput

type CloudExistsInput struct {
	Name string
}

type ConfigEntry

type ConfigEntry struct {
	Value     interface{}
	IsDefault bool
}

ConfigEntry is an auxiliar struct to keep information about juju config entries. Specially, we want to know if they have the default value.

type Configuration

type Configuration struct {
	ControllerAddresses []string
	Username            string
	Password            string
	CACert              string
}

type ConnectionFactory

type ConnectionFactory struct {
	// contains filtered or unexported fields
}

func (*ConnectionFactory) GetConnection

func (cf *ConnectionFactory) GetConnection(ctx context.Context, modelUUID *string) (api.Connection, error)

type CreateApplicationInput

type CreateApplicationInput struct {
	ApplicationName string
	ModelUUID       string
	CharmName       string
	CharmChannel    string
	CharmBase       string
	CharmRevision   *int
	Units           int
	Trust           bool
	Expose          bool
	Config          map[string]interface{}
	Constraints     constraints.Value
}

type CreateApplicationResponse

type CreateApplicationResponse struct {
	AppName  string
	Revision int
	Base     string
}

type CreateIntegrationResponse

type CreateIntegrationResponse struct {
	Applications []Application
}

type CreateModelInput

type CreateModelInput struct {
	Name           string
	Cloud          string
	CloudRegion    string
	CredentialName string
	Config         map[string]interface{}
	Constraints    constraints.Value
}

type CreateModelResponse

type CreateModelResponse struct {
	ModelInfo base.ModelInfo
}

type CredentialExistsInput

type CredentialExistsInput struct {
	CredentialName string
	CloudName      string
}

type DestroyApplicationInput

type DestroyApplicationInput struct {
	ApplicationName string
	ModelUUID       string
	Force           bool
}

type DestroyControllerInput

type DestroyControllerInput struct {
	DestroyModels  bool
	DestroyStorage bool
	Force          bool
	MaxWait        time.Duration `json:"max-wait,omitempty"`
	ModelTimeout   time.Duration
}

type DestroyMachineInput

type DestroyMachineInput struct {
	Force     bool
	Keep      bool
	DryRun    bool
	MaxWait   time.Duration
	MachineID string
	ModelUUID string
}

type DestroyModelInput

type DestroyModelInput struct {
	UUID string
}

type DestroyUnitsInput

type DestroyUnitsInput struct {
	Units     []string
	ModelUUID string
	Force     bool
}

type EnqueueOperationInput

type EnqueueOperationInput struct {
	Receiver   string
	Name       string
	Parameters map[string]interface{}
}

type GetMachineAddressesInput

type GetMachineAddressesInput struct {
	ModelUUID string
	MachineID string
}

type GetMachineInput

type GetMachineInput struct {
	ModelUUID string
	MachineID string
}

type IntegrationInput

type IntegrationInput struct {
	ModelUUID string
	Endpoints []string
	ViaCIDRs  string
}

type ReadApplicationInput

type ReadApplicationInput struct {
	ModelUUID       string
	ApplicationName string
}

type ReadApplicationResponse

type ReadApplicationResponse struct {
	Name        string
	Channel     string
	Revision    int
	Base        params.Base
	Units       int
	Trust       bool
	Config      map[string]ConfigEntry
	Constraints constraints.Value
	Expose      map[string]interface{}
	Principal   bool
	Status      params.ApplicationStatus
}

type RevokeCredentialInput

type RevokeCredentialInput struct {
	CredentialName string
	CloudName      string
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL