Documentation
¶
Index ¶
- Constants
- Variables
- func APIErrorChecker(urlPath string, resp *http.Response, wantedResponseCode int, slingError error, ...) error
- func LoadNextPage(pagedResults PagedResults) (string, bool)
- func PrettyJson(data interface{}) (string, error)
- 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
- 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 Accounts
- type ActionTemplateParameter
- type AutoDeployReleaseOverride
- type Certificate
- 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(certificate *Certificate) (*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 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
var ValidTenantedDeploymentModes = []string{
"Untenanted", "TenantedOrUntenanted", "Tenanted",
}
ValidTenantedDeploymentModes provides options for tenanted deployment modes
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 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 ¶ added in v1.1.0
func ValidateChannelValues ¶ added in v1.4.0
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
Types ¶
type APIError ¶
type Account ¶
type Account struct {
ID string `json:"Id"`
EnvironmentIDs []string `json:"EnvironmentIds"`
Name string `json:"Name"`
AccountType string `json:"AccountType"`
SubscriptionNumber string `json:"SubscriptionNumber"`
ClientId string `json:"ClientId"`
TenantId string `json:"TenantId"`
Password SensitiveValue `json:"Password"`
TenantTags []string `json:"TenantTags,omitempty"`
TenantedDeploymentParticipation string `json:"TenantedDeploymentParticipation"`
Token SensitiveValue `json:"Token,omitempty"`
}
func NewAccount ¶
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 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 ¶ added in v1.2.0
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 string `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 ¶ added in v1.2.0
func NewCertificate(name string, certificateData SensitiveValue, password SensitiveValue) *Certificate
func (*Certificate) Validate ¶ added in v1.2.0
func (t *Certificate) Validate() error
type CertificateService ¶ added in v1.2.0
type CertificateService struct {
// contains filtered or unexported fields
}
func NewCertificateService ¶ added in v1.2.0
func NewCertificateService(sling *sling.Sling) *CertificateService
func (*CertificateService) Add ¶ added in v1.2.0
func (s *CertificateService) Add(certificate *Certificate) (*Certificate, error)
func (*CertificateService) Delete ¶ added in v1.2.0
func (s *CertificateService) Delete(certificateId string) error
func (*CertificateService) Get ¶ added in v1.2.0
func (s *CertificateService) Get(certificateId string) (*Certificate, error)
func (*CertificateService) GetAll ¶ added in v1.2.0
func (s *CertificateService) GetAll() (*[]Certificate, error)
func (*CertificateService) GetByName ¶ added in v1.2.0
func (s *CertificateService) GetByName(certificateName string) (*Certificate, error)
func (*CertificateService) Replace ¶ added in v1.3.0
func (s *CertificateService) Replace(certificate *Certificate) (*Certificate, error)
func (*CertificateService) Update ¶ added in v1.2.0
func (s *CertificateService) Update(certificate *Certificate) (*Certificate, error)
type Certificates ¶ added in v1.2.0
type Certificates struct {
Items []Certificate `json:"Items"`
PagedResults
}
type Channel ¶ added in v1.4.0
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 ¶ added in v1.4.0
type ChannelRule ¶ added in v1.4.0
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 ¶ added in v1.4.0
type ChannelService struct {
// contains filtered or unexported fields
}
func NewChannelService ¶ added in v1.4.0
func NewChannelService(sling *sling.Sling) *ChannelService
func (*ChannelService) Add ¶ added in v1.4.0
func (s *ChannelService) Add(channel *Channel) (*Channel, error)
Add adds a new channel
func (*ChannelService) Delete ¶ added in v1.4.0
func (s *ChannelService) Delete(channelid string) error
Delete deletes an existing channel in Octopus Deploy
func (*ChannelService) Get ¶ added in v1.4.0
func (s *ChannelService) Get(channelID string) (*Channel, error)
func (*ChannelService) GetAll ¶ added in v1.4.0
func (s *ChannelService) GetAll() (*[]Channel, error)
type Channels ¶ added in v1.4.0
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
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"`
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 string `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"`
}
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 ¶ added in v1.4.0
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 string `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 ¶ added in v1.1.0
type PropertyValueResource struct {
*SensitiveValue
*PropertyValue
}
func (PropertyValueResource) MarshalJSON ¶ added in v1.1.0
func (d PropertyValueResource) MarshalJSON() ([]byte, error)
func (*PropertyValueResource) UnmarshalJSON ¶ added in v1.1.0
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 ¶ added in v1.1.0
type SpaceService ¶ added in v1.1.0
type SpaceService struct {
// contains filtered or unexported fields
}
func NewSpaceService ¶ added in v1.1.0
func NewSpaceService(sling *sling.Sling) *SpaceService
func (*SpaceService) Delete ¶ added in v1.1.0
func (s *SpaceService) Delete(spaceId string) error
func (*SpaceService) Get ¶ added in v1.1.0
func (s *SpaceService) Get(spaceId string) (*Space, error)
func (*SpaceService) GetAll ¶ added in v1.1.0
func (s *SpaceService) GetAll() (*[]Space, error)
type Spaces ¶ added in v1.1.0
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 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
- 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
- util.go
- valid_values.go
- variables.go
- versioning_strategy.go