Documentation
¶
Index ¶
- Constants
- Variables
- func APIErrorChecker(urlPath string, resp *http.Response, wantedResponseCode int, slingError error, ...) error
- func AccountTypeNames() []string
- func LoadNextPage(pagedResults PagedResults) (string, bool)
- func PrettyJson(data interface{}) (string, error)
- func TenantedDeploymentModeNames() []string
- func ValidateChannelValues(Channel *Channel) error
- func ValidateLibraryVariableSetValues(LibraryVariableSet *LibraryVariableSet) error
- func ValidateLifecycleValues(Lifecycle *Lifecycle) error
- func ValidateMachineValues(Machine *Machine) error
- func ValidateMultipleProperties(validatePropertyErrors []error) error
- func ValidateProjectValues(Project *Project) error
- func ValidatePropertiesMatch(firstProperty, firstPropertyName, secondProperty, secondPropertyName string) error
- func ValidatePropertyValues(propertyName string, propertyValue string, validValues []string) error
- func ValidateRequiredPropertyValue(propertyName string, propertyValue string) error
- func ValidateStringInSlice(str string, list []string) bool
- func ValidateTenantValues(tenant *Tenant) error
- type APIError
- type Account
- type AccountService
- func (s *AccountService) Add(account *Account) (*Account, error)
- func (s *AccountService) Delete(accountId string) error
- func (s *AccountService) Get(accountId string) (*Account, error)
- func (s *AccountService) GetAll() (*[]Account, error)
- func (s *AccountService) GetByName(accountName string) (*Account, error)
- func (s *AccountService) Update(account *Account) (*Account, error)
- type AccountType
- type Accounts
- type ActionTemplateParameter
- type AutoDeployReleaseOverride
- type Certificate
- type CertificateReplace
- type CertificateService
- func (s *CertificateService) Add(certificate *Certificate) (*Certificate, error)
- func (s *CertificateService) Delete(certificateId string) error
- func (s *CertificateService) Get(certificateId string) (*Certificate, error)
- func (s *CertificateService) GetAll() (*[]Certificate, error)
- func (s *CertificateService) GetByName(certificateName string) (*Certificate, error)
- func (s *CertificateService) Replace(certificateId string, certificateReplace *CertificateReplace) (*Certificate, error)
- func (s *CertificateService) Update(certificate *Certificate) (*Certificate, error)
- type Certificates
- type Channel
- type ChannelRule
- type ChannelService
- func (s *ChannelService) Add(channel *Channel) (*Channel, error)
- func (s *ChannelService) Delete(channelid string) error
- func (s *ChannelService) Get(channelID string) (*Channel, error)
- func (s *ChannelService) GetAll() (*[]Channel, error)
- func (s *ChannelService) Update(channel *Channel) (*Channel, error)
- type Channels
- type Client
- type DeploymentAction
- type DeploymentProcess
- type DeploymentProcessService
- type DeploymentProcesses
- type DeploymentStep
- type DeploymentStepCondition
- type DeploymentStepPackageRequirement
- type DeploymentStepStartTrigger
- type Environment
- type EnvironmentService
- func (s *EnvironmentService) Add(environment *Environment) (*Environment, error)
- func (s *EnvironmentService) Delete(environmentid string) error
- func (s *EnvironmentService) Get(environmentid string) (*Environment, error)
- func (s *EnvironmentService) GetAll() (*[]Environment, error)
- func (s *EnvironmentService) GetByName(environmentName string) (*Environment, error)
- func (s *EnvironmentService) Update(environment *Environment) (*Environment, error)
- type Environments
- type Feed
- type FeedService
- func (s *FeedService) Add(feed *Feed) (*Feed, error)
- func (s *FeedService) Delete(feedId string) error
- func (s *FeedService) Get(feedId string) (*Feed, error)
- func (s *FeedService) GetAll() (*[]Feed, error)
- func (s *FeedService) GetByName(feedName string) (*Feed, error)
- func (s *FeedService) Update(feed *Feed) (*Feed, error)
- type Feeds
- type Interruption
- type InterruptionLinks
- type InterruptionSubmitRequest
- type Interruptions
- type InterruptionsService
- func (s *InterruptionsService) Get(id string) (*Interruption, error)
- func (s *InterruptionsService) GetAll() ([]Interruption, error)
- func (s *InterruptionsService) GetResponsability(i *Interruption) (*User, error)
- func (s *InterruptionsService) Submit(i *Interruption, r *InterruptionSubmitRequest) (*Interruption, error)
- func (s *InterruptionsService) TakeResponsability(i *Interruption) (*User, error)
- type LibraryVariableSet
- type LibraryVariableSetService
- func (s *LibraryVariableSetService) Add(libraryVariableSet *LibraryVariableSet) (*LibraryVariableSet, error)
- func (s *LibraryVariableSetService) Delete(libraryVariableSetid string) error
- func (s *LibraryVariableSetService) Get(libraryVariableSetID string) (*LibraryVariableSet, error)
- func (s *LibraryVariableSetService) GetAll() (*[]LibraryVariableSet, error)
- func (s *LibraryVariableSetService) GetByName(name string) (*LibraryVariableSet, error)
- func (s *LibraryVariableSetService) Update(libraryVariableSet *LibraryVariableSet) (*LibraryVariableSet, error)
- type LibraryVariableSets
- type Lifecycle
- type LifecycleService
- func (s *LifecycleService) Add(lifecycle *Lifecycle) (*Lifecycle, error)
- func (s *LifecycleService) Delete(lifecycleid string) error
- func (s *LifecycleService) Get(LifecycleID string) (*Lifecycle, error)
- func (s *LifecycleService) GetAll() (*[]Lifecycle, error)
- func (s *LifecycleService) GetByName(lifecycleName string) (*Lifecycle, error)
- func (s *LifecycleService) Update(lifecycle *Lifecycle) (*Lifecycle, error)
- type Lifecycles
- type Links
- type Machine
- type MachineEndpoint
- type MachineEndpointAuthentication
- type MachineHealthCheckPolicy
- type MachinePolicies
- type MachinePolicy
- type MachinePolicyService
- type MachineService
- func (s *MachineService) Add(machine *Machine) (*Machine, error)
- func (s *MachineService) Delete(MachineID string) error
- func (s *MachineService) Get(MachineID string) (*Machine, error)
- func (s *MachineService) GetAll() (*[]Machine, error)
- func (s *MachineService) GetByName(machineName string) (*Machine, error)
- func (s *MachineService) Update(machine *Machine) (*Machine, error)
- type MachineTentacleVersionDetails
- type Machines
- type PackageReference
- type PagedResults
- type Phase
- type Project
- type ProjectConnectivityPolicy
- type ProjectGroup
- type ProjectGroupService
- func (s *ProjectGroupService) Add(projectGroup *ProjectGroup) (*ProjectGroup, error)
- func (s *ProjectGroupService) Delete(projectGroupID string) error
- func (s *ProjectGroupService) Get(projectGroupID string) (*ProjectGroup, error)
- func (s *ProjectGroupService) GetAll() (*[]ProjectGroup, error)
- func (s *ProjectGroupService) Update(projectGroup *ProjectGroup) (*ProjectGroup, error)
- type ProjectGroups
- type ProjectService
- func (s *ProjectService) Add(project *Project) (*Project, error)
- func (s *ProjectService) Delete(projectid string) error
- func (s *ProjectService) Get(projectid string) (*Project, error)
- func (s *ProjectService) GetAll() (*[]Project, error)
- func (s *ProjectService) GetByName(projectName string) (*Project, error)
- func (s *ProjectService) Update(project *Project) (*Project, error)
- type ProjectTrigger
- type ProjectTriggerAction
- type ProjectTriggerFilter
- type ProjectTriggerService
- func (s *ProjectTriggerService) Add(projectTrigger *ProjectTrigger) (*ProjectTrigger, error)
- func (s *ProjectTriggerService) Delete(projectTriggerID string) error
- func (s *ProjectTriggerService) Get(projectTriggerID string) (*ProjectTrigger, error)
- func (s *ProjectTriggerService) GetAll() (*[]ProjectTrigger, error)
- func (s *ProjectTriggerService) GetByProjectID(projectID string) (*[]ProjectTrigger, error)
- func (s *ProjectTriggerService) Update(projectTrigger *ProjectTrigger) (*ProjectTrigger, error)
- type ProjectTriggers
- type Projects
- type PropertyValue
- type PropertyValueResource
- type ReleaseCreationStrategy
- type RetentionPeriod
- type RetentionUnit
- type ScopeValue
- type ScopeValues
- type SensitiveValue
- type Space
- type SpaceService
- func (s *SpaceService) Add(space *Space) (*Space, error)
- func (s *SpaceService) Delete(spaceId string) error
- func (s *SpaceService) Get(spaceId string) (*Space, error)
- func (s *SpaceService) GetAll() (*[]Space, error)
- func (s *SpaceService) GetByName(spaceName string) (*Space, error)
- func (s *SpaceService) Update(space *Space) (*Space, error)
- type Spaces
- type Tag
- type TagSet
- type TagSetService
- func (s *TagSetService) Add(tagSet *TagSet) (*TagSet, error)
- func (s *TagSetService) Delete(tagSetId string) error
- func (s *TagSetService) Get(tagSetId string) (*TagSet, error)
- func (s *TagSetService) GetAll() (*[]TagSet, error)
- func (s *TagSetService) GetByName(tagSetName string) (*TagSet, error)
- func (s *TagSetService) Update(tagSet *TagSet) (*TagSet, error)
- type TagSets
- type Tenant
- type TenantService
- func (s *TenantService) Add(tenant *Tenant) (*Tenant, error)
- func (s *TenantService) Delete(tenantId string) error
- func (s *TenantService) Get(tenantId string) (*Tenant, error)
- func (s *TenantService) GetAll() (*[]Tenant, error)
- func (s *TenantService) GetByName(tenantName string) (*Tenant, error)
- func (s *TenantService) Update(tenant *Tenant) (*Tenant, error)
- type TenantedDeploymentMode
- type Tenants
- type User
- type Variable
- type VariablePromptOptions
- type VariableScope
- type VariableService
- func (s *VariableService) AddSingle(projectid string, variable *Variable) (*Variables, error)
- func (s *VariableService) DeleteSingle(projectid string, variableID string) (*Variables, error)
- func (s *VariableService) GetAll(projectid string) (*Variables, error)
- func (s *VariableService) GetByID(projectid, variableid string) (*Variable, error)
- func (s *VariableService) GetByName(projectid, variablename string, scope *VariableScope) ([]Variable, error)
- func (s *VariableService) MatchesScope(variableScope, definedScope *VariableScope) (bool, *VariableScope, error)
- func (s *VariableService) Update(projectid string, variableSet *Variables) (*Variables, error)
- func (s *VariableService) UpdateSingle(projectid string, variable *Variable) (*Variables, error)
- type VariableSetContentType
- type Variables
- type VersioningStrategy
Constants ¶
const ( DeploymentStepPackageRequirement_LetOctopusDecide = DeploymentStepPackageRequirement("LetOctopusDecide") DeploymentStepPackageRequirement_BeforePackageAcquisition = DeploymentStepPackageRequirement("BeforePackageAcquisition") DeploymentStepPackageRequirement_AfterPackageAcquisition = DeploymentStepPackageRequirement("AfterPackageAcquisition") )
const ( DeploymentStepCondition_Success = DeploymentStepCondition("Success") DeploymentStepCondition_Failure = DeploymentStepCondition("Failure") DeploymentStepCondition_Always = DeploymentStepCondition("Always") DeploymentStepCondition_Variable = DeploymentStepCondition("Variable") )
const ( DeploymentStepStartTrigger_StartAfterPrevious = DeploymentStepStartTrigger("StartAfterPrevious") DeploymentStepStartTrigger_StartWithPrevious = DeploymentStepStartTrigger("StartWithPrevious") )
const ( PackageAcquisitionLocation_Server = "Server" PackageAcquisitionLocation_ExecutionTarget = "ExecutionTarget" PackageAcquisitionLocation_NotAcquired = "NotAcquired" )
const ( VariableSetContentType_Variables = VariableSetContentType("Variables") VariableSetContentType_ScriptModule = VariableSetContentType("ScriptModule") )
const ( RetentionUnit_Days = RetentionUnit("Days") RetentionUnit_Items = RetentionUnit("Items") )
const ManualInterventionDecline = "Abort"
const ManualInterverventionApprove = "Proceed"
Variables ¶
var ErrItemNotFound = errors.New("cannot find the item")
ErrItemNotFound is an OctopusDeploy error returned an item cannot be found.
var ValidMachineStatuses = []string{
"Online", "Offline", "Unknown", "NeedsUpgrade", "CalamariNeedsUpgrade", "Disabled",
}
ValidMachineStatuses provides options for valid machine status
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
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 TenantedDeploymentModeNames ¶
func TenantedDeploymentModeNames() []string
TenantedDeploymentModeNames returns a list of possible string values of TenantedDeploymentMode.
func ValidateChannelValues ¶
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 ¶
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 ¶
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 ¶
ValidateMultipleProperties returns the first error in a list of property validations
func ValidateProjectValues ¶
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 ¶
ValidatePropertyValues returns an error if the given string is not in a slice of strings
func ValidateRequiredPropertyValue ¶
ValidateRequiredPropertyValue returns an error if the property value is empty
func ValidateStringInSlice ¶
ValidateStringInSlice checks if a string is in the given slice
func ValidateTenantValues ¶
Types ¶
type APIError ¶
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
type AccountService ¶
type AccountService struct {
// contains filtered or unexported fields
}
func NewAccountService ¶
func NewAccountService(sling *sling.Sling) *AccountService
func (*AccountService) Delete ¶
func (s *AccountService) Delete(accountId string) error
func (*AccountService) GetAll ¶
func (s *AccountService) GetAll() (*[]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 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 ¶
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) GetAll ¶
func (s *ChannelService) GetAll() (*[]Channel, error)
type Channels ¶
type Channels struct { Items []Channel `json:"Items"` PagedResults }
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.
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"` ContainerImage string `json:"ContainerImage"` 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 (s *DeploymentProcessService) GetAll() (*[]DeploymentProcess, error)
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"` }
type FeedService ¶
type FeedService struct {
// contains filtered or unexported fields
}
func NewFeedService ¶
func NewFeedService(sling *sling.Sling) *FeedService
func (*FeedService) Delete ¶
func (s *FeedService) Delete(feedId string) error
func (*FeedService) GetAll ¶
func (s *FeedService) GetAll() (*[]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 ¶
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 ¶
func (s *InterruptionsService) Get(id string) (*Interruption, error)
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 ¶
func (s *InterruptionsService) Submit(i *Interruption, r *InterruptionSubmitRequest) (*Interruption, error)
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 ¶
func (s *LibraryVariableSetService) GetAll() (*[]LibraryVariableSet, error)
GetAll returns all libraryVariableSets in Octopus Deploy
func (*LibraryVariableSetService) GetByName ¶
func (s *LibraryVariableSetService) GetByName(name string) (*LibraryVariableSet, error)
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 ¶
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
type Lifecycles ¶
type Lifecycles struct { Items []Lifecycle `json:"Items"` PagedResults }
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 ¶
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 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
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 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 ¶
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
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 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 RetentionPeriod ¶
type RetentionPeriod struct { Unit RetentionUnit `json:"Unit"` QuantityToKeep int32 `json:"QuantityToKeep"` ShouldKeepForever bool `json:"ShouldKeepForever"` }
type RetentionUnit ¶
type RetentionUnit string
type ScopeValue ¶
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 Space ¶
type SpaceService ¶
type SpaceService struct {
// contains filtered or unexported fields
}
func NewSpaceService ¶
func NewSpaceService(sling *sling.Sling) *SpaceService
func (*SpaceService) Delete ¶
func (s *SpaceService) Delete(spaceId string) error
func (*SpaceService) GetAll ¶
func (s *SpaceService) GetAll() (*[]Space, error)
type Spaces ¶
type Spaces struct { Items []Space `json:"Items"` PagedResults }
type TagSet ¶
type TagSetService ¶
type TagSetService struct {
// contains filtered or unexported fields
}
func NewTagSetService ¶
func NewTagSetService(sling *sling.Sling) *TagSetService
func (*TagSetService) Delete ¶
func (s *TagSetService) Delete(tagSetId string) error
func (*TagSetService) GetAll ¶
func (s *TagSetService) GetAll() (*[]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"` }
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
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
type VariablePromptOptions ¶
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 VersioningStrategy ¶
Source Files
¶
- account.go
- account_type.go
- account_type_enum.go
- action_template_parameter.go
- auto_deploy_release_override.go
- certificate.go
- channels.go
- common_models.go
- deployment_process.go
- environment.go
- feed.go
- interruptions.go
- library_variable_set.go
- lifecycles.go
- machinepolicy.go
- machines.go
- octopusdeploy.go
- project.go
- project_connectivity_policy.go
- project_group.go
- project_triggers.go
- property_value_resource.go
- release_creation_strategy.go
- space.go
- tag_set.go
- tenant.go
- tenanted_deployment_mode.go
- tenanted_deployment_mode_enum.go
- test_helpers.go
- util.go
- valid_values.go
- variables.go
- versioning_strategy.go