octopusdeploy

package
v1.6.3 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2020 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DeploymentStepPackageRequirement_LetOctopusDecide         = DeploymentStepPackageRequirement("LetOctopusDecide")
	DeploymentStepPackageRequirement_BeforePackageAcquisition = DeploymentStepPackageRequirement("BeforePackageAcquisition")
	DeploymentStepPackageRequirement_AfterPackageAcquisition  = DeploymentStepPackageRequirement("AfterPackageAcquisition")
)
View Source
const (
	DeploymentStepCondition_Success  = DeploymentStepCondition("Success")
	DeploymentStepCondition_Failure  = DeploymentStepCondition("Failure")
	DeploymentStepCondition_Always   = DeploymentStepCondition("Always")
	DeploymentStepCondition_Variable = DeploymentStepCondition("Variable")
)
View Source
const (
	DeploymentStepStartTrigger_StartAfterPrevious = DeploymentStepStartTrigger("StartAfterPrevious")
	DeploymentStepStartTrigger_StartWithPrevious  = DeploymentStepStartTrigger("StartWithPrevious")
)
View Source
const (
	PackageAcquisitionLocation_Server          = "Server"
	PackageAcquisitionLocation_ExecutionTarget = "ExecutionTarget"
	PackageAcquisitionLocation_NotAcquired     = "NotAcquired"
)
View Source
const (
	VariableSetContentType_Variables    = VariableSetContentType("Variables")
	VariableSetContentType_ScriptModule = VariableSetContentType("ScriptModule")
)
View Source
const (
	RetentionUnit_Days  = RetentionUnit("Days")
	RetentionUnit_Items = RetentionUnit("Items")
)
View Source
const ManualInterventionDecline = "Abort"
View Source
const ManualInterverventionApprove = "Proceed"

Variables

View Source
var ErrItemNotFound = errors.New("cannot find the item")

ErrItemNotFound is an OctopusDeploy error returned an item cannot be found.

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

ValidMachineStatuses provides options for valid machine status

View Source
var ValidProjectConnectivityPolicySkipMachineBehaviors = []string{
	"SkipUnavailableMachines", "None",
}

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 APIErrorChecker

func APIErrorChecker(urlPath string, resp *http.Response, wantedResponseCode int, slingError error, octopusDeployError *APIError) error

APIErrorChecker is a generic error handler for the OctopusDeploy API.

func AccountTypeNames

func AccountTypeNames() []string

AccountTypeNames returns a list of possible string values of AccountType.

func LoadNextPage

func LoadNextPage(pagedResults PagedResults) (string, bool)

LoadNextPage checks if the next page should be loaded from the API. Returns the new path and a bool if the next page should be checked.

func PrettyJson

func PrettyJson(data interface{}) (string, error)

func TenantedDeploymentModeNames

func TenantedDeploymentModeNames() []string

TenantedDeploymentModeNames returns a list of possible string values of TenantedDeploymentMode.

func ValidateChannelValues

func ValidateChannelValues(Channel *Channel) error

ValidateChannelValues checks the values of a Channel object to see if they are suitable for sending to Octopus Deploy. Used when adding or updating channels.

func ValidateLibraryVariableSetValues

func ValidateLibraryVariableSetValues(LibraryVariableSet *LibraryVariableSet) error

ValidateLibraryVariableSetValues checks the values of a LibraryVariableSet object to see if they are suitable for sending to Octopus Deploy. Used when adding or updating libraryVariableSets.

func ValidateLifecycleValues

func ValidateLifecycleValues(Lifecycle *Lifecycle) error

ValidateLifecycleValues checks the values of a Lifecycle object to see if they are suitable for sending to Octopus Deploy. Used when adding or updating lifecycles.

func ValidateMachineValues

func ValidateMachineValues(Machine *Machine) error

ValidateMachineValues checks the values of a Machine object to see if they are suitable for sending to Octopus Deploy. Used when adding or updating machines.

func ValidateMultipleProperties

func ValidateMultipleProperties(validatePropertyErrors []error) error

ValidateMultipleProperties returns the first error in a list of property validations

func ValidateProjectValues

func ValidateProjectValues(Project *Project) error

ValidateProjectValues checks the values of a Project object to see if they are suitable for sending to Octopus Deploy. Used when adding or updating projects.

func ValidatePropertiesMatch

func ValidatePropertiesMatch(firstProperty, firstPropertyName, secondProperty, secondPropertyName string) error

ValidatePropertiesMatch checks two values against each other

func ValidatePropertyValues

func ValidatePropertyValues(propertyName string, propertyValue string, validValues []string) error

ValidatePropertyValues returns an error if the given string is not in a slice of strings

func ValidateRequiredPropertyValue

func ValidateRequiredPropertyValue(propertyName string, propertyValue string) error

ValidateRequiredPropertyValue returns an error if the property value is empty

func ValidateStringInSlice

func ValidateStringInSlice(str string, list []string) bool

ValidateStringInSlice checks if a string is in the given slice

func ValidateTenantValues

func ValidateTenantValues(tenant *Tenant) error

Types

type APIError

type APIError struct {
	ErrorMessage  string   `json:"ErrorMessage"`
	Errors        []string `json:"Errors"`
	FullException string   `json:"FullException"`
}

func (APIError) Error

func (e APIError) Error() string

type Account

type Account struct {
	ID                              string                 `json:"Id"`
	AccountType                     AccountType            `json:"AccountType"`
	Description                     string                 `json:"Description,omitempty"`
	EnvironmentIDs                  []string               `json:"EnvironmentIds,omitempty"`
	Name                            string                 `json:"Name" validate:"required"`
	TenantedDeploymentParticipation TenantedDeploymentMode `json:"TenantedDeploymentParticipation"`
	TenantTags                      []string               `json:"TenantTags,omitempty"`
	Token                           SensitiveValue         `json:"Token,omitempty"`

	AzureEnvironment                  string         `json:"AzureEnvironment,omitempty"`
	ActiveDirectoryEndpointBaseURI    string         `json:"ActiveDirectoryEndpointBaseUri,omitempty"`
	ClientID                          string         `json:"ClientId,omitempty"`
	Password                          SensitiveValue `json:"Password,omitempty"`
	ResourceManagementEndpointBaseURI string         `json:"ResourceManagementEndpointBaseUri,omitempty"`
	SubscriptionNumber                string         `json:"SubscriptionNumber,omitempty"`
	TenantID                          string         `json:"TenantId,omitempty"`
}

func NewAccount

func NewAccount(name string, accountType AccountType) *Account

func (*Account) Validate

func (t *Account) Validate() error

type AccountService

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

func NewAccountService

func NewAccountService(sling *sling.Sling) *AccountService

func (*AccountService) Add

func (s *AccountService) Add(account *Account) (*Account, error)

func (*AccountService) Delete

func (s *AccountService) Delete(accountId string) error

func (*AccountService) Get

func (s *AccountService) Get(accountId string) (*Account, error)

func (*AccountService) GetAll

func (s *AccountService) GetAll() (*[]Account, error)

func (*AccountService) GetByName

func (s *AccountService) GetByName(accountName string) (*Account, error)

func (*AccountService) Update

func (s *AccountService) Update(account *Account) (*Account, error)

type AccountType

type AccountType int

