machines

package
v2.57.0 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2024 License: Apache-2.0 Imports: 20 Imported by: 35

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ValidMachineStatuses = []string{
	"Online", "Offline", "Unknown", "NeedsUpgrade", "CalamariNeedsUpgrade", "Disabled",
}

ValidMachineStatuses provides options for valid machine status

View Source
var ValidProjectConnectivityPolicySkipMachineBehaviors = []core.SkipMachineBehavior{
	core.SkipMachineBehaviorNone,
	core.SkipMachineBehaviorSkipUnavailableMachines,
}

ValidProjectConnectivityPolicySkipMachineBehaviors provides options for "Skip Deployment Targets" - https://octopus.com/docs/deployment-patterns/elastic-and-transient-environments/deploying-to-transient-targets

View Source
var ValidProjectDefaultGuidedFailureModes = []string{
	"EnvironmentDefault", "Off", "On",
}

ValidProjectDefaultGuidedFailureModes provides options for "Default failure mode" - https://octopus.com/docs/deployment-process/releases/guided-failures

Functions

func DeleteByID added in v2.33.0

func DeleteByID(client newclient.Client, spaceID string, ID string) error

DeleteById deletes the machine based on the ID provided.

func FromTimeSpan

func FromTimeSpan(timeSpan string) time.Duration

func Get added in v2.33.0

func Get(client newclient.Client, spaceID string, machinesQuery MachinesQuery) (*resources.Resources[*DeploymentTarget], error)

Get returns a collection of machines based on the criteria defined by its input query parameter. If an error occurs, an empty collection is returned along with the associated error.

func IsNil

func IsNil(i interface{}) bool

func ToTimeSpan

func ToTimeSpan(duration time.Duration) string

Types

type ActivityLogElement

type ActivityLogElement struct {
	Category    string    `json:"Category,omitempty"`
	Detail      string    `json:"Detail,omitempty"`
	MessageText string    `json:"MessageText,omitempty"`
	OccurredAt  time.Time `json:"OccurredAt,omitempty"`
}

ActivityLogElement represents an activity log element.

type ActivityLogEntry

type ActivityLogEntry struct {
	Category    string    `` /* 150-byte string literal not displayed */
	Detail      string    `json:"Detail,omitempty"`
	MessageText string    `json:"MessageText,omitempty"`
	OccurredAt  time.Time `json:"OccurredAt,omitempty"`
}

ActivityLogEntry represents an activity log entry.

type AzureCloudServiceEndpoint

type AzureCloudServiceEndpoint struct {
	AccountID               string `json:"AccountId"`
	CloudServiceName        string `json:"CloudServiceName"`
	DefaultWorkerPoolID     string `json:"DefaultWorkerPoolId"`
	Slot                    string `json:"Slot"`
	StorageAccountName      string `json:"StorageAccountName"`
	SwapIfPossible          bool   `json:"SwapIfPossible"`
	UseCurrentInstanceCount bool   `json:"UseCurrentInstanceCount"`
	// contains filtered or unexported fields
}

AzureCloudServiceEndpoint represents an Azure cloud service endpoint.

func NewAzureCloudServiceEndpoint

func NewAzureCloudServiceEndpoint() *AzureCloudServiceEndpoint

NewAzureCloudServiceEndpoint creates and initializes a new Azure cloud service endpoint.

func (AzureCloudServiceEndpoint) GetAccountID

func (a AzureCloudServiceEndpoint) GetAccountID() string

GetAccountID returns the account ID associated with this Azure cloud service endpoint.

func (AzureCloudServiceEndpoint) GetCommunicationStyle

func (e AzureCloudServiceEndpoint) GetCommunicationStyle() string

GetCommunicationStyle returns the communication style of this endpoint.

func (AzureCloudServiceEndpoint) GetDefaultWorkerPoolID

func (a AzureCloudServiceEndpoint) GetDefaultWorkerPoolID() string

GetDefaultWorkerPoolID returns the default worker pool ID of this Azure cloud service endpoint.

func (*AzureCloudServiceEndpoint) SetDefaultWorkerPoolID

func (a *AzureCloudServiceEndpoint) SetDefaultWorkerPoolID(defaultWorkerPoolID string)

SetDefaultWorkerPoolID sets the default worker pool ID of this Azure cloud service endpoint.

func (AzureCloudServiceEndpoint) Validate

func (e AzureCloudServiceEndpoint) Validate() error

Validate checks the state of the endpoint and returns an error if invalid.

type AzureServiceFabricEndpoint

type AzureServiceFabricEndpoint struct {
	AadClientCredentialSecret   string               `json:"AadClientCredentialSecret,omitempty"`
	AadCredentialType           string               `json:"AadCredentialType,omitempty" validate:"omitempty,oneof=ClientCredential UserCredential"`
	AadUserCredentialPassword   *core.SensitiveValue `json:"AadUserCredentialPassword,omitempty"`
	AadUserCredentialUsername   string               `json:"AadUserCredentialUsername,omitempty"`
	CertificateStoreLocation    string               `json:"CertificateStoreLocation,omitempty"`
	CertificateStoreName        string               `json:"CertificateStoreName,omitempty"`
	ClientCertificateVariable   string               `json:"ClientCertVariable,omitempty"`
	ConnectionEndpoint          string               `json:"ConnectionEndpoint,omitempty"`
	SecurityMode                string               `json:"SecurityMode,omitempty" validate:"omitempty,oneof=Unsecure SecureClientCertificate SecureAzureAD"`
	ServerCertificateThumbprint string               `json:"ServerCertThumbprint,omitempty"`
	// contains filtered or unexported fields
}

func NewAzureServiceFabricEndpoint

func NewAzureServiceFabricEndpoint() *AzureServiceFabricEndpoint

func (AzureServiceFabricEndpoint) GetCommunicationStyle

func (e AzureServiceFabricEndpoint) GetCommunicationStyle() string

GetCommunicationStyle returns the communication style of this endpoint.

func (*AzureServiceFabricEndpoint) Validate

func (s *AzureServiceFabricEndpoint) Validate() error

Validate checks the state of the service fabric endpoint and returns an error if invalid.

type AzureWebAppEndpoint

type AzureWebAppEndpoint struct {
	AccountID         string `json:"AccountId"`
	ResourceGroupName string `json:"ResourceGroupName,omitempty"`
	WebAppName        string `json:"WebAppName,omitempty"`
	WebAppSlotName    string `json:"WebAppSlotName"`
	// contains filtered or unexported fields
}

AzureWebAppEndpoint represents the an Azure web app-based endpoint.

func NewAzureWebAppEndpoint

func NewAzureWebAppEndpoint() *AzureWebAppEndpoint

NewAzureWebAppEndpoint creates a new endpoint for Azure web apps.

func (AzureWebAppEndpoint) GetCommunicationStyle

func (e AzureWebAppEndpoint) GetCommunicationStyle() string

GetCommunicationStyle returns the communication style of this endpoint.

func (AzureWebAppEndpoint) Validate

func (e AzureWebAppEndpoint) Validate() error

Validate checks the state of the endpoint and returns an error if invalid.

type CloudRegionEndpoint

type CloudRegionEndpoint struct {
	DefaultWorkerPoolID string `json:"DefaultWorkerPoolId"`
	// contains filtered or unexported fields
}