AccountType indicates what type of account and Account object represents.

ENUM(

None
UsernamePassword
SshKeyPair
AzureSubscription
AzureServicePrincipal
AmazonWebServicesAccount
AmazonWebServicesRoleAccount

)

const (
	// None is a AccountType of type None
	None AccountType = iota
	// UsernamePassword is a AccountType of type UsernamePassword
	UsernamePassword
	// SshKeyPair is a AccountType of type SshKeyPair
	SshKeyPair
	// AzureSubscription is a AccountType of type AzureSubscription
	AzureSubscription
	// AzureServicePrincipal is a AccountType of type AzureServicePrincipal
	AzureServicePrincipal
	// AmazonWebServicesAccount is a AccountType of type AmazonWebServicesAccount
	AmazonWebServicesAccount
	// AmazonWebServicesRoleAccount is a AccountType of type AmazonWebServicesRoleAccount
	AmazonWebServicesRoleAccount
)

func ParseAccountType

func ParseAccountType(name string) (AccountType, error)

ParseAccountType attempts to convert a string to a AccountType

func (*AccountType) MarshalText

func (x *AccountType) MarshalText() ([]byte, error)

MarshalText implements the text marshaller method

func (AccountType) String

func (x AccountType) String() string

String implements the Stringer interface.

func (*AccountType) UnmarshalText

func (x *AccountType) UnmarshalText(text []byte) error

UnmarshalText implements the text unmarshaller method

type Accounts

type Accounts struct {
	Items []Account `json:"Items"`
	PagedResults
}

type ActionTemplateParameter

type ActionTemplateParameter struct {

	// default value
	DefaultValue PropertyValueResource `json:"DefaultValue,omitempty"`

	// display settings
	DisplaySettings map[string]string `json:"DisplaySettings,omitempty"`

	// help text
	HelpText string `json:"HelpText,omitempty"`

	// Id
	ID string `json:"Id,omitempty"`

	// label
	Label string `json:"Label,omitempty"`

	// last modified by
	LastModifiedBy string `json:"LastModifiedBy,omitempty"`

	// last modified on
	// Format: date-time
	LastModifiedOn string `json:"LastModifiedOn,omitempty"` // datetime

	// links
	Links Links `json:"Links,omitempty"`

	// name
	Name string `json:"Name,omitempty"`
}

type AutoDeployReleaseOverride

type AutoDeployReleaseOverride struct {

	// environment Id
	// Read Only: true
	EnvironmentID string `json:"EnvironmentId,omitempty"`

	// release Id
	// Read Only: true
	ReleaseID string `json:"ReleaseId,omitempty"`

	// tenant Id
	// Read Only: true
	TenantID string `json:"TenantId,omitempty"`
}

type Certificate

type Certificate struct {
	ID                              string                 `json:"Id,omitempty"`
	Name                            string                 `json:"Name,omitempty"`
	Notes                           string                 `json:"Notes,omitempty"`
	CertificateData                 SensitiveValue         `json:"CertificateData,omitempty"`
	Password                        SensitiveValue         `json:"Password,omitempty"`
	EnvironmentIds                  []string               `json:"EnvironmentIds,omitempty"`
	TenantedDeploymentParticipation TenantedDeploymentMode `json:"TenantedDeploymentParticipation,omitempty"`
	TenantIds                       []string               `json:"TenantIds,omitempty,omitempty"`
	TenantTags                      []string               `json:"TenantTags,omitempty,omitempty"`
	CertificateDataFormat           string                 `json:"CertificateDataFormat,omitempty"`
	Archived                        string                 `json:"Archived,omitempty"`
	ReplacedBy                      string                 `json:"ReplacedBy,omitempty"`
	SubjectDistinguishedName        string                 `json:"SubjectDistinguishedName,omitempty"`
	SubjectCommonName               string                 `json:"SubjectCommonName,omitempty"`
	SubjectOrganization             string                 `json:"SubjectOrganization,omitempty"`
	IssuerDistinguishedName         string                 `json:"IssuerDistinguishedName,omitempty"`
	IssuerCommonName                string                 `json:"IssuerCommonName,omitempty"`
	IssuerOrganization              string                 `json:"IssuerOrganization,omitempty"`
	SelfSigned                      bool                   `json:"SelfSigned,omitempty"`
	Thumbprint                      string                 `json:"Thumbprint,omitempty"`
	NotAfter                        string                 `json:"NotAfter,omitempty"`
	NotBefore                       string                 `json:"NotBefore,omitempty"`
	IsExpired                       bool                   `json:"IsExpired,omitempty"`
	HasPrivateKey                   bool                   `json:"HasPrivateKey,omitempty"`
	Version                         int                    `json:"Version,omitempty"`
	SerialNumber                    string                 `json:"SerialNumber,omitempty"`
	SignatureAlgorithmName          string                 `json:"SignatureAlgorithmName,omitempty"`
	SubjectAlternativeNames         []string               `json:"SubjectAlternativeNames,omitempty"`
}

func NewCertificate

func NewCertificate(name string, certificateData SensitiveValue, password SensitiveValue) *Certificate

func (*Certificate) Validate

func (t *Certificate) Validate() error

type CertificateReplace

type CertificateReplace struct {
	CertificateData string `json:"CertificateData,omitempty"`
	Password        string `json:"Password,omitempty"`
}

func NewCertificateReplace

func NewCertificateReplace(certificateData string, password string) *CertificateReplace

type CertificateService

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

func NewCertificateService

func NewCertificateService(sling *sling.Sling) *CertificateService

func (*CertificateService) Add

func (s *CertificateService) Add(certificate *Certificate) (*Certificate, error)

func (*CertificateService) Delete

func (s *CertificateService) Delete(certificateId string) error

func (*CertificateService) Get

func (s *CertificateService) Get(certificateId string) (*Certificate, error)

func (*CertificateService) GetAll

func (s *CertificateService) GetAll() (*[]Certificate, error)

func (*CertificateService) GetByName

func (s *CertificateService) GetByName(certificateName string) (*Certificate, error)

func (*CertificateService) Replace

func (s *CertificateService) Replace(certificateId string, certificateReplace *CertificateReplace) (*Certificate, error)

func (*CertificateService) Update

func (s *CertificateService) Update(certificate *Certificate) (*Certificate, error)

type Certificates

type Certificates struct {
	Items []Certificate `json:"Items"`
	PagedResults
}

type Channel

type Channel struct {
	Description string        `json:"Description"`
	ID          string        `json:"Id,omitempty"`
	IsDefault   bool          `json:"IsDefault"`
	LifecycleID string        `json:"LifecycleId"`
	Name        string        `json:"Name"`
	ProjectID   string        `json:"ProjectId"`
	Rules       []ChannelRule `json:"Rules,omitempty"`
	TenantTags  []string      `json:"TenantedDeploymentMode,omitempty"`
}

func NewChannel

func NewChannel(name, description, projectID string) *Channel

type ChannelRule

type ChannelRule struct {
	// name of Package step(s) this rule applies to
	Actions []string `json:"Actions,omitempty"`

	// Id
	ID string `json:"Id,omitempty"`

	// Pre-release tag
	Tag string `json:"Tag,omitempty"`

	//Use the NuGet or Maven versioning syntax (depending on the feed type)
	//to specify the range of versions to include
	VersionRange string `json:"VersionRange,omitempty"`
}

type ChannelService

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

func NewChannelService

func NewChannelService(sling *sling.Sling) *ChannelService

func (*ChannelService) Add

func (s *ChannelService) Add(channel *Channel) (*Channel, error)

Add adds a new channel

func (*ChannelService) Delete

func (s *ChannelService) Delete(channelid string) error

Delete deletes an existing channel in Octopus Deploy

func (*ChannelService) Get

func (s *ChannelService) Get(channelID string) (*Channel, error)

func (*ChannelService) GetAll

func (s *ChannelService) GetAll() (*[]Channel, error)

func (*ChannelService) Update

func (s *ChannelService) Update(channel *Channel) (*Channel, error)

Update updates an existing channel in Octopus Deploy

type Channels

type Channels struct {
	Items []Channel `json:"Items"`
	PagedResults
}

func (*Channels) Validate

func (d *Channels) Validate() error

type Client

type Client struct {

	// Octopus Deploy API Services
	Account            *AccountService
	Certificate        *CertificateService
	DeploymentProcess  *DeploymentProcessService
	ProjectGroup       *ProjectGroupService
	Project            *ProjectService
	ProjectTrigger     *ProjectTriggerService
	Environment        *EnvironmentService
	Feed               *FeedService
	Variable           *VariableService
	MachinePolicy      *MachinePolicyService
	Machine            *MachineService
	Lifecycle          *LifecycleService
	LibraryVariableSet *LibraryVariableSetService
	Interruption       *InterruptionsService
	TagSet             *TagSetService
	Tenant             *TenantService
	Space              *SpaceService
	Channel            *ChannelService
	// contains filtered or unexported fields
}

Client is an OctopusDeploy for making OctpusDeploy API requests.

func ForSpace

func ForSpace(httpClient *http.Client, octopusURL, octopusAPIKey string, space *Space) *Client

func NewClient

func NewClient(httpClient *http.Client, octopusURL, octopusAPIKey string) *Client

NewClient returns a new Client.

type DeploymentAction

type DeploymentAction struct {
	ID                            string             `json:"Id,omitempty"`
	Name                          string             `json:"Name"`
	ActionType                    string             `json:"ActionType"`
	IsDisabled                    bool               `json:"IsDisabled"`
	IsRequired                    bool               `json:"IsRequired"`
	WorkerPoolId                  string             `json:"WorkerPoolId,omitempty"`
	CanBeUsedForProjectVersioning bool               `json:"CanBeUsedForProjectVersioning"`
	Environments                  []string           `json:"Environments,omitempty"`
	ExcludedEnvironments          []string           `json:"ExcludedEnvironments,omitempty"`
	Channels                      []string           `json:"Channels,omitempty"`
	TenantTags                    []string           `json:"TenantTags,omitempty"`
	Properties                    map[string]string  `json:"Properties"` // TODO: refactor to use the PropertyValueResource for handling sensitive values - https://blog.gopheracademy.com/advent-2016/advanced-encoding-decoding/
	Packages                      []PackageReference `json:"Packages,omitempty"`
}

type DeploymentProcess

type DeploymentProcess struct {
	ID             string           `json:"Id,omitempty"`
	LastModifiedBy string           `json:"LastModifiedBy,omitempty"`
	LastModifiedOn string           `json:"LastModifiedOn,omitempty"`
	LastSnapshotID string           `json:"LastSnapshotId,omitempty"`
	Links          Links            `json:"Links,omitempty"`
	ProjectID      string           `json:"ProjectId,omitempty"`
	Steps          []DeploymentStep `json:"Steps,omitempty"`
	Version        int32            `json:"Version"`
}

func (*DeploymentProcess) Validate

func (d *DeploymentProcess) Validate() error

type DeploymentProcessService

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

func NewDeploymentProcessService

func NewDeploymentProcessService(sling *sling.Sling) *DeploymentProcessService

func (*DeploymentProcessService) Get

func (s *DeploymentProcessService) Get(deploymentProcessID string) (*DeploymentProcess, error)

func (*DeploymentProcessService) GetAll

func (*DeploymentProcessService) Update

func (s *DeploymentProcessService) Update(deploymentProcess *DeploymentProcess) (*DeploymentProcess, error)

type DeploymentProcesses

type DeploymentProcesses struct {
	Items []DeploymentProcess `json:"Items"`
	PagedResults
}

type DeploymentStep

type DeploymentStep struct {
	ID                 string                           `json:"Id,omitempty"`
	Name               string                           `json:"Name"`
	PackageRequirement DeploymentStepPackageRequirement `json:"PackageRequirement,omitempty"`                                         // may need its own model / enum
	Properties         map[string]string                `json:"Properties"`                                                           // TODO: refactor to use the PropertyValueResource for handling sensitive values - https://blog.gopheracademy.com/advent-2016/advanced-encoding-decoding/
	Condition          DeploymentStepCondition          `json:"Condition,omitempty" validate:"oneof=Success Failure Always Variable"` // variable option adds a Property "Octopus.Action.ConditionVariableExpression"
	StartTrigger       DeploymentStepStartTrigger       `json:"StartTrigger,omitempty" validate:"oneof=StartAfterPrevious StartWithPrevious"`
	Actions            []DeploymentAction               `json:"Actions,omitempty"`
}

type DeploymentStepCondition

type DeploymentStepCondition string

type DeploymentStepPackageRequirement

type DeploymentStepPackageRequirement string

type DeploymentStepStartTrigger

type DeploymentStepStartTrigger string

type Environment

type Environment struct {
	ID                         string `json:"Id"`
	Name                       string `json:"Name"`
	Description                string `json:"Description"`
	SortOrder                  int    `json:"SortOrder"`
	UseGuidedFailure           bool   `json:"UseGuidedFailure"`
	AllowDynamicInfrastructure bool   `json:"AllowDynamicInfrastructure"`
}

func NewEnvironment

func NewEnvironment(name, description string, useguidedfailure bool) *Environment

func (*Environment) Validate

func (t *Environment) Validate() error

type EnvironmentService

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

func NewEnvironmentService

func NewEnvironmentService(sling *sling.Sling) *EnvironmentService

func (*EnvironmentService) Add

func (s *EnvironmentService) Add(environment *Environment) (*Environment, error)

func (*EnvironmentService) Delete

func (s *EnvironmentService) Delete(environmentid string) error

func (*EnvironmentService) Get

func (s *EnvironmentService) Get(environmentid string) (*Environment, error)

func (*EnvironmentService) GetAll

func (s *EnvironmentService) GetAll() (*[]Environment, error)

func (*EnvironmentService) GetByName

func (s *EnvironmentService) GetByName(environmentName string) (*Environment, error)

func (*EnvironmentService) Update

func (s *EnvironmentService) Update(environment *Environment) (*Environment, error)

type Environments

type Environments struct {
	Items []Environment `json:"Items"`
	PagedResults
}

type Feed

type Feed struct {
	ID                          string         `json:"Id"`
	Name                        string         `json:"Name"`
	FeedType                    string         `json:"FeedType"`
	DownloadAttempts            int            `json:"DownloadAttempts"`
	DownloadRetryBackoffSeconds int            `json:"DownloadRetryBackoffSeconds"`
	FeedUri                     string         `json:"FeedUri"`
	EnhancedMode                bool           `json:"EnhancedMode"`
	Username                    string         `json:"Username"`
	Password                    SensitiveValue `json:"Password"`
}

func NewFeed

func NewFeed(name, feedType string, feedUri string) *Feed

func (*Feed) Validate

func (t *Feed) Validate() error

type FeedService

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

func NewFeedService

func NewFeedService(sling *sling.Sling) *FeedService

func (*FeedService) Add

func (s *FeedService) Add(feed *Feed) (*Feed, error)

func (*FeedService) Delete

func (s *FeedService) Delete(feedId string) error

func (*FeedService) Get

func (s *FeedService) Get(feedId string) (*Feed, error)

func (*FeedService) GetAll

func (s *FeedService) GetAll() (*[]Feed, error)

func (*FeedService) GetByName

func (s *FeedService) GetByName(feedName string) (*Feed, error)

func (*FeedService) Update

func (s *FeedService) Update(feed *Feed) (*Feed, error)

type Feeds

type Feeds struct {
	Items []Feed `json:"Items"`
	PagedResults
}

type Interruption

type Interruption struct {
	ID        string    `json:"Id"`
	Title     string    `json:"Title"`
	Created   time.Time `json:"Created"`
	IsPending bool      `json:"IsPending"`
	Form      struct {
		Values struct {
			AdditionalProp1 string `json:"additionalProp1"`
			AdditionalProp2 string `json:"additionalProp2"`
			AdditionalProp3 string `json:"additionalProp3"`
		} `json:"Values"`
		Elements []struct {
			Name    string `json:"Name"`
			Control struct {
			} `json:"Control"`
			IsValueRequired bool `json:"IsValueRequired"`
		} `json:"Elements"`
	} `json:"Form"`
	RelatedDocumentIds          []string          `json:"RelatedDocumentIds"`
	ResponsibleTeamIds          []string          `json:"ResponsibleTeamIds"`
	ResponsibleUserID           string            `json:"ResponsibleUserId"`
	CanTakeResponsibility       bool              `json:"CanTakeResponsibility"`
	HasResponsibility           bool              `json:"HasResponsibility"`
	TaskID                      string            `json:"TaskId"`
	CorrelationID               string            `json:"CorrelationId"`
	IsLinkedToOtherInterruption bool              `json:"IsLinkedToOtherInterruption"`
	LastModifiedOn              time.Time         `json:"LastModifiedOn"`
	LastModifiedBy              string            `json:"LastModifiedBy"`
	Links                       InterruptionLinks `json:"Links"`
}
type InterruptionLinks struct {
	Self        string `json:"Self"`
	Submit      string `json:"Submit"`
	Responsible string `json:"Responsible"`
}

type InterruptionSubmitRequest

type InterruptionSubmitRequest struct {
	Instructions string `json:"Instructions"`
	Notes        string `json:"Notes"`
	Result       string `json:"Result"`
}

type Interruptions

type Interruptions struct {
	Items []Interruption `json:"Items"`
	PagedResults
}

type InterruptionsService

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

func NewInterruptionService

func NewInterruptionService(sling *sling.Sling) *InterruptionsService

func (*InterruptionsService) Get

Get returns the interruption matching the id

func (*InterruptionsService) GetAll

func (s *InterruptionsService) GetAll() ([]Interruption, error)

GetAll returns all interruptions in Octopus Deploy

func (*InterruptionsService) GetResponsability

func (s *InterruptionsService) GetResponsability(i *Interruption) (*User, error)

GetResponsability Gets the user that is currently responsible for this interruption.

func (*InterruptionsService) Submit

Submit Submits a dictionary of form values for the interruption. Only the user with responsibility for this interruption can submit this form.

func (*InterruptionsService) TakeResponsability

func (s *InterruptionsService) TakeResponsability(i *Interruption) (*User, error)

TakeResponsability Allows the current user to take responsibility for this interruption. Only users in one of the responsible teams on this interruption can take responsibility for it.

type LibraryVariableSet

type LibraryVariableSet struct {
	ID            string                    `json:"Id,omitempty"`
	Name          string                    `json:"Name" validate:"required"`
	Description   string                    `json:"Description,omitempty"`
	VariableSetId string                    `json:"VariableSetId,omitempty"`
	ContentType   VariableSetContentType    `json:"ContentType" validate:"required"`
	Templates     []ActionTemplateParameter `json:"Templates,omitempty"`
}

func NewLibraryVariableSet

func NewLibraryVariableSet(name string) *LibraryVariableSet

type LibraryVariableSetService

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

func NewLibraryVariableSetService

func NewLibraryVariableSetService(sling *sling.Sling) *LibraryVariableSetService

func (*LibraryVariableSetService) Add

func (s *LibraryVariableSetService) Add(libraryVariableSet *LibraryVariableSet) (*LibraryVariableSet, error)

Add adds an new libraryVariableSet in Octopus Deploy

func (*LibraryVariableSetService) Delete

func (s *LibraryVariableSetService) Delete(libraryVariableSetid string) error

Delete deletes an existing libraryVariableSet in Octopus Deploy

func (*LibraryVariableSetService) Get

func (s *LibraryVariableSetService) Get(libraryVariableSetID string) (*LibraryVariableSet, error)

Get returns a single LibraryVariableSet by its Id in Octopus Deploy

func (*LibraryVariableSetService) GetAll

GetAll returns all libraryVariableSets in Octopus Deploy

func (*LibraryVariableSetService) GetByName

GetByName gets an existing Library Variable Set by its name in Octopus Deploy

func (*LibraryVariableSetService) Update

func (s *LibraryVariableSetService) Update(libraryVariableSet *LibraryVariableSet) (*LibraryVariableSet, error)

Update updates an existing libraryVariableSet in Octopus Deploy

type LibraryVariableSets

type LibraryVariableSets struct {
	Items []LibraryVariableSet `json:"Items"`
	PagedResults
}

type Lifecycle

type Lifecycle struct {
	ID                      string          `json:"Id,omitempty"`
	Name                    string          `json:"Name" validate:"required"`
	Description             string          `json:"Description,omitempty"`
	ReleaseRetentionPolicy  RetentionPeriod `json:"ReleaseRetentionPolicy,omitempty"`
	TentacleRetentionPolicy RetentionPeriod `json:"TentacleRetentionPolicy,omitempty"`
	Phases                  []Phase         `json:"Phases"`
}

func NewLifecycle

func NewLifecycle(name string) *Lifecycle

type LifecycleService

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

func NewLifecycleService

func NewLifecycleService(sling *sling.Sling) *LifecycleService

func (*LifecycleService) Add

func (s *LifecycleService) Add(lifecycle *Lifecycle) (*Lifecycle, error)

Add adds an new lifecycle in Octopus Deploy

func (*LifecycleService) Delete

func (s *LifecycleService) Delete(lifecycleid string) error

Delete deletes an existing lifecycle in Octopus Deploy

func (*LifecycleService) Get

func (s *LifecycleService) Get(LifecycleID string) (*Lifecycle, error)

Get returns a single lifecycle by its lifecycleid in Octopus Deploy

func (*LifecycleService) GetAll

func (s *LifecycleService) GetAll() (*[]Lifecycle, error)

GetAll returns all lifecycles in Octopus Deploy

func (*LifecycleService) GetByName

func (s *LifecycleService) GetByName(lifecycleName string) (*Lifecycle, error)

GetByName gets an existing lifecycle by its lifecycle name in Octopus Deploy

func (*LifecycleService) Update

func (s *LifecycleService) Update(lifecycle *Lifecycle) (*Lifecycle, error)

Update updates an existing lifecycle in Octopus Deploy

type Lifecycles

type Lifecycles struct {
	Items []Lifecycle `json:"Items"`
	PagedResults
}
type Links struct {
	Self        string `json:"Self"`
	Template    string `json:"Template"`
	PageAll     string `json:"Page.All"`
	PageCurrent string `json:"Page.Current"`
	PageLast    string `json:"Page.Last"`
	PageNext    string `json:"Page.Next"`
}

type Machine

type Machine struct {
	ID                              string                 `json:"Id"`
	Name                            string                 `json:"Name"`
	Thumbprint                      string                 `json:"Thumbprint"`
	URI                             string                 `json:"Uri"`
	IsDisabled                      bool                   `json:"IsDisabled"`
	EnvironmentIDs                  []string               `json:"EnvironmentIds"`
	Roles                           []string               `json:"Roles"`
	MachinePolicyID                 string                 `json:"MachinePolicyId"`
	TenantedDeploymentParticipation TenantedDeploymentMode `json:"TenantedDeploymentParticipation"`
	TenantIDs                       []string               `json:"TenantIDs"`
	TenantTags                      []string               `json:"TenantTags"`
	Status                          string                 `json:"Status"`
	HasLatestCalamari               bool                   `json:"HasLatestCalamari"`
	StatusSummary                   string                 `json:"StatusSummary"`
	IsInProcess                     bool                   `json:"IsInProcess"`
	Endpoint                        *MachineEndpoint       `json:"Endpoint,omitempty"`
	LastModifiedOn                  *string                `json:"LastModifiedOn,omitempty"`
	LastModifiedBy                  *string                `json:"LastModifiedBy,omitempty"`
}

func NewMachine

func NewMachine(Name string, Disabled bool, EnvironmentIDs []string, Roles []string, MachinePolicyId string, TenantedDeploymentParticipation TenantedDeploymentMode, TenantIDs, TenantTags []string) *Machine

type MachineEndpoint

type MachineEndpoint struct {
	ID                     string                         `json:"Id"`
	CommunicationStyle     string                         `json:"CommunicationStyle"`
	ProxyID                *string                        `json:"ProxyId"`
	Thumbprint             string                         `json:"Thumbprint"`
	TentacleVersionDetails MachineTentacleVersionDetails  `json:"TentacleVersionDetails"`
	LastModifiedOn         *string                        `json:"LastModifiedOn,omitempty"`
	LastModifiedBy         *string                        `json:"LastModifiedBy,omitempty"`
	URI                    string                         `json:"Uri"`                 // This is not in the spec doc, but it shows up and needs to be kept in sync
	ClusterCertificate     string                         `json:"ClusterCertificate"`  // Kubernetes (not in spec doc)
	ClusterURL             string                         `json:"ClusterUrl"`          // Kubernetes (not in spec doc)
	Namespace              string                         `json:"Namespace"`           // Kubernetes (not in spec doc)
	SkipTLSVerification    string                         `json:"SkipTlsVerification"` // Kubernetes (not in spec doc)
	DefaultWorkerPoolID    string                         `json:"DefaultWorkerPoolId"`
	Authentication         *MachineEndpointAuthentication `json:"Authentication"`
}

type MachineEndpointAuthentication

type MachineEndpointAuthentication struct {
	AccountID          string `json:"AccountId"`
	ClientCertificate  string `json:"ClientCertificate"`
	AuthenticationType string `json:"AuthenticationType"`
}

type MachineHealthCheckPolicy

type MachineHealthCheckPolicy struct {
	TentacleEndpointHealthCheckPolicy map[string]string `json:"TentacleEndpointHealthCheckPolicy"`
	SSHEndpointHealthCheckPolicy      map[string]string `json:"SshEndpointHealthCheckPolicy"`
	HealthCheckInterval               string            `json:"HealthCheckInterval"`
}

type MachinePolicies

type MachinePolicies struct {
	Items []MachinePolicy `json:"Items"`
	PagedResults
}

type MachinePolicy

type MachinePolicy struct {
	ID                        string                   `json:"Id"`
	Name                      string                   `json:"Name"`
	Description               string                   `json:"Description"`
	IsDefault                 bool                     `json:"IsDefault"`
	MachineHealthCheckPolicy  MachineHealthCheckPolicy `json:"MachineHealthCheckPolicy"`
	MachineConnectivityPolicy map[string]string        `json:"MachineConnectivityPolicy"`
	MachineCleanupPolicy      map[string]string        `json:"MachineCleanupPolicy"`
	MachineUpdatePolicymap    map[string]string        `json:"MachineUpdatePolicymap"`
	LastModifiedOn            *string                  `json:"LastModifiedOn,omitempty"`
	LastModifiedBy            *string                  `json:"LastModifiedBy,omitempty"`
}

type MachinePolicyService

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

func NewMachinePolicyService

func NewMachinePolicyService(sling *sling.Sling) *MachinePolicyService

func (*MachinePolicyService) Get

func (s *MachinePolicyService) Get(MachinePolicyID string) (*MachinePolicy, error)

Get returns a single machine with a given MachineID

func (*MachinePolicyService) GetAll

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

GetAll returns all registered machines

type MachineService

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

func NewMachineService

func NewMachineService(sling *sling.Sling) *MachineService

func (*MachineService) Add

func (s *MachineService) Add(machine *Machine) (*Machine, error)

Add creates a new machine in Octopus Deploy

func (*MachineService) Delete

func (s *MachineService) Delete(MachineID string) error

Delete deletes an existing machine in Octopus Deploy

func (*MachineService) Get

func (s *MachineService) Get(MachineID string) (*Machine, error)

Get returns a single machine with a given MachineID

func (*MachineService) GetAll

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

GetAll returns all registered machines

func (*MachineService) GetByName

func (s *MachineService) GetByName(machineName string) (*Machine, error)

GetByName gets an existing machine by its name in Octopus Deploy

func (*MachineService) Update

func (s *MachineService) Update(machine *Machine) (*Machine, error)

Delete updates an existing machine in Octopus Deploy

type MachineTentacleVersionDetails

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

type Machines

type Machines struct {
	Items []Machine `json:"Items"`
	PagedResults
}

type PackageReference

type PackageReference struct {
	ID                  string            `json:"Id,omitempty"`
	Name                string            `json:"Name,omitempty"`
	PackageId           string            `json:"PackageId,omitempty"`
	FeedId              string            `json:"FeedId"`
	AcquisitionLocation string            `json:"AcquisitionLocation"` // This can be an expression
	Properties          map[string]string `json:"Properties"`
}

type PagedResults

type PagedResults struct {
	ItemType       string `json:"ItemType"`
	TotalResults   int    `json:"TotalResults"`
	NumberOfPages  int    `json:"NumberOfPages"`
	LastPageNumber int    `json:"LastPageNumber"`
	ItemsPerPage   int    `json:"ItemsPerPage"`
	IsStale        bool   `json:"IsStale"`
	Links          Links  `json:"Links"`
}

type Phase

type Phase struct {
	ID                                 string           `json:"Id,omitempty"`
	Name                               string           `json:"Name" validate:"required"`
	MinimumEnvironmentsBeforePromotion int32            `json:"MinimumEnvironmentsBeforePromotion"`
	IsOptionalPhase                    bool             `json:"IsOptionalPhase"`
	ReleaseRetentionPolicy             *RetentionPeriod `json:"ReleaseRetentionPolicy"`
	TentacleRetentionPolicy            *RetentionPeriod `json:"TentacleRetentionPolicy"`
	AutomaticDeploymentTargets         []string         `json:"AutomaticDeploymentTargets"`
	OptionalDeploymentTargets          []string         `json:"OptionalDeploymentTargets"`
}

type Project

type Project struct {
	AutoCreateRelease               bool                        `json:"AutoCreateRelease"`
	AutoDeployReleaseOverrides      []AutoDeployReleaseOverride `json:"AutoDeployReleaseOverrides"`
	DefaultGuidedFailureMode        string                      `json:"DefaultGuidedFailureMode,omitempty"`
	DefaultToSkipIfAlreadyInstalled bool                        `json:"DefaultToSkipIfAlreadyInstalled"`
	DeploymentProcessID             string                      `json:"DeploymentProcessId"`
	Description                     string                      `json:"Description"`
	DiscreteChannelRelease          bool                        `json:"DiscreteChannelRelease"`
	ID                              string                      `json:"Id,omitempty"`
	IncludedLibraryVariableSetIds   []string                    `json:"IncludedLibraryVariableSetIds"`
	IsDisabled                      bool                        `json:"IsDisabled"`
	LifecycleID                     string                      `json:"LifecycleId"`
	Name                            string                      `json:"Name"`
	ProjectConnectivityPolicy       ProjectConnectivityPolicy   `json:"ProjectConnectivityPolicy"`
	ProjectGroupID                  string                      `json:"ProjectGroupId"`
	ReleaseCreationStrategy         ReleaseCreationStrategy     `json:"ReleaseCreationStrategy"`
	Slug                            string                      `json:"Slug"`
	Templates                       []ActionTemplateParameter   `json:"Templates,omitempty"`
	TenantedDeploymentMode          TenantedDeploymentMode      `json:"TenantedDeploymentMode,omitempty"`
	VariableSetID                   string                      `json:"VariableSetId"`
	VersioningStrategy              VersioningStrategy          `json:"VersioningStrategy"`
}

func NewProject

func NewProject(name, lifeCycleID, projectGroupID string) *Project

type ProjectConnectivityPolicy

type ProjectConnectivityPolicy struct {
	AllowDeploymentsToNoTargets bool     `json:"AllowDeploymentsToNoTargets,omitempty"`
	TargetRoles                 []string `json:"TargetRoles,omitempty"`
	SkipMachineBehavior         string   `json:"SkipMachineBehavior,omitempty"`
}

type ProjectGroup

type ProjectGroup struct {
	Description       string   `json:"Description,omitempty"`
	EnvironmentIds    []string `json:"EnvironmentIds"`
	ID                string   `json:"Id,omitempty"`
	LastModifiedBy    string   `json:"LastModifiedBy,omitempty"`
	LastModifiedOn    string   `json:"LastModifiedOn,omitempty"`
	Links             Links    `json:"Links,omitempty"`
	Name              string   `json:"Name,omitempty" validate:"required"`
	RetentionPolicyID string   `json:"RetentionPolicyId,omitempty"`
}

func NewProjectGroup

func NewProjectGroup(name string) *ProjectGroup

func (*ProjectGroup) Validate

func (p *ProjectGroup) Validate() error

type ProjectGroupService

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

func NewProjectGroupService

func NewProjectGroupService(sling *sling.Sling) *ProjectGroupService

func (*ProjectGroupService) Add

func (s *ProjectGroupService) Add(projectGroup *ProjectGroup) (*ProjectGroup, error)

func (*ProjectGroupService) Delete

func (s *ProjectGroupService) Delete(projectGroupID string) error

func (*ProjectGroupService) Get

func (s *ProjectGroupService) Get(projectGroupID string) (*ProjectGroup, error)

func (*ProjectGroupService) GetAll

func (s *ProjectGroupService) GetAll() (*[]ProjectGroup, error)

func (*ProjectGroupService) Update

func (s *ProjectGroupService) Update(projectGroup *ProjectGroup) (*ProjectGroup, error)

type ProjectGroups

type ProjectGroups struct {
	Items []ProjectGroup `json:"Items"`
	PagedResults
}

type ProjectService

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

func NewProjectService

func NewProjectService(sling *sling.Sling) *ProjectService

func (*ProjectService) Add

func (s *ProjectService) Add(project *Project) (*Project, error)

Add adds an new project in Octopus Deploy

func (*ProjectService) Delete

func (s *ProjectService) Delete(projectid string) error

Delete deletes an existing project in Octopus Deploy

func (*ProjectService) Get

func (s *ProjectService) Get(projectid string) (*Project, error)

Get returns a single project by its projectid in Octopus Deploy

func (*ProjectService) GetAll

func (s *ProjectService) GetAll() (*[]Project, error)

GetAll returns all projects in Octopus Deploy

func (*ProjectService) GetByName

func (s *ProjectService) GetByName(projectName string) (*Project, error)

GetByName gets an existing project by its project name in Octopus Deploy

func (*ProjectService) Update

func (s *ProjectService) Update(project *Project) (*Project, error)

Update updates an existing project in Octopus Deploy

type ProjectTrigger

type ProjectTrigger struct {
	Action     ProjectTriggerAction `json:"Action"`
	Filter     ProjectTriggerFilter `json:"Filter"`
	ID         string               `json:"Id,omitempty"`
	IsDisabled bool                 `json:"IsDisabled,omitempty"`
	Name       string               `json:"Name"`
	ProjectID  string               `json:"ProjectId,omitempty"`
}

func NewProjectDeploymentTargetTrigger

func NewProjectDeploymentTargetTrigger(name, projectID string, shouldRedeploy bool, roles, eventGroups, eventCategories []string) *ProjectTrigger

func (*ProjectTrigger) AddEventCategories

func (t *ProjectTrigger) AddEventCategories(eventCategories []string)

func (*ProjectTrigger) AddEventGroups

func (t *ProjectTrigger) AddEventGroups(eventGroups []string)

type ProjectTriggerAction

type ProjectTriggerAction struct {
	ActionType                                 string `json:"ActionType"`
	DestinationEnvironmentID                   string `json:"DestinationEnvironmentId"`
	ShouldRedeployWhenMachineHasBeenDeployedTo bool   `json:"ShouldRedeployWhenMachineHasBeenDeployedTo"`
	SourceEnvironmentID                        string `json:"SourceEnvironmentId"`
}

type ProjectTriggerFilter

type ProjectTriggerFilter struct {
	DateOfMonth         string   `json:"DateOfMonth"`
	DayNumberOfMonth    string   `json:"DayNumberOfMonth"`
	DayOfWeek           string   `json:"DayOfWeek"`
	EnvironmentIds      []string `json:"EnvironmentIds,omitempty"`
	EventCategories     []string `json:"EventCategories,omitempty"`
	EventGroups         []string `json:"EventGroups,omitempty"`
	FilterType          string   `json:"FilterType"`
	MonthlyScheduleType string   `json:"MonthlyScheduleType"`
	Roles               []string `json:"Roles"`
	StartTime           string   `json:"StartTime"`
	Timezone            string   `json:"Timezone"`
}

type ProjectTriggerService

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

func NewProjectTriggerService

func NewProjectTriggerService(sling *sling.Sling) *ProjectTriggerService

func (*ProjectTriggerService) Add

func (s *ProjectTriggerService) Add(projectTrigger *ProjectTrigger) (*ProjectTrigger, error)

func (*ProjectTriggerService) Delete

func (s *ProjectTriggerService) Delete(projectTriggerID string) error

func (*ProjectTriggerService) Get

func (s *ProjectTriggerService) Get(projectTriggerID string) (*ProjectTrigger, error)

func (*ProjectTriggerService) GetAll

func (s *ProjectTriggerService) GetAll() (*[]ProjectTrigger, error)

func (*ProjectTriggerService) GetByProjectID

func (s *ProjectTriggerService) GetByProjectID(projectID string) (*[]ProjectTrigger, error)

func (*ProjectTriggerService) Update

func (s *ProjectTriggerService) Update(projectTrigger *ProjectTrigger) (*ProjectTrigger, error)

type ProjectTriggers

type ProjectTriggers struct {
	Items []ProjectTrigger `json:"Items"`
	PagedResults
}

type Projects

type Projects struct {
	Items []Project `json:"Items"`
	PagedResults
}

type PropertyValue

type PropertyValue string

type PropertyValueResource

type PropertyValueResource struct {
	*SensitiveValue
	*PropertyValue
}

func (PropertyValueResource) MarshalJSON

func (d PropertyValueResource) MarshalJSON() ([]byte, error)

func (*PropertyValueResource) UnmarshalJSON

func (d *PropertyValueResource) UnmarshalJSON(data []byte) error

type ReleaseCreationStrategy

type ReleaseCreationStrategy struct {
	ReleaseCreationPackageStepID string `json:"ReleaseCreationPackageStepId"`
	ChannelID                    string `json:"ChannelId"`
}

type RetentionPeriod

type RetentionPeriod struct {
	Unit              RetentionUnit `json:"Unit"`
	QuantityToKeep    int32         `json:"QuantityToKeep"`
	ShouldKeepForever bool          `json:"ShouldKeepForever"`
}

type RetentionUnit

type RetentionUnit string

type ScopeValue

type ScopeValue struct {
	ID   string `json:"Id"`
	Name string `json:"Name"`
}

type ScopeValues

type ScopeValues struct {
	Environments []ScopeValue `json:"Environments"`
	Machines     []ScopeValue `json:"Machines"`
	Actions      []ScopeValue `json:"Actions"`
	Roles        []ScopeValue `json:"Roles"`
	Channels     []ScopeValue `json:"Channels"`
	TenantTags   []ScopeValue `json:"TenantTags"`
}

type SensitiveValue

type SensitiveValue struct {
	HasValue bool   `json:"HasValue"`
	NewValue string `json:"NewValue"`
}

type Space

type Space struct {
	ID                 string   `json:"Id"`
	Name               string   `json:"Name"`
	Description        string   `json:"Description"`
	IsDefault          bool     `json:"IsDefault"`
	TaskQueueStopped   bool     `json:"TaskQueueStopped"`
	SpaceManagersTeams []string `json:"SpaceManagersTeams"`
}

func NewSpace

func NewSpace(name string) *Space

func (*Space) Validate

func (t *Space) Validate() error

type SpaceService

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

func NewSpaceService

func NewSpaceService(sling *sling.Sling) *SpaceService

func (*SpaceService) Add

func (s *SpaceService) Add(space *Space) (*Space, error)

func (*SpaceService) Delete

func (s *SpaceService) Delete(spaceId string) error

func (*SpaceService) Get

func (s *SpaceService) Get(spaceId string) (*Space, error)

func (*SpaceService) GetAll

func (s *SpaceService) GetAll() (*[]Space, error)

func (*SpaceService) GetByName

func (s *SpaceService) GetByName(spaceName string) (*Space, error)

func (*SpaceService) Update

func (s *SpaceService) Update(space *Space) (*Space, error)

type Spaces

type Spaces struct {
	Items []Space `json:"Items"`
	PagedResults
}

type Tag

type Tag struct {
	ID               string `json:"Id"`
	Name             string `json:"Name"`
	Color            string `json:"Color"`
	CanonicalTagName string `json:"CanonicalTagName"`
	Description      string `json:"Description"`
	SortOrder        int    `json:"SortOrder"`
}

type TagSet

type TagSet struct {
	ID   string `json:"Id"`
	Name string `json:"Name"`
	Tags []Tag  `json:"Tags,omitempty"`
}

func NewTagSet

func NewTagSet(name string) *TagSet

func (*TagSet) Validate

func (t *TagSet) Validate() error

type TagSetService

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

func NewTagSetService

func NewTagSetService(sling *sling.Sling) *TagSetService

func (*TagSetService) Add

func (s *TagSetService) Add(tagSet *TagSet) (*TagSet, error)

func (*TagSetService) Delete

func (s *TagSetService) Delete(tagSetId string) error

func (*TagSetService) Get

func (s *TagSetService) Get(tagSetId string) (*TagSet, error)

func (*TagSetService) GetAll

func (s *TagSetService) GetAll() (*[]TagSet, error)

func (*TagSetService) GetByName

func (s *TagSetService) GetByName(tagSetName string) (*TagSet, error)

func (*TagSetService) Update

func (s *TagSetService) Update(tagSet *TagSet) (*TagSet, error)

type TagSets

type TagSets struct {
	Items []TagSet `json:"Items"`
	PagedResults
}

type Tenant

type Tenant struct {
	ID                  string              `json:"Id"`
	Name                string              `json:"Name"`
	TenantTags          []string            `json:"TenantTags,omitempty"`
	ProjectEnvironments map[string][]string `json:"ProjectEnvironments,omitempty"`
	SpaceID             string              `json:"SpaceId"`
	ClonedFromTenantID  string              `json:"ClonedFromTenantId"`
	Description         string              `json:"Description"`
	LastModifiedOn      time.Time           `json:"LastModifiedOn"`
	LastModifiedBy      string              `json:"LastModifiedBy"`
	Links               map[string]string   `json:"Links"`
}

func NewTenant

func NewTenant(name, description string) *Tenant

type TenantService

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

func NewTenantService

func NewTenantService(sling *sling.Sling) *TenantService

func (*TenantService) Add

func (s *TenantService) Add(tenant *Tenant) (*Tenant, error)

Add adds an new tenant in Octopus Deploy

func (*TenantService) Delete

func (s *TenantService) Delete(tenantId string) error

Delete deletes an existing tenant in Octopus Deploy

func (*TenantService) Get

func (s *TenantService) Get(tenantId string) (*Tenant, error)

Get returns a single tenant by its tenantid in Octopus Deploy

func (*TenantService) GetAll

func (s *TenantService) GetAll() (*[]Tenant, error)

GetAll returns all tenants in Octopus Deploy

func (*TenantService) GetByName

func (s *TenantService) GetByName(tenantName string) (*Tenant, error)

GetByName gets an existing Tenant by its name in Octopus Deploy

func (*TenantService) Update

func (s *TenantService) Update(tenant *Tenant) (*Tenant, error)

Update updates an existing tenant in Octopus Deploy

type TenantedDeploymentMode

type TenantedDeploymentMode int

TenantedDeploymentMode indicates what types of deployments a resource participates in.

ENUM(

Untenanted // Untenanted resources only participate in Untenanted deployments
TenantedOrUntenanted // TenantedOrUntenanted resources participate in any type of deployment
Tenanted // Tenanted resources only participate in Tenanted deployments

)

const (
	// Untenanted is a TenantedDeploymentMode of type Untenanted
	// Untenanted resources only participate in Untenanted deployments
	Untenanted TenantedDeploymentMode = iota
	// TenantedOrUntenanted is a TenantedDeploymentMode of type TenantedOrUntenanted
	// TenantedOrUntenanted resources participate in any type of deployment
	TenantedOrUntenanted
	// Tenanted is a TenantedDeploymentMode of type Tenanted
	// Tenanted resources only participate in Tenanted deployments
	Tenanted
)

func ParseTenantedDeploymentMode

func ParseTenantedDeploymentMode(name string) (TenantedDeploymentMode, error)

ParseTenantedDeploymentMode attempts to convert a string to a TenantedDeploymentMode

func (*TenantedDeploymentMode) MarshalText

func (x *TenantedDeploymentMode) MarshalText() ([]byte, error)

MarshalText implements the text marshaller method

func (TenantedDeploymentMode) String

func (x TenantedDeploymentMode) String() string

String implements the Stringer interface.

func (*TenantedDeploymentMode) UnmarshalText

func (x *TenantedDeploymentMode) UnmarshalText(text []byte) error

UnmarshalText implements the text unmarshaller method

type Tenants

type Tenants struct {
	Items []Tenant `json:"Items"`
	PagedResults
}

type User

type User struct {
	ID                  string `json:"Id"`
	Username            string `json:"Username"`
	DisplayName         string `json:"DisplayName"`
	IsActive            bool   `json:"IsActive"`
	IsService           bool   `json:"IsService"`
	EmailAddress        string `json:"EmailAddress"`
	CanPasswordBeEdited bool   `json:"CanPasswordBeEdited"`
	IsRequestor         bool   `json:"IsRequestor"`
	Links               struct {
		Self        string `json:"Self"`
		Permissions string `json:"Permissions"`
		APIKeys     string `json:"ApiKeys"`
		Avatar      string `json:"Avatar"`
	} `json:"Links"`
}

type Variable

type Variable struct {
	ID          string                 `json:"Id"`
	Name        string                 `json:"Name"`
	Value       string                 `json:"Value"`
	Description string                 `json:"Description"`
	Scope       *VariableScope         `json:"Scope,omitempty"`
	IsEditable  bool                   `json:"IsEditable"`
	Prompt      *VariablePromptOptions `json:"Prompt"`
	Type        string                 `json:"Type"`
	IsSensitive bool                   `json:"IsSensitive"`
}

func NewVariable

func NewVariable(name, valuetype, value, description string, scope *VariableScope, sensitive bool) *Variable

func (*Variable) Validate

func (t *Variable) Validate() error

type VariablePromptDisplaySettings

type VariablePromptDisplaySettings struct {
	ControlType string `json:"Octopus.ControlType"`
}

type VariablePromptOptions

type VariablePromptOptions struct {
	Label           string                        `json:"Label"`
	DisplaySettings VariablePromptDisplaySettings `json:"DisplaySettings"`
	Description     string                        `json:"Description"`
	Required        bool                          `json:"Required"`
}

type VariableScope

type VariableScope struct {
	Project     []string `json:"Project,omitempty"`
	Environment []string `json:"Environment,omitempty"`
	Machine     []string `json:"Machine,omitempty"`
	Role        []string `json:"Role,omitempty"`
	TargetRole  []string `json:"TargetRole,omitempty"`
	Action      []string `json:"Action,omitempty"`
	User        []string `json:"User,omitempty"`
	Private     []string `json:"Private,omitempty"`
	Channel     []string `json:"Channel,omitempty"`
	TenantTag   []string `json:"TenantTag,omitempty"`
	Tenant      []string `json:"Tenant,omitempty"`
}

type VariableService

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

func NewVariableService

func NewVariableService(sling *sling.Sling) *VariableService

func (*VariableService) AddSingle

func (s *VariableService) AddSingle(projectid string, variable *Variable) (*Variables, error)

AddSingle adds a single variable to a project ID. This automates the act of fetching the variable set, adding a new item to it, and posting back to Octopus

func (*VariableService) DeleteSingle

func (s *VariableService) DeleteSingle(projectid string, variableID string) (*Variables, error)

DeleteSingle removes a single variable from a project ID. This automates the act of fetching the variable set, removing the existing item, and posting back to Octopus

func (*VariableService) GetAll

func (s *VariableService) GetAll(projectid string) (*Variables, error)

GetAll fetches an entire VariableSet from Octopus Deploy for a given Project ID.

func (*VariableService) GetByID

func (s *VariableService) GetByID(projectid, variableid string) (*Variable, error)

GetByID fetches a single variable, located by its ID, from Octopus Deploy for a given Project ID.

func (*VariableService) GetByName

func (s *VariableService) GetByName(projectid, variablename string, scope *VariableScope) ([]Variable, error)

GetByName fetches variables, located by their name, from Octopus Deploy for a given Project ID. As variable names can appear more than once under different scopes, a VariableScope must also be provided, which will be used to locate the appropriate variables.

func (*VariableService) MatchesScope

func (s *VariableService) MatchesScope(variableScope, definedScope *VariableScope) (bool, *VariableScope, error)

MatchesScope compares two different scopes to see if they match. Generally used for comparing the scope of an existing variable against a desired state. Only supports Environment, Role, Machine, Action and Channel for scope options. Returns true if definedScope is nil or all elements are empty. Also returns a VariableScope of all the scopes that were matched

func (*VariableService) Update

func (s *VariableService) Update(projectid string, variableSet *Variables) (*Variables, error)

Update takes an entire variable set and posts the entire set back to Octopus Deploy. There are individual functions like AddSingle and UpdateSingle that can make this process more of a "typical" CRUD Octopus command.

func (*VariableService) UpdateSingle

func (s *VariableService) UpdateSingle(projectid string, variable *Variable) (*Variables, error)

UpdateSingle adds a single variable to a project ID. This automates the act of fetching the variable set, updating the existing item, and posting back to Octopus

type VariableSetContentType

type VariableSetContentType string

type Variables

type Variables struct {
	ID          string      `json:"Id"`
	OwnerID     string      `json:"OwnerId"`
	Version     int         `json:"Version"`
	Variables   []Variable  `json:"Variables"`
	ScopeValues ScopeValues `json:"ScopeValues"`
	Links       map[string]string
}

type VersioningStrategy

type VersioningStrategy struct {
	DonorPackageStepID string `json:"DonorPackageStepId"`
	Template           string `json:"Template"`
}

Jump to

Keyboard shortcuts

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