CloudRegionEndpoint represents a cloud service endpoint.

func NewCloudRegionEndpoint

func NewCloudRegionEndpoint() *CloudRegionEndpoint

NewCloudRegionEndpoint creates and initializes a new cloud service endpoint.

func (CloudRegionEndpoint) GetCommunicationStyle

func (e CloudRegionEndpoint) GetCommunicationStyle() string

GetCommunicationStyle returns the communication style of this endpoint.

func (CloudRegionEndpoint) GetDefaultWorkerPoolID

func (e CloudRegionEndpoint) GetDefaultWorkerPoolID() string

GetDefaultWorkerPoolID returns the default worker pool ID of this endpoint.

func (*CloudRegionEndpoint) SetDefaultWorkerPoolID

func (e *CloudRegionEndpoint) SetDefaultWorkerPoolID(defaultWorkerPoolID string)

SetDefaultWorkerPoolID sets the default worker pool ID of this endpoint.

func (CloudRegionEndpoint) Validate

func (e CloudRegionEndpoint) Validate() error

Validate checks the state of the endpoint and returns an error if invalid.

type CloudServiceEndpoint

type CloudServiceEndpoint struct {
	CloudServiceName        string `json:"CloudServiceName,omitempty"`
	Slot                    string `json:"Slot,omitempty"`
	StorageAccountName      string `json:"StorageAccountName,omitempty"`
	SwapIfPossible          bool   `json:"SwapIfPossible"`
	UseCurrentInstanceCount bool   `json:"UseCurrentInstanceCount"`
	// contains filtered or unexported fields
}

func NewCloudServiceEndpoint

func NewCloudServiceEndpoint() *CloudServiceEndpoint

func (CloudServiceEndpoint) GetCommunicationStyle

func (e CloudServiceEndpoint) GetCommunicationStyle() string

GetCommunicationStyle returns the communication style of this endpoint.

func (CloudServiceEndpoint) Validate

func (e CloudServiceEndpoint) Validate() error

Validate checks the state of the endpoint and returns an error if invalid.

type DeploymentTarget

type DeploymentTarget struct {
	EnvironmentIDs         []string                    `json:"EnvironmentIds,omitempty"`
	Roles                  []string                    `json:"Roles,omitempty"`
	SpaceID                string                      `json:"SpaceId,omitempty"`
	TenantedDeploymentMode core.TenantedDeploymentMode `json:"TenantedDeploymentParticipation,omitempty"`
	TenantIDs              []string                    `json:"TenantIds,omitempty"`
	TenantTags             []string                    `json:"TenantTags,omitempty"`
	// contains filtered or unexported fields
}

func Add added in v2.33.0

func Add(client newclient.Client, deploymentTarget *DeploymentTarget) (*DeploymentTarget, error)

Add creates a new machine.

func GetAll added in v2.34.0

func GetAll(client newclient.Client, spaceID string) ([]*DeploymentTarget, error)

GetAll returns all machines. If an error occurs, it returns nil.

func GetByID added in v2.33.0

func GetByID(client newclient.Client, spaceID string, ID string) (*DeploymentTarget, error)

GetByID returns the machine that matches the input ID. If one cannot be found, it returns nil and an error.

func NewDeploymentTarget

func NewDeploymentTarget(name string, endpoint IEndpoint, environmentIDs []string, roles []string) *DeploymentTarget

func Update added in v2.33.0

func Update(client newclient.Client, deploymentTarget *DeploymentTarget) (*DeploymentTarget, error)

Update updates an existing machine in Octopus Deploy

func (*DeploymentTarget) MarshalJSON

func (d *DeploymentTarget) MarshalJSON() ([]byte, error)

MarshalJSON returns a deployment target as its JSON encoding.

func (*DeploymentTarget) UnmarshalJSON

func (resource *DeploymentTarget) UnmarshalJSON(b []byte) error

UnmarshalJSON sets this deployment target to its representation in JSON.

func (*DeploymentTarget) Validate

func (d *DeploymentTarget) Validate() error

Validate checks the state of the deployment target and returns an error if invalid.

type DiscoverMachineQuery

type DiscoverMachineQuery struct {
	Host    string `uri:"host,omitempty" url:"host,omitempty"`
	Port    int    `uri:"port,omitempty" url:"port,omitempty"`
	ProxyID string `uri:"proxyId,omitempty" url:"proxyId,omitempty"`
	Type    string `uri:"type,omitempty" url:"type,omitempty"`
}

type DiscoverWorkerQuery

type DiscoverWorkerQuery struct {
	Host    string `uri:"host,omitempty" url:"host,omitempty"`
	Port    int    `uri:"port,omitempty" url:"port,omitempty"`
	ProxyID string `uri:"proxyId,omitempty" url:"proxyId,omitempty"`
	Type    string `uri:"type,omitempty" url:"type,omitempty"`
}

type EndpointResource

type EndpointResource struct {
	AadClientCredentialSecret            string                                 `json:"AadClientCredentialSecret,omitempty"`
	AadCredentialType                    string                                 `json:"AadCredentialType,omitempty" validate:"omitempty,oneof=ClientCredential UserCredential"`
	AadUserCredentialUsername            string                                 `json:"AadUserCredentialUsername,omitempty"`
	AadUserCredentialPassword            *core.SensitiveValue                   `json:"AadUserCredentialPassword,omitempty"`
	AccountID                            string                                 `json:"AccountId"`
	ApplicationsDirectory                string                                 `json:"ApplicationsDirectory,omitempty"`
	Authentication                       IKubernetesAuthentication              `json:"Authentication,omitempty"`
	CertificateSignatureAlgorithm        string                                 `json:"CertificateSignatureAlgorithm,omitempty"`
	CertificateStoreLocation             string                                 `json:"CertificateStoreLocation,omitempty"`
	CertificateStoreName                 string                                 `json:"CertificateStoreName,omitempty"`
	ClientCertificateVariable            string                                 `json:"ClientCertVariable,omitempty"`
	CloudServiceName                     string                                 `json:"CloudServiceName"`
	ClusterCertificate                   string                                 `json:"ClusterCertificate,omitempty"`
	ClusterCertificatePath               string                                 `json:"ClusterCertificatePath,omitempty"`
	ClusterURL                           *url.URL                               `json:"ClusterUrl" validate:"required,url"`
	CommunicationStyle                   string                                 `` /* 181-byte string literal not displayed */
	ConnectionEndpoint                   string                                 `json:"ConnectionEndpoint,omitempty"`
	Container                            *deployments.DeploymentActionContainer `json:"Container,omitempty"`
	ContainerOptions                     string                                 `json:"ContainerOptions,omitempty"`
	DefaultWorkerPoolID                  string                                 `json:"DefaultWorkerPoolId"`
	Destination                          *OfflinePackageDropDestination         `json:"Destination"`
	DotNetCorePlatform                   string                                 `json:"DotNetCorePlatform,omitempty"`
	Fingerprint                          string                                 `json:"Fingerprint,omitempty"`
	Host                                 string                                 `json:"Host,omitempty"`
	Namespace                            string                                 `json:"Namespace,omitempty"`
	Port                                 int                                    `json:"Port,omitempty"`
	ProxyID                              string                                 `json:"ProxyId,omitempty"`
	ResourceGroupName                    string                                 `json:"ResourceGroupName,omitempty"`
	RunningInContainer                   bool                                   `json:"RunningInContainer"`
	SecurityMode                         string                                 `json:"SecurityMode,omitempty" validate:"omitempty,oneof=Unsecure SecureClientCertificate SecureAzureAD"`
	SensitiveVariablesEncryptionPassword *core.SensitiveValue                   `json:"SensitiveVariablesEncryptionPassword"`
	ServerCertificateThumbprint          string                                 `json:"ServerCertThumbprint,omitempty"`
	SkipTLSVerification                  bool                                   `json:"SkipTlsVerification"`
	Slot                                 string                                 `json:"Slot"`
	StorageAccountName                   string                                 `json:"StorageAccountName"`
	SwapIfPossible                       bool                                   `json:"SwapIfPossible"`
	TentacleVersionDetails               *TentacleVersionDetails                `json:"TentacleVersionDetails,omitempty"`
	Thumbprint                           string                                 `json:"Thumbprint" validate:"required"`
	WorkingDirectory                     string                                 `json:"OctopusWorkingDirectory,omitempty"`
	UseCurrentInstanceCount              bool                                   `json:"UseCurrentInstanceCount"`
	URI                                  *url.URL                               `json:"Uri" validate:"required,uri"`
	WebAppName                           string                                 `json:"WebAppName,omitempty"`
	WebAppSlotName                       string                                 `json:"WebAppSlotName"`

	resources.Resource
}

func NewEndpointResource

func NewEndpointResource(communicationStyle string) *EndpointResource

NewEndpoint creates and initializes an account resource with a name and type.

func ToEndpointResource

func ToEndpointResource(endpoint IEndpoint) (*EndpointResource, error)

func (*EndpointResource) GetCommunicationStyle

func (e *EndpointResource) GetCommunicationStyle() string

GetCommunicationStyle returns the communication style of this endpoint.

func (EndpointResource) Validate

func (e EndpointResource) Validate() error

Validate checks the state of the endpoint resource and returns an error if invalid.

type IDeploymentTarget

type IDeploymentTarget interface {
	GetEndpoint() IEndpoint
	GetName() string
	GetHealthStatus() string
	GetIsDisabled() bool
}

type IEndpoint

type IEndpoint interface {
	GetCommunicationStyle() string

	resources.IResource
}

IEndpoint defines the interface for endpoints.

func ToEndpoint

func ToEndpoint(endpointResource *EndpointResource) (IEndpoint, error)

func ToEndpointArray

func ToEndpointArray(endpointResources []*EndpointResource) []IEndpoint

type IEndpointWithAccount

type IEndpointWithAccount interface {
	GetAccountID() string
}

type IEndpointWithFingerprint

type IEndpointWithFingerprint interface {
	GetFingerprint() string
}

type IEndpointWithHostname

type IEndpointWithHostname interface {
	GetHost() string
}

type IEndpointWithProxy

type IEndpointWithProxy interface {
	GetProxyID() string
	SetProxyID(string)
}

type IKubernetesAuthentication

type IKubernetesAuthentication interface {
	GetAuthenticationType() string
}

type IRunsOnAWorker

type IRunsOnAWorker interface {
	GetDefaultWorkerPoolID() string
	SetDefaultWorkerPoolID(string)
}

IRunsOnAWorker defines the interface for workers.

type KubernetesAgentDetails added in v2.42.1

type KubernetesAgentDetails struct {
	AgentVersion        string `json:"AgentVersion"`
	TentacleVersion     string `json:"TentacleVersion"`
	UpgradeStatus       string `json:"UpgradeStatus" validate:"oneof=NoUpgrades UpgradeAvailable UpgradeSuggested UpgradeRequired"`
	HelmReleaseName     string `json:"HelmReleaseName"`
	KubernetesNamespace string `json:"KubernetesNamespace"`
}

type KubernetesAuthentication

type KubernetesAuthentication struct {
	AccountID                 string `json:"AccountId,omitempty"`
	AdminLogin                string `json:"AdminLogin,omitempty"`
	AssumedRoleARN            string `json:"AssumedRoleArn,omitempty"`
	AssumedRoleSession        string `json:"AssumedRoleSession,omitempty"`
	AssumeRole                bool   `json:"AssumeRole"`
	AssumeRoleSessionDuration int    `json:"AssumeRoleSessionDurationSeconds,omitempty"`
	AssumeRoleExternalID      string `json:"AssumeRoleExternalId,omitempty"`
	AuthenticationType        string `json:"AuthenticationType,omitempty"`
	ClientCertificate         string `json:"ClientCertificate,omitempty"`
	ClusterName               string `json:"ClusterName,omitempty"`
	ClusterResourceGroup      string `json:"ClusterResourceGroup,omitempty"`
	ImpersonateServiceAccount bool   `json:"ImpersonateServiceAccount"`
	Project                   string `json:"Project,omitempty"`
	Region                    string `json:"Region,omitempty"`
	ServiceAccountEmails      string `json:"ServiceAccountEmails,omitempty"`
	UseInstanceRole           bool   `json:"UseInstanceRole"`
	UseVmServiceAccount       bool   `json:"UseVmServiceAccount"`
	Zone                      string `json:"Zone,omitempty"`
	TokenPath                 string `json:"TokenPath,omitempty"`
}

func (*KubernetesAuthentication) GetAuthenticationType

func (k *KubernetesAuthentication) GetAuthenticationType() string

GetAuthenticationType returns the authentication type of this Kubernetes-based authentication.

type KubernetesAwsAuthentication

type KubernetesAwsAuthentication struct {
	AssumedRoleARN            string `json:"AssumedRoleArn,omitempty"`
	AssumedRoleSession        string `json:"AssumedRoleSession,omitempty"`
	AssumeRole                bool   `json:"AssumeRole"`
	AssumeRoleExternalID      string `json:"AssumeRoleExternalId,omitempty"`
	AssumeRoleSessionDuration int    `json:"AssumeRoleSessionDurationSeconds,omitempty"`
	ClusterName               string `json:"ClusterName,omitempty"`
	UseInstanceRole           bool   `json:"UseInstanceRole"`

	KubernetesStandardAuthentication
}

func NewKubernetesAwsAuthentication

func NewKubernetesAwsAuthentication() *KubernetesAwsAuthentication

NewKubernetesAwsAuthentication creates and initializes a Kubernetes AWS authentication.

type KubernetesAzureAuthentication

type KubernetesAzureAuthentication struct {
	ClusterName          string `json:"ClusterName,omitempty"`
	ClusterResourceGroup string `json:"ClusterResourceGroup,omitempty"`
	AdminLogin           string `json:"AdminLogin,omitempty"`

	KubernetesStandardAuthentication
}

func NewKubernetesAzureAuthentication

func NewKubernetesAzureAuthentication() *KubernetesAzureAuthentication

NewKubernetesAzureAuthentication creates and initializes a Kubernetes Azure authentication.

type KubernetesCertificateAuthentication

type KubernetesCertificateAuthentication struct {
	AuthenticationType string `json:"AuthenticationType"`
	ClientCertificate  string `json:"ClientCertificate,omitempty"`
}

func NewKubernetesCertificateAuthentication

func NewKubernetesCertificateAuthentication() *KubernetesCertificateAuthentication

NewKubernetesCertificateAuthentication creates and initializes a Kubernetes certificate authentication.

func (*KubernetesCertificateAuthentication) GetAuthenticationType

func (k *KubernetesCertificateAuthentication) GetAuthenticationType() string

GetAuthenticationType returns the authentication type of this Kubernetes-based authentication.

type KubernetesEndpoint

type KubernetesEndpoint struct {
	Authentication         IKubernetesAuthentication              `json:"Authentication,omitempty"`
	ClusterCertificate     string                                 `json:"ClusterCertificate,omitempty"`
	ClusterCertificatePath string                                 `json:"ClusterCertificatePath,omitempty"`
	ClusterURL             *url.URL                               `json:"ClusterUrl" validate:"required,url"`
	Container              *deployments.DeploymentActionContainer `json:"Container,omitempty"`
	ContainerOptions       string                                 `json:"ContainerOptions,omitempty"`
	DefaultWorkerPoolID    string                                 `json:"DefaultWorkerPoolId,omitempty"`
	Namespace              string                                 `json:"Namespace,omitempty"`
	ProxyID                string                                 `json:"ProxyId,omitempty"`
	RunningInContainer     bool                                   `json:"RunningInContainer"`
	SkipTLSVerification    bool                                   `json:"SkipTlsVerification"`
	// contains filtered or unexported fields
}

func NewKubernetesEndpoint

func NewKubernetesEndpoint(clusterURL *url.URL) *KubernetesEndpoint

NewKubernetesEndpoint creates and initializes a new Kubernetes endpoint.

func (KubernetesEndpoint) GetCommunicationStyle

func (e KubernetesEndpoint) GetCommunicationStyle() string

GetCommunicationStyle returns the communication style of this endpoint.

func (*KubernetesEndpoint) GetDefaultWorkerPoolID

func (k *KubernetesEndpoint) GetDefaultWorkerPoolID() string

GetDefaultWorkerPoolID returns the default worker pool ID of this Kubernetes endpoint.

func (*KubernetesEndpoint) GetProxyID

func (k *KubernetesEndpoint) GetProxyID() string

GetProxyID returns the proxy ID associated with this Kubernetes endpoint.

func (*KubernetesEndpoint) MarshalJSON

func (k *KubernetesEndpoint) MarshalJSON() ([]byte, error)

MarshalJSON returns a Kubernetes endpoint as its JSON encoding.

func (*KubernetesEndpoint) SetDefaultWorkerPoolID

func (k *KubernetesEndpoint) SetDefaultWorkerPoolID(defaultWorkerPoolID string)

SetDefaultWorkerPoolID sets the default worker pool ID of this Kubernetes endpoint.

func (*KubernetesEndpoint) SetProxyID

func (k *KubernetesEndpoint) SetProxyID(proxyID string)

SetProxyID sets the proxy ID associated with this Kubernetes endpoint.

func (*KubernetesEndpoint) UnmarshalJSON

func (k *KubernetesEndpoint) UnmarshalJSON(data []byte) error

UnmarshalJSON sets this Kubernetes endpoint to its representation in JSON.

func (*KubernetesEndpoint) Validate

func (k *KubernetesEndpoint) Validate() error

Validate checks the state of the Kubernetes endpoint and returns an error if invalid.

type KubernetesGcpAuthentication

type KubernetesGcpAuthentication struct {
	ClusterName               string `json:"ClusterName,omitempty"`
	ImpersonateServiceAccount bool   `json:"ImpersonateServiceAccount"`
	Project                   string `json:"Project,omitempty"`
	Region                    string `json:"Region,omitempty"`
	ServiceAccountEmails      string `json:"ServiceAccountEmails,omitempty"`
	UseVmServiceAccount       bool   `json:"UseVmServiceAccount"`
	Zone                      string `json:"Zone,omitempty"`

	KubernetesStandardAuthentication
}

func NewKubernetesGcpAuthentication

func NewKubernetesGcpAuthentication() *KubernetesGcpAuthentication

NewKubernetesGcpAuthentication creates and initializes a Kubernetes GCP authentication.

type KubernetesPodAuthentication added in v2.18.0

type KubernetesPodAuthentication struct {
	TokenPath          string `json:"TokenPath,omitempty"`
	AuthenticationType string `json:"AuthenticationType"`
}

func NewKubernetesPodAuthentication added in v2.18.0

func NewKubernetesPodAuthentication() *KubernetesPodAuthentication

NewKubernetesPodAuthentication creates and initializes a Kubernetes authentication.

func (*KubernetesPodAuthentication) GetAuthenticationType added in v2.18.0

func (k *KubernetesPodAuthentication) GetAuthenticationType() string

GetAuthenticationType returns the authentication type of this Kubernetes-based authentication.

type KubernetesStandardAuthentication

type KubernetesStandardAuthentication struct {
	AccountID          string `json:"AccountId,omitempty"`
	AuthenticationType string `json:"AuthenticationType"`
}

func NewKubernetesStandardAuthentication

func NewKubernetesStandardAuthentication(authenticationType string) *KubernetesStandardAuthentication

NewKubernetesStandardAuthentication creates and initializes a Kubernetes authentication.

func (*KubernetesStandardAuthentication) GetAuthenticationType

func (k *KubernetesStandardAuthentication) GetAuthenticationType() string

GetAuthenticationType returns the authentication type of this Kubernetes-based authentication.

type KubernetesTentacleEndpoint added in v2.42.1

type KubernetesTentacleEndpoint struct {
	TentacleEndpointConfiguration *TentacleEndpointConfiguration `json:"TentacleEndpointConfiguration" validate:"required"`
	KubernetesAgentDetails        *KubernetesAgentDetails        `json:"KubernetesAgentDetails,omitempty"`
	UpgradeLocked                 bool                           `json:"UpgradeLocked"`
	DefaultNamespace              string                         `json:"DefaultNamespace,omitempty"`
	// contains filtered or unexported fields
}

func NewKubernetesTentacleEndpoint added in v2.42.1

func NewKubernetesTentacleEndpoint(uri *url.URL, thumbprint string, upgradeLocked bool, communicationsMode string, defaultNamespace string) *KubernetesTentacleEndpoint

func (KubernetesTentacleEndpoint) GetCommunicationStyle added in v2.42.1

func (e KubernetesTentacleEndpoint) GetCommunicationStyle() string

GetCommunicationStyle returns the communication style of this endpoint.

func (KubernetesTentacleEndpoint) MarshalJSON added in v2.42.1

func (l KubernetesTentacleEndpoint) MarshalJSON() ([]byte, error)

func (*KubernetesTentacleEndpoint) UnmarshalJSON added in v2.42.1

func (l *KubernetesTentacleEndpoint) UnmarshalJSON(b []byte) error

UnmarshalJSON sets this tentacle endpoint to its representation in JSON.

func (KubernetesTentacleEndpoint) Validate added in v2.42.1

func (e KubernetesTentacleEndpoint) Validate() error

Validate checks the state of the endpoint and returns an error if invalid.

type ListeningTentacleDeploymentTarget

type ListeningTentacleDeploymentTarget struct {
	Endpoint               *ListeningTentacleEndpoint  `json:"Endpoint" validate:"required"`
	EnvironmentIDs         []string                    `json:"EnvironmentIds,omitempty"`
	HasLatestCalamari      bool                        `json:"HasLatestCalamari"`
	HealthStatus           string                      `json:"HealthStatus,omitempty" validate:"omitempty,oneof=HasWarnings Healthy Unavailable Unhealthy Unknown"`
	IsDisabled             bool                        `json:"IsDisabled"`
	IsInProcess            bool                        `json:"IsInProcess"`
	MachinePolicyID        string                      `json:"MachinePolicyId,omitempty"`
	Name                   string                      `json:"Name,omitempty"`
	OperatingSystem        string                      `json:"OperatingSystem,omitempty"`
	Roles                  []string                    `json:"Roles,omitempty"`
	ShellName              string                      `json:"ShellName,omitempty"`
	ShellVersion           string                      `json:"ShellVersion,omitempty"`
	SpaceID                string                      `json:"SpaceId,omitempty"`
	Status                 string                      `json:"Status,omitempty" validate:"omitempty,oneof=CalamariNeedsUpgrade Disabled NeedsUpgrade Offline Online Unknown"`
	StatusSummary          string                      `json:"StatusSummary,omitempty"`
	TenantedDeploymentMode core.TenantedDeploymentMode `json:"TenantedDeploymentParticipation,omitempty"`
	TenantIDs              []string                    `json:"TenantIds,omitempty"`
	TenantTags             []string                    `json:"TenantTags,omitempty"`
	Thumbprint             string                      `json:"Thumbprint,omitempty"`
	URI                    string                      `json:"Uri,omitempty" validate:"omitempty,uri"`

	resources.Resource
}

func NewListeningTentacleDeploymentTarget

func NewListeningTentacleDeploymentTarget(name string, endpoint *ListeningTentacleEndpoint, environmentIDs []string, roles []string) *ListeningTentacleDeploymentTarget

func (*ListeningTentacleDeploymentTarget) GetEndpoint

func (*ListeningTentacleDeploymentTarget) GetHealthStatus

func (l *ListeningTentacleDeploymentTarget) GetHealthStatus() string

func (*ListeningTentacleDeploymentTarget) GetIsDisabled

func (l *ListeningTentacleDeploymentTarget) GetIsDisabled() bool

func (*ListeningTentacleDeploymentTarget) GetName

type ListeningTentacleEndpoint

type ListeningTentacleEndpoint struct {
	ProxyID string `json:"ProxyId,omitempty"`
	// contains filtered or unexported fields
}

func NewListeningTentacleEndpoint

func NewListeningTentacleEndpoint(uri *url.URL, thumbprint string) *ListeningTentacleEndpoint

func (ListeningTentacleEndpoint) MarshalJSON

func (l ListeningTentacleEndpoint) MarshalJSON() ([]byte, error)

func (*ListeningTentacleEndpoint) UnmarshalJSON

func (l *ListeningTentacleEndpoint) UnmarshalJSON(b []byte) error

UnmarshalJSON sets this tentacle endpoint to its representation in JSON.

func (ListeningTentacleEndpoint) Validate

func (t ListeningTentacleEndpoint) Validate() error

Validate checks the state of the tentacle endpoint and returns an error if invalid.

type MachineCleanupPolicy

type MachineCleanupPolicy struct {
	DeleteMachinesBehavior        string        `json:"DeleteMachinesBehavior" validate:"required,oneof=DeleteUnavailableMachines DoNotDelete"`
	DeleteMachinesElapsedTimeSpan time.Duration `json:"DeleteMachinesElapsedTimeSpan,omitempty"`
}

func NewMachineCleanupPolicy

func NewMachineCleanupPolicy() *MachineCleanupPolicy

func (*MachineCleanupPolicy) MarshalJSON

func (m *MachineCleanupPolicy) MarshalJSON() ([]byte, error)

MarshalJSON returns a machine policy as its JSON encoding.

func (*MachineCleanupPolicy) UnmarshalJSON

func (m *MachineCleanupPolicy) UnmarshalJSON(data []byte) error

UnmarshalJSON sets this Kubernetes endpoint to its representation in JSON.

func (*MachineCleanupPolicy) Validate

func (m *MachineCleanupPolicy) Validate() error

Validate checks the state of the machine policy and returns an error if invalid.

type MachineConnectionStatus

type MachineConnectionStatus struct {
	CurrentTentacleVersion string                `json:"CurrentTentacleVersion,omitempty"`
	LastChecked            time.Time             `json:"LastChecked,omitempty"`
	Logs                   []*ActivityLogElement `json:"Logs"`
	MachineID              string                `json:"MachineId,omitempty"`
	Status                 string                `json:"Status,omitempty"`

	resources.Resource
}

func NewMachineConnectionStatus

func NewMachineConnectionStatus() *MachineConnectionStatus

type MachineConnectivityPolicy

type MachineConnectivityPolicy struct {
	MachineConnectivityBehavior string `json:"MachineConnectivityBehavior" validate:"oneof=ExpectedToBeOnline MayBeOfflineAndCanBeSkipped"`
}

func NewMachineConnectivityPolicy

func NewMachineConnectivityPolicy() *MachineConnectivityPolicy

type MachineHealthCheckPolicy

type MachineHealthCheckPolicy struct {
	BashHealthCheckPolicy       *MachineScriptPolicy `json:"BashHealthCheckPolicy" validate:"required"`
	HealthCheckCron             string               `json:"HealthCheckCron,omitempty"`
	HealthCheckCronTimezone     string               `json:"HealthCheckCronTimezone" validate:"required"`
	HealthCheckInterval         time.Duration        `json:"HealthCheckInterval,omitempty"`
	HealthCheckType             string               `json:"HealthCheckType" validate:"required,oneof=OnlyConnectivity RunScript"`
	PowerShellHealthCheckPolicy *MachineScriptPolicy `json:"PowerShellHealthCheckPolicy" validate:"required"`
}

func NewMachineHealthCheckPolicy

func NewMachineHealthCheckPolicy() *MachineHealthCheckPolicy

func (*MachineHealthCheckPolicy) MarshalJSON

func (m *MachineHealthCheckPolicy) MarshalJSON() ([]byte, error)

MarshalJSON returns a machine health check policy as its JSON encoding.

func (*MachineHealthCheckPolicy) UnmarshalJSON

func (m *MachineHealthCheckPolicy) UnmarshalJSON(data []byte) error

UnmarshalJSON sets this machine health check policy to its representation in JSON.

func (*MachineHealthCheckPolicy) Validate

func (m *MachineHealthCheckPolicy) Validate() error

Validate checks the state of the machine health check policy and returns an error if invalid.

type MachinePoliciesQuery

type MachinePoliciesQuery struct {
	IDs         []string `uri:"ids,omitempty" url:"ids,omitempty"`
	PartialName string   `uri:"partialName,omitempty" url:"partialName,omitempty"`
	Skip        int      `uri:"skip,omitempty" url:"skip,omitempty"`
	Take        int      `uri:"take,omitempty" url:"take,omitempty"`
}

type MachinePolicy

type MachinePolicy struct {
	ConnectionConnectTimeout                      time.Duration              `json:"ConnectionConnectTimeout" validate:"required,min=10s"`
	ConnectionRetryCountLimit                     int32                      `json:"ConnectionRetryCountLimit" validate:"required,gte=2"`
	ConnectionRetrySleepInterval                  time.Duration              `json:"ConnectionRetrySleepInterval" validate:"required"`
	ConnectionRetryTimeLimit                      time.Duration              `json:"ConnectionRetryTimeLimit" validate:"required,min=10s"`
	Description                                   string                     `json:"Description,omitempty"`
	IsDefault                                     bool                       `json:"IsDefault"`
	MachineCleanupPolicy                          *MachineCleanupPolicy      `json:"MachineCleanupPolicy"`
	MachineConnectivityPolicy                     *MachineConnectivityPolicy `json:"MachineConnectivityPolicy"`
	MachineHealthCheckPolicy                      *MachineHealthCheckPolicy  `json:"MachineHealthCheckPolicy"`
	MachineUpdatePolicy                           *MachineUpdatePolicy       `json:"MachineUpdatePolicy"`
	Name                                          string                     `json:"Name" validate:"required,notblank"`
	PollingRequestMaximumMessageProcessingTimeout time.Duration              `json:"PollingRequestMaximumMessageProcessingTimeout,omitempty"`
	PollingRequestQueueTimeout                    time.Duration              `json:"PollingRequestQueueTimeout" validate:"required"`
	SpaceID                                       string                     `json:"SpaceId,omitempty"`

	resources.Resource
}

func NewMachinePolicy

func NewMachinePolicy(name string) *MachinePolicy

func (*MachinePolicy) MarshalJSON

func (m *MachinePolicy) MarshalJSON() ([]byte, error)

MarshalJSON returns a machine policy as its JSON encoding.

func (*MachinePolicy) UnmarshalJSON

func (m *MachinePolicy) UnmarshalJSON(data []byte) error

UnmarshalJSON sets this Kubernetes endpoint to its representation in JSON.

func (*MachinePolicy) Validate

func (m *MachinePolicy) Validate() error

Validate checks the state of the machine policy and returns an error if invalid.

type MachinePolicyService

type MachinePolicyService struct {
	services.CanDeleteService
	// contains filtered or unexported fields
}

func NewMachinePolicyService

func NewMachinePolicyService(sling *sling.Sling, uriTemplate string, templatePath string) *MachinePolicyService

func (*MachinePolicyService) Add deprecated

func (s *MachinePolicyService) Add(machinePolicy *MachinePolicy) (*MachinePolicy, error)

Add creates a new machine policy.

Deprecated: use machinepolicies.Add

func (*MachinePolicyService) Get deprecated

Get returns a collection of machine policies based on the criteria defined by its input query parameter. If an error occurs, an empty collection is returned along with the associated error.

Deprecated: use machinepolicies.Get

func (*MachinePolicyService) GetAll deprecated

func (s *MachinePolicyService) GetAll() ([]*MachinePolicy, error)

GetAll returns all machine policies. If none can be found or an error occurs, it returns an empty collection.

Deprecated: use machinepolicies.GetAll

func (*MachinePolicyService) GetByID deprecated

func (s *MachinePolicyService) GetByID(id string) (*MachinePolicy, error)

GetByID returns the machine policy that matches the input ID. If one cannot be found, it returns nil and an error.

Deprecated: use machinepolicies.GetByID

func (*MachinePolicyService) GetByPartialName

func (s *MachinePolicyService) GetByPartialName(partialName string) ([]*MachinePolicy, error)

GetByPartialName performs a lookup and returns machine policies with a matching partial name.

func (*MachinePolicyService) GetTemplate

func (s *MachinePolicyService) GetTemplate() (*MachinePolicy, error)

func (*MachinePolicyService) Update deprecated

func (s *MachinePolicyService) Update(machinePolicy *MachinePolicy) (*MachinePolicy, error)

Update modifies a machine policy based on the one provided as input.

Deprecated: use machinepolicies.Update

type MachineRoleService

type MachineRoleService struct {
	services.Service
}

func NewMachineRoleService

func NewMachineRoleService(sling *sling.Sling, uriTemplate string) *MachineRoleService

func (*MachineRoleService) GetAll added in v2.13.0

func (s *MachineRoleService) GetAll() ([]*string, error)

type MachineScriptPolicy

type MachineScriptPolicy struct {
	RunType    string  `json:"RunType" validate:"required,oneof=InheritFromDefault Inline OnlyConnectivity"`
	ScriptBody *string `json:"ScriptBody"`
}

func NewMachineScriptPolicy

func NewMachineScriptPolicy() *MachineScriptPolicy

type MachineService

type MachineService struct {
	services.CanDeleteService
	// contains filtered or unexported fields
}

func NewMachineService

func NewMachineService(sling *sling.Sling, uriTemplate string, discoverMachinePath string, operatingSystemsPath string, shellsPath string) *MachineService

func (*MachineService) Add deprecated

func (s *MachineService) Add(deploymentTarget *DeploymentTarget) (*DeploymentTarget, error)

Add creates a new machine.

Deprecated: use machines.Add

func (*MachineService) Get deprecated

Get returns a collection of machines based on the criteria defined by its input query parameter. If an error occurs, an empty collection is returned along with the associated error.

Deprecated: use machines.Get

func (*MachineService) GetAll deprecated

func (s *MachineService) GetAll() ([]*DeploymentTarget, error)

GetAll returns all machines. If none can be found or an error occurs, it returns an empty collection.

Deprecated: use machines.GetAll

func (*MachineService) GetByID deprecated

func (s *MachineService) GetByID(id string) (*DeploymentTarget, error)

GetByID returns the machine that matches the input ID. If one cannot be found, it returns nil and an error.

Deprecated: use machines.GetByID

func (*MachineService) GetByIdentifier added in v2.16.0

func (s *MachineService) GetByIdentifier(identifier string) (*DeploymentTarget, error)

func (*MachineService) GetByName

func (s *MachineService) GetByName(name string) ([]*DeploymentTarget, error)

GetByName performs a lookup and returns the Machine with a matching name.

func (*MachineService) GetByPartialName

func (s *MachineService) GetByPartialName(partialName string) ([]*DeploymentTarget, error)

GetByPartialName performs a lookup and returns the machine with a matching partial name.

func (*MachineService) Update deprecated

func (s *MachineService) Update(resource *DeploymentTarget) (*DeploymentTarget, error)

Update updates an existing machine in Octopus Deploy

Deprecated: use machines.Update

type MachineTentacleVersionDetails

type MachineTentacleVersionDetails struct {
	UpgradeLocked    bool   `json:"UpgradeLocked"`
	Version          string `json:"Version"`
	UpgradeSuggested bool   `json:"UpgradeSuggested"`
	UpgradeRequired  bool   `json:"UpgradeRequired"`
}

type MachineUpdatePolicy

type MachineUpdatePolicy struct {
	CalamariUpdateBehavior        string `json:"CalamariUpdateBehavior" validate:"required,oneof=UpdateAlways UpdateOnDeployment UpdateOnNewMachine"`
	TentacleUpdateAccountID       string `json:"TentacleUpdateAccountId,omitempty"`
	TentacleUpdateBehavior        string `json:"TentacleUpdateBehavior" validate:"required,oneof=NeverUpdate Update"`
	KubernetesAgentUpdateBehavior string `json:"KubernetesAgentUpdateBehavior" validate:"required,oneof=NeverUpdate Update"`
}

func NewMachineUpdatePolicy

func NewMachineUpdatePolicy() *MachineUpdatePolicy

type MachinesQuery

type MachinesQuery struct {
	CommunicationStyles   []string `uri:"commStyles,omitempty" url:"commStyles,omitempty"`
	DeploymentID          string   `uri:"deploymentId,omitempty" url:"deploymentId,omitempty"`
	DeploymentTargetTypes []string `uri:"deploymentTargetTypes,omitempty" url:"deploymentTargetType,omitempty"`
	EnvironmentIDs        []string `uri:"environmentIds,omitempty" url:"environmentIds,omitempty"`
	HealthStatuses        []string `uri:"healthStatuses,omitempty" url:"healthStatuses,omitempty"`
	IDs                   []string `uri:"ids,omitempty" url:"ids,omitempty"`
	IsDisabled            bool     `uri:"isDisabled,omitempty" url:"isDisabled,omitempty"`
	Name                  string   `uri:"name,omitempty" url:"name,omitempty"`
	PartialName           string   `uri:"partialName,omitempty" url:"partialName,omitempty"`
	Roles                 []string `uri:"roles,omitempty" url:"roles,omitempty"`
	ShellNames            []string `uri:"shellNames,omitempty" url:"shellNames,omitempty"`
	Skip                  int      `uri:"skip,omitempty" url:"skip,omitempty"`
	Take                  int      `uri:"take,omitempty" url:"take,omitempty"`
	TenantIDs             []string `uri:"tenantIds,omitempty" url:"tenantIds,omitempty"`
	TenantTags            []string `uri:"tenantTags,omitempty" url:"tenantTags,omitempty"`
	Thumbprint            string   `uri:"thumbprint,omitempty" url:"thumbprint,omitempty"`
}

type OfflinePackageDropDeploymentTarget

type OfflinePackageDropDeploymentTarget struct {
	Endpoint               OfflinePackageDropEndpoint  `json:"Endpoint" validate:"required"`
	EnvironmentIDs         []string                    `json:"EnvironmentIds"`
	HasLatestCalamari      bool                        `json:"HasLatestCalamari"`
	HealthStatus           string                      `json:"HealthStatus,omitempty" validate:"omitempty,oneof=HasWarnings Healthy Unavailable Unhealthy Unknown"`
	IsDisabled             bool                        `json:"IsDisabled"`
	IsInProcess            bool                        `json:"IsInProcess"`
	MachinePolicyID        string                      `json:"MachinePolicyId,omitempty"`
	Name                   string                      `json:"Name"`
	OperatingSystem        string                      `json:"OperatingSystem,omitempty"`
	Roles                  []string                    `json:"Roles"`
	ShellName              string                      `json:"ShellName,omitempty"`
	ShellVersion           string                      `json:"ShellVersion,omitempty"`
	SpaceID                string                      `json:"SpaceId,omitempty"`
	Status                 string                      `json:"Status,omitempty" validate:"omitempty,oneof=CalamariNeedsUpgrade Disabled NeedsUpgrade Offline Online Unknown"`
	StatusSummary          string                      `json:"StatusSummary,omitempty"`
	TenantedDeploymentMode core.TenantedDeploymentMode `json:"TenantedDeploymentParticipation,omitempty"`
	TenantIDs              []string                    `json:"TenantIds"`
	TenantTags             []string                    `json:"TenantTags"`
	Thumbprint             string                      `json:"Thumbprint,omitempty"`
	URI                    string                      `json:"Uri,omitempty" validate:"omitempty,uri"`

	resources.Resource
}

func NewOfflinePackageDropDeploymentTarget

func NewOfflinePackageDropDeploymentTarget(name string, endpoint OfflinePackageDropEndpoint, environmentIDs []string, roles []string) *OfflinePackageDropDeploymentTarget

type OfflinePackageDropDestination

type OfflinePackageDropDestination struct {
	DestinationType string `json:"DestinationType" validate:"oneof=Artifact FileSystem"`
	DropFolderPath  string `json:"DropFolderPath,omitempty"`
}

func NewOfflinePackageDropDestination

func NewOfflinePackageDropDestination() *OfflinePackageDropDestination

type OfflinePackageDropEndpoint

type OfflinePackageDropEndpoint struct {
	ApplicationsDirectory                string                         `json:"ApplicationsDirectory,omitempty"`
	Destination                          *OfflinePackageDropDestination `json:"Destination"`
	SensitiveVariablesEncryptionPassword *core.SensitiveValue           `json:"SensitiveVariablesEncryptionPassword"`
	WorkingDirectory                     string                         `json:"OctopusWorkingDirectory,omitempty"`
	// contains filtered or unexported fields
}

func NewOfflinePackageDropEndpoint

func NewOfflinePackageDropEndpoint() *OfflinePackageDropEndpoint

func (OfflinePackageDropEndpoint) GetCommunicationStyle

func (e OfflinePackageDropEndpoint) GetCommunicationStyle() string

GetCommunicationStyle returns the communication style of this endpoint.

func (OfflinePackageDropEndpoint) Validate

func (e OfflinePackageDropEndpoint) Validate() error

Validate checks the state of the endpoint and returns an error if invalid.

type PollingTentacleEndpoint

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

func NewPollingTentacleEndpoint

func NewPollingTentacleEndpoint(uri *url.URL, thumbprint string) *PollingTentacleEndpoint

func (PollingTentacleEndpoint) MarshalJSON

func (p PollingTentacleEndpoint) MarshalJSON() ([]byte, error)

func (*PollingTentacleEndpoint) UnmarshalJSON

func (p *PollingTentacleEndpoint) UnmarshalJSON(b []byte) error

UnmarshalJSON sets this tentacle endpoint to its representation in JSON.

func (*PollingTentacleEndpoint) Validate

func (l *PollingTentacleEndpoint) Validate() error

Validate checks the state of the listening tentacle endpoint and returns an error if invalid.

type SSHEndpoint

type SSHEndpoint struct {
	AccountID          string `json:"AccountId,omitempty"`
	DotNetCorePlatform string
	Fingerprint        string
	Host               string
	ProxyID            string `json:"ProxyId,omitempty"`
	Port               int
	URI                *url.URL `json:"Uri"`
	// contains filtered or unexported fields
}

SSHEndpoint contains the information necessary to communicate with an SSH endpoint. If a private key file is provided it will be used; otherwise we fall back to username/password.

func NewSSHEndpoint

func NewSSHEndpoint(host string, port int, fingerprint string) *SSHEndpoint

NewSSHEndpoint creates and initializes a new SSH endpoint.

func (*SSHEndpoint) GetAccountID

func (s *SSHEndpoint) GetAccountID() string

GetAccountID returns the account ID associated with this SSH endpoint.

func (*SSHEndpoint) GetCommunicationStyle

func (s *SSHEndpoint) GetCommunicationStyle() string

GetCommunicationStyle returns the communication style of this endpoint.

func (*SSHEndpoint) GetFingerprint

func (s *SSHEndpoint) GetFingerprint() string

GetFingerprint returns the fingerprint associated with this SSH endpoint.

func (*SSHEndpoint) GetHost

func (s *SSHEndpoint) GetHost() string

GetHost returns the host associated with this SSH endpoint.

func (*SSHEndpoint) GetProxyID

func (s *SSHEndpoint) GetProxyID() string

GetProxyID returns the proxy ID associated with this SSH endpoint.

func (*SSHEndpoint) MarshalJSON

func (s *SSHEndpoint) MarshalJSON() ([]byte, error)

func (*SSHEndpoint) SetProxyID

func (s *SSHEndpoint) SetProxyID(proxyID string)

SetProxyID sets the proxy ID associated with this SSH endpoint.

func (*SSHEndpoint) UnmarshalJSON

func (s *SSHEndpoint) UnmarshalJSON(b []byte) error

UnmarshalJSON sets this SSH endpoint to its representation in JSON.

func (*SSHEndpoint) Validate

func (s *SSHEndpoint) Validate() error

Validate checks the state of the SSH endpoint and returns an error if invalid.

type TentacleEndpointConfiguration added in v2.42.1

type TentacleEndpointConfiguration struct {
	CertificateSignatureAlgorithm string   `json:"CertificateSignatureAlgorithm,omitempty"`
	Thumbprint                    string   `json:"Thumbprint" validate:"required"`
	URI                           *url.URL `json:"Uri" validate:"required,uri"`
	CommunicationMode             string   `json:"CommunicationMode" validate:"required,oneof=Polling Listening"`
}

func (TentacleEndpointConfiguration) MarshalJSON added in v2.42.1

func (l TentacleEndpointConfiguration) MarshalJSON() ([]byte, error)

func (*TentacleEndpointConfiguration) UnmarshalJSON added in v2.42.1

func (l *TentacleEndpointConfiguration) UnmarshalJSON(b []byte) error

type TentacleVersionDetails

type TentacleVersionDetails struct {
	UpgradeLocked    bool   `json:"UpgradeLocked"`
	UpgradeSuggested bool   `json:"UpgradeSuggested"`
	UpgradeRequired  bool   `json:"UpgradeRequired"`
	Version          string `json:"Version"`
}

func NewTentacleVersionDetails

func NewTentacleVersionDetails(version string, upgradeLocked bool, upgradeSuggested bool, upgradeRequired bool) *TentacleVersionDetails

NewTentacleVersionDetails creates and initializes tentacle version details.

type Worker

type Worker struct {
	SpaceID       string   `json:"SpaceId,omitempty"`
	WorkerPoolIDs []string `json:"WorkerPoolIds,omitempty"`
	// contains filtered or unexported fields
}

func NewWorker

func NewWorker(name string, endpoint IEndpoint) *Worker

func (*Worker) GetSpaceID

func (w *Worker) GetSpaceID() string

GetSpaceID returns the space ID that is associated with this worker.

func (*Worker) MarshalJSON

func (w *Worker) MarshalJSON() ([]byte, error)

MarshalJSON returns a worker as its JSON encoding.

func (*Worker) SetSpaceID

func (w *Worker) SetSpaceID(spaceID string)

SetSpaceID sets the space ID that is associated with this worker.

func (*Worker) UnmarshalJSON

func (w *Worker) UnmarshalJSON(b []byte) error

UnmarshalJSON sets this worker to its representation in JSON.

func (Worker) Validate

func (m Worker) Validate() error

Validate checks the state of the machine and returns an error if invalid.

type WorkerService

type WorkerService struct {
	services.CanDeleteService
	// contains filtered or unexported fields
}

func NewWorkerService

func NewWorkerService(sling *sling.Sling, uriTemplate string, discoverWorkerPath string, operatingSystemsPath string, shellsPath string) *WorkerService

func (*WorkerService) Add deprecated

func (s *WorkerService) Add(worker *Worker) (*Worker, error)

Add creates a new worker.

Deprecated: use workers.Add

func (*WorkerService) Get added in v2.16.1

func (s *WorkerService) Get(workersQuery WorkersQuery) (*resources.Resources[*Worker], error)

Get returns a collection of machines based on the criteria defined by its input query parameter. If an error occurs, an empty collection is returned along with the associated error.

func (*WorkerService) GetAll deprecated

func (s *WorkerService) GetAll() ([]*Worker, error)

GetAll returns all workers. If none can be found or an error occurs, it returns an empty collection.

Deprecated: use workers.GetAll

func (*WorkerService) GetByID deprecated

func (s *WorkerService) GetByID(id string) (*Worker, error)

GetByID returns the worker that matches the input ID. If one cannot be found, it returns nil and an error.

Deprecated: use workers.GetByID

func (*WorkerService) GetByIDs

func (s *WorkerService) GetByIDs(ids []string) ([]*Worker, error)

GetByIDs returns the workers that match the input IDs.

func (*WorkerService) GetByIdentifier added in v2.16.1

func (s *WorkerService) GetByIdentifier(identifier string) (*Worker, error)

GetByIdentifier returns the worker with a matching ID or name.

func (*WorkerService) GetByName

func (s *WorkerService) GetByName(name string) ([]*Worker, error)

GetByName returns the workers with a matching partial name.

func (*WorkerService) GetByPartialName

func (s *WorkerService) GetByPartialName(partialName string) ([]*Worker, error)

GetByPartialName performs a lookup and returns environments with a matching partial name.

func (*WorkerService) GetWorkerOperatingSystems

func (s *WorkerService) GetWorkerOperatingSystems() ([]string, error)

func (*WorkerService) GetWorkerShells

func (s *WorkerService) GetWorkerShells() ([]string, error)

func (*WorkerService) Update deprecated

func (s *WorkerService) Update(worker *Worker) (*Worker, error)

Update modifies a worker based on the one provided as input.

Deprecated: use workers.Update

type WorkersQuery

type WorkersQuery struct {
	CommunicationStyles []string `uri:"commStyles,omitempty" url:"commStyles,omitempty"`
	HealthStatuses      []string `uri:"healthStatuses,omitempty" url:"healthStatuses,omitempty"`
	IDs                 []string `uri:"ids,omitempty" url:"ids,omitempty"`
	IsDisabled          bool     `uri:"isDisabled,omitempty" url:"isDisabled,omitempty"`
	Name                string   `uri:"name,omitempty" url:"name,omitempty"`
	PartialName         string   `uri:"partialName,omitempty" url:"partialName,omitempty"`
	ShellNames          []string `uri:"shellNames,omitempty" url:"shellNames,omitempty"`
	Skip                int      `uri:"skip,omitempty" url:"skip,omitempty"`
	Take                int      `uri:"take,omitempty" url:"take,omitempty"`
	Thumbprint          string   `uri:"thumbprint,omitempty" url:"thumbprint,omitempty"`
	WorkerPoolIDs       []string `uri:"workerPoolIds" url:"workerPoolIds,omitempty"`
}

Source Files

Jump to

Keyboard shortcuts

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