Documentation ¶
Index ¶
- Constants
- func DeleteByID(client newclient.Client, spaceID string, id string) error
- func Get(client newclient.Client, spaceID string, projectsQuery ProjectsQuery) (*resources.Resources[*Project], error)
- func IsNil(i interface{}) bool
- func NewProjects() *resources.Resources[*Project]
- type AutoDeployReleaseOverride
- type ConversionState
- type ConvertToVcs
- type ConvertToVcsResponse
- type CreateBranchRequest
- type DashboardItem
- type DatabasePersistenceSettings
- type GitPersistenceSettings
- type GitRefType
- type GitReference
- type JiraServiceManagementExtensionSettings
- func (j *JiraServiceManagementExtensionSettings) ConnectionID() string
- func (j *JiraServiceManagementExtensionSettings) ExtensionID() extensions.ExtensionID
- func (j *JiraServiceManagementExtensionSettings) IsChangeControlled() bool
- func (j JiraServiceManagementExtensionSettings) MarshalJSON() ([]byte, error)
- func (j *JiraServiceManagementExtensionSettings) SetConnectionID(connectionID string)
- func (j *JiraServiceManagementExtensionSettings) SetExtensionID(extensionID extensions.ExtensionID)
- func (j *JiraServiceManagementExtensionSettings) SetIsChangeControlled(isChangeControlled bool)
- func (j *JiraServiceManagementExtensionSettings) UnmarshalJSON(b []byte) error
- type PersistenceSettings
- type PersistenceSettingsType
- type Progression
- type Project
- func Add(client newclient.Client, project *Project) (*Project, error)
- func ConvertToVCS(client newclient.Client, project *Project, commitMessage string, ...) (*Project, error)
- func GetAll(client newclient.Client, spaceID string) ([]*Project, error)
- func GetByID(client newclient.Client, spaceID string, id string) (*Project, error)
- func NewProject(name string, lifecycleID string, projectGroupID string) *Project
- func Update(client newclient.Client, project *Project) (*Project, error)
- type ProjectCloneQuery
- type ProjectCloneRequest
- type ProjectPulseQuery
- type ProjectService
- func (s *ProjectService) Add(project *Project) (*Project, error)deprecated
- func (s *ProjectService) Clone(sourceProject *Project, request ProjectCloneRequest) (*Project, error)
- func (s *ProjectService) ConvertToVcs(project *Project, commitMessage string, initialCommitBranch string, ...) (*Project, error)deprecated
- func (s *ProjectService) Get(projectsQuery ProjectsQuery) (*resources.Resources[*Project], error)deprecated
- func (s *ProjectService) GetAll() ([]*Project, error)
- func (s *ProjectService) GetByID(id string) (*Project, error)deprecated
- func (p *ProjectService) GetByIdentifier(identifier string) (*Project, error)
- func (p *ProjectService) GetByName(name string) (*Project, error)
- func (s *ProjectService) GetChannels(project *Project) ([]*channels.Channel, error)
- func (s *ProjectService) GetGitBranch(project *Project, name string) (*GitReference, error)
- func (s *ProjectService) GetGitBranches(project *Project) ([]*GitReference, error)
- func (s *ProjectService) GetGitCommit(project *Project, hash string) (*GitReference, error)
- func (s *ProjectService) GetGitTag(project *Project, name string) (*GitReference, error)
- func (s *ProjectService) GetGitTags(project *Project) ([]*GitReference, error)
- func (s *ProjectService) GetProgression(project *Project) (*Progression, error)
- func (s *ProjectService) GetProject(channel *channels.Channel) (*Project, error)
- func (s *ProjectService) GetReleases(project *Project) ([]*releases.Release, error)
- func (s *ProjectService) GetSummary(project *Project) (*ProjectSummary, error)
- func (s *ProjectService) Update(project *Project) (*Project, error)deprecated
- func (s *ProjectService) UpdateWithGitRef(project *Project, gitRef string) (*Project, error)
- type ProjectSummary
- type ProjectsExperimentalSummariesQuery
- type ProjectsQuery
- type ReleaseCreationStrategy
- type ReleaseProgression
- type ServiceNowExtensionSettings
- func (s *ServiceNowExtensionSettings) ConnectionID() string
- func (s *ServiceNowExtensionSettings) ExtensionID() extensions.ExtensionID
- func (s *ServiceNowExtensionSettings) IsChangeControlled() bool
- func (s ServiceNowExtensionSettings) MarshalJSON() ([]byte, error)
- func (s *ServiceNowExtensionSettings) SetConnectionID(connectionID string)
- func (s *ServiceNowExtensionSettings) SetExtensionID(extensionID extensions.ExtensionID)
- func (s *ServiceNowExtensionSettings) SetIsChangeControlled(isChangeControlled bool)
- func (s *ServiceNowExtensionSettings) UnmarshalJSON(b []byte) error
- type VersioningStrategy
Constants ¶
const ( PersistenceSettingsTypeDatabase = PersistenceSettingsType("Database") PersistenceSettingsTypeVersionControlled = PersistenceSettingsType("VersionControlled") )
const ( GitRefTypeBranch = GitRefType("GitBranch") GitRefTypeTag = GitRefType("GitTag") GitRefTypeCommit = GitRefType("GitCommit") )
Variables ¶
This section is empty.
Functions ¶
func DeleteByID ¶ added in v2.33.0
DeleteByID deletes the resource that matches the space ID and input ID.
func Get ¶ added in v2.33.0
func Get(client newclient.Client, spaceID string, projectsQuery ProjectsQuery) (*resources.Resources[*Project], error)
Get returns a collection of projects based on the criteria defined by its input query parameter. If an error occurs, an empty collection is returned along with the associated error.
func NewProjects ¶
Types ¶
type AutoDeployReleaseOverride ¶
type AutoDeployReleaseOverride struct { EnvironmentID string `json:"EnvironmentId,omitempty"` ReleaseID string `json:"ReleaseId,omitempty"` TenantID string `json:"TenantId,omitempty"` }
AutoDeployReleaseOverride represents an auto-deploy release override.
type ConversionState ¶ added in v2.10.0
type ConversionState struct {
VariablesAreInGit bool
}
func NewConversionState ¶ added in v2.10.0
func NewConversionState(variablesAreInGit bool) *ConversionState
type ConvertToVcs ¶
type ConvertToVcs struct { CommitMessage string `json:"CommitMessage"` VersionControlSettings GitPersistenceSettings `json:"VersionControlSettings"` InitialCommitBranchName string `json:"InitialCommitBranchName,omitempty"` }
func NewConvertToVcs ¶
func NewConvertToVcs(commitMessage string, initialCommitBranchName string, gitPersistenceSettings GitPersistenceSettings) *ConvertToVcs
NewConvertToVcs returns the new structure to send to Octopus to convert a project to VCS. Will return error if initialCommitBranchName not explicitly specified and the default branch is listed in the protected branch patterns.
type ConvertToVcsResponse ¶
type ConvertToVcsResponse struct {
Messages []string
}
type CreateBranchRequest ¶ added in v2.29.0
type DashboardItem ¶ added in v2.4.0
type DatabasePersistenceSettings ¶
type DatabasePersistenceSettings interface { PersistenceSettings }
DatabasePersistenceSettings represents database persistence settings associated with a project.
func NewDatabasePersistenceSettings ¶
func NewDatabasePersistenceSettings() DatabasePersistenceSettings
NewDatabasePersistenceSettings creates an instance of database persistence settings.
type GitPersistenceSettings ¶
type GitPersistenceSettings interface { BasePath() string SetBasePath(basePath string) DefaultBranch() string SetDefaultBranch(defaultBranch string) ProtectedBranchNamePatterns() []string SetProtectedBranchNamePatterns(protectedBranchNamePatterns []string) URL() *url.URL SetURL(url *url.URL) Credential() credentials.GitCredential SetCredential(credential credentials.GitCredential) PersistenceSettings }
func NewGitPersistenceSettings ¶
func NewGitPersistenceSettings( basePath string, credentials credentials.GitCredential, defaultBranch string, protectedBranchNamePatterns []string, url *url.URL) GitPersistenceSettings
NewGitPersistenceSettings creates an instance of persistence settings.
type GitRefType ¶ added in v2.3.2
type GitRefType string
func (GitRefType) Description ¶ added in v2.3.2
func (refType GitRefType) Description() string
Description returns a human-readable string representing the ref type; Not suitable for programmatic use
type GitReference ¶ added in v2.3.2
type GitReference struct { Type GitRefType `json:"-"` // added by the client library in case you need to disambiguate branches/tags in a single collection Name string `json:"Name,omitempty"` // display name of the git item e.g. "main" CanonicalName string `json:"CanonicalName,omitempty"` // underlying git reference e.g. "refs/heads/main" IsProtected bool `json:"IsProtected"` Links map[string]string `json:"Links,omitempty"` }
GitReference represents the data returned from the Octopus Server relating to a git branch or tag in a version controlled project. Both branches and tags share the same resource format
func NewGitBranchReference ¶ added in v2.3.2
func NewGitBranchReference(name string, canonicalName string) *GitReference
func NewGitTagReference ¶ added in v2.3.2
func NewGitTagReference(name string, canonicalName string) *GitReference
type JiraServiceManagementExtensionSettings ¶ added in v2.17.3
type JiraServiceManagementExtensionSettings struct { ServiceDeskProjectName string ext.ConnectedChangeControlExtensionSettings }
func NewJiraServiceManagementExtensionSettings ¶ added in v2.17.3
func NewJiraServiceManagementExtensionSettings(connectionID string, isChangeControlled bool, serviceDeskProjectName string) *JiraServiceManagementExtensionSettings
NewJiraServiceManagementExtensionSettings creates an instance of extension settings for Jira Service Management (JSM).
func (*JiraServiceManagementExtensionSettings) ConnectionID ¶ added in v2.17.3
func (j *JiraServiceManagementExtensionSettings) ConnectionID() string
func (*JiraServiceManagementExtensionSettings) ExtensionID ¶ added in v2.17.3
func (j *JiraServiceManagementExtensionSettings) ExtensionID() extensions.ExtensionID
func (*JiraServiceManagementExtensionSettings) IsChangeControlled ¶ added in v2.17.3
func (j *JiraServiceManagementExtensionSettings) IsChangeControlled() bool
func (JiraServiceManagementExtensionSettings) MarshalJSON ¶ added in v2.17.3
func (j JiraServiceManagementExtensionSettings) MarshalJSON() ([]byte, error)
MarshalJSON returns the Jira Service Management (JSM) extension settings as its JSON encoding.
func (*JiraServiceManagementExtensionSettings) SetConnectionID ¶ added in v2.17.3
func (j *JiraServiceManagementExtensionSettings) SetConnectionID(connectionID string)
func (*JiraServiceManagementExtensionSettings) SetExtensionID ¶ added in v2.17.3
func (j *JiraServiceManagementExtensionSettings) SetExtensionID(extensionID extensions.ExtensionID)
func (*JiraServiceManagementExtensionSettings) SetIsChangeControlled ¶ added in v2.17.3
func (j *JiraServiceManagementExtensionSettings) SetIsChangeControlled(isChangeControlled bool)
func (*JiraServiceManagementExtensionSettings) UnmarshalJSON ¶ added in v2.17.3
func (j *JiraServiceManagementExtensionSettings) UnmarshalJSON(b []byte) error
UnmarshalJSON sets the Jira Service Management (JSM) extension settings to its representation in JSON.
type PersistenceSettings ¶ added in v2.12.0
type PersistenceSettings interface {
Type() PersistenceSettingsType
}
PersistenceSettings defines the interface for persistence settings.
type PersistenceSettingsType ¶ added in v2.10.0
type PersistenceSettingsType string
type Progression ¶ added in v2.4.0
type Progression struct { LifecycleEnvironments map[string][]resources.ReferenceDataItem `json:"LifecycleEnvironments,omitempty"` Environments []*resources.ReferenceDataItem `json:"Environments"` ChannelEnvironments map[string][]resources.ReferenceDataItem `json:"ChannelEnvironments,omitempty"` Releases []*ReleaseProgression `json:"Releases"` resources.Resource }
Progression represents the project level (dashboard-style) progression and current deployed releases for the project
type Project ¶
type Project struct { AutoCreateRelease bool `json:"AutoCreateRelease"` AutoDeployReleaseOverrides []AutoDeployReleaseOverride `json:"AutoDeployReleaseOverrides,omitempty"` ClonedFromProjectID string `json:"ClonedFromProjectId,omitempty"` ConnectivityPolicy *core.ConnectivityPolicy `json:"ProjectConnectivityPolicy,omitempty"` DefaultGuidedFailureMode string `json:"DefaultGuidedFailureMode,omitempty"` DefaultToSkipIfAlreadyInstalled bool `json:"DefaultToSkipIfAlreadyInstalled"` DeploymentChangesTemplate string `json:"DeploymentChangesTemplate,omitempty"` DeploymentProcessID string `json:"DeploymentProcessId,omitempty"` Description string `json:"Description,omitempty"` ExtensionSettings []extensions.ExtensionSettings `json:"ExtensionSettings,omitempty"` IncludedLibraryVariableSets []string `json:"IncludedLibraryVariableSetIds,omitempty"` IsDisabled bool `json:"IsDisabled"` IsDiscreteChannelRelease bool `json:"DiscreteChannelRelease"` IsVersionControlled bool `json:"IsVersionControlled"` LifecycleID string `json:"LifecycleId" validate:"required"` Name string `json:"Name" validate:"required"` PersistenceSettings PersistenceSettings `json:"PersistenceSettings,omitempty"` ProjectGroupID string `json:"ProjectGroupId" validate:"required"` ReleaseCreationStrategy *ReleaseCreationStrategy `json:"ReleaseCreationStrategy,omitempty"` ReleaseNotesTemplate string `json:"ReleaseNotesTemplate,omitempty"` Slug string `json:"Slug,omitempty"` SpaceID string `json:"SpaceId,omitempty"` Templates []actiontemplates.ActionTemplateParameter `json:"Templates,omitempty"` TenantedDeploymentMode core.TenantedDeploymentMode `json:"TenantedDeploymentMode,omitempty"` VariableSetID string `json:"VariableSetId,omitempty"` VersioningStrategy *VersioningStrategy `json:"VersioningStrategy,omitempty"` resources.Resource }
func ConvertToVCS ¶ added in v2.33.0
func ConvertToVCS(client newclient.Client, project *Project, commitMessage string, initialCommitBranch string, gitPersistenceSettings GitPersistenceSettings) (*Project, error)
ConvertToVCS converts an input project to use a version-control system (VCS) for its persistence. initialCommitBranch is ignored unless the default branch in the gitPersistenceSettings appears in the protected branch patterns, and will default to "octopus-vcs-conversion" if not explicitly specified.
func GetByID ¶ added in v2.33.0
GetByID returns the project that matches the input ID. If one cannot be found, it returns nil and an error.
func (*Project) UnmarshalJSON ¶
UnmarshalJSON sets this project to its representation in JSON.
type ProjectCloneQuery ¶ added in v2.26.0
type ProjectCloneQuery struct {
CloneProjectID string `uri:"clone" url:"clone"`
}
type ProjectCloneRequest ¶ added in v2.26.0
type ProjectPulseQuery ¶
type ProjectPulseQuery struct {
ProjectIDs []string `uri:"projectIds,omitempty" url:"projectIds,omitempty"`
}
type ProjectService ¶
type ProjectService struct { services.CanDeleteService // contains filtered or unexported fields }
func NewProjectService ¶
func (*ProjectService) Add
deprecated
func (s *ProjectService) Add(project *Project) (*Project, error)
Add creates a new project.
Deprecated: Use projects.Add
func (*ProjectService) Clone ¶ added in v2.26.0
func (s *ProjectService) Clone(sourceProject *Project, request ProjectCloneRequest) (*Project, error)
func (*ProjectService) ConvertToVcs
deprecated
func (s *ProjectService) ConvertToVcs(project *Project, commitMessage string, initialCommitBranch string, gitPersistenceSettings GitPersistenceSettings) (*Project, error)
ConvertToVcs converts an input project to use a version-control system (VCS) for its persistence. initialCommitBranch is ignored unless the default branch in the gitPersistenceSettings appears in the protected branch patterns, and will default to "octopus-vcs-conversion" if not explicitly specified.
Deprecated: Use projects.ConvertToVCS
func (*ProjectService) Get
deprecated
func (s *ProjectService) Get(projectsQuery ProjectsQuery) (*resources.Resources[*Project], error)
Get returns a collection of projects based on the criteria defined by its input query parameter. If an error occurs, an empty collection is returned along with the associated error.
Deprecated: Use projects.Get
func (*ProjectService) GetAll ¶
func (s *ProjectService) GetAll() ([]*Project, error)
GetAll returns all projects. If none can be found or an error occurs, it returns an empty collection.
Deprecates: use projects.GetAll
func (*ProjectService) GetByID
deprecated
func (s *ProjectService) GetByID(id string) (*Project, error)
GetByID returns the project that matches the input ID. If one cannot be found, it returns nil and an error.
Deprecated: Use projects.GetByID
func (*ProjectService) GetByIdentifier ¶ added in v2.11.0
func (p *ProjectService) GetByIdentifier(identifier string) (*Project, error)
func (*ProjectService) GetByName ¶ added in v2.7.0
func (p *ProjectService) GetByName(name string) (*Project, error)
func (*ProjectService) GetChannels ¶
func (s *ProjectService) GetChannels(project *Project) ([]*channels.Channel, error)
func (*ProjectService) GetGitBranch ¶ added in v2.3.2
func (s *ProjectService) GetGitBranch(project *Project, name string) (*GitReference, error)
func (*ProjectService) GetGitBranches ¶ added in v2.3.2
func (s *ProjectService) GetGitBranches(project *Project) ([]*GitReference, error)
func (*ProjectService) GetGitCommit ¶ added in v2.3.2
func (s *ProjectService) GetGitCommit(project *Project, hash string) (*GitReference, error)
func (*ProjectService) GetGitTag ¶ added in v2.3.2
func (s *ProjectService) GetGitTag(project *Project, name string) (*GitReference, error)
func (*ProjectService) GetGitTags ¶ added in v2.3.2
func (s *ProjectService) GetGitTags(project *Project) ([]*GitReference, error)
func (*ProjectService) GetProgression ¶ added in v2.11.0
func (s *ProjectService) GetProgression(project *Project) (*Progression, error)
func (*ProjectService) GetProject ¶
func (s *ProjectService) GetProject(channel *channels.Channel) (*Project, error)
func (*ProjectService) GetReleases ¶
func (s *ProjectService) GetReleases(project *Project) ([]*releases.Release, error)
func (*ProjectService) GetSummary ¶
func (s *ProjectService) GetSummary(project *Project) (*ProjectSummary, error)
func (*ProjectService) Update
deprecated
func (s *ProjectService) Update(project *Project) (*Project, error)
Update modifies a project based on the one provided as input.
Deprecated: Use projects.Update
func (*ProjectService) UpdateWithGitRef ¶
func (s *ProjectService) UpdateWithGitRef(project *Project, gitRef string) (*Project, error)
Update modifies a Git-based project based on the one provided as input.
type ProjectSummary ¶
type ProjectsExperimentalSummariesQuery ¶
type ProjectsExperimentalSummariesQuery struct {
IDs []string `uri:"ids,omitempty" url:"ids,omitempty"`
}
type ProjectsQuery ¶
type ProjectsQuery struct { ClonedFromProjectID string `uri:"clonedFromProjectId,omitempty" url:"clonedFromProjectId,omitempty"` IDs []string `uri:"ids,omitempty" url:"ids,omitempty"` IsClone bool `uri:"clone,omitempty" url:"clone,omitempty"` Name string `uri:"name,omitempty" url:"name,omitempty"` PartialName string `uri:"partialName,omitempty" url:"partialName,omitempty"` Skip int `uri:"skip,omitempty" url:"skip,omitempty"` Take int `uri:"take,omitempty" url:"take,omitempty"` }
type ReleaseCreationStrategy ¶
type ReleaseCreationStrategy struct { ChannelID string `json:"ChannelId,omitempty"` ReleaseCreationPackage *packages.DeploymentActionPackage `json:"ReleaseCreationPackage,omitempty"` ReleaseCreationPackageStepID string `json:"ReleaseCreationPackageStepId,omitempty"` }
type ReleaseProgression ¶ added in v2.4.0
type ReleaseProgression struct { Release *releases.Release `json:"Release"` Channel *channels.Channel `json:"Channel"` Deployments map[string][]*DashboardItem `json:"Deployments"` NextDeployments []string `json:"NextDeployments"` HasUnresolvedDefect bool `json:"HasUnresolvedDefect"` ReleaseRetentionPeriod *core.RetentionPeriod `json:"ReleaseRetentionPeriod"` TentacleRetentionPeriod *core.RetentionPeriod `json:"TentacleRetentionPeriod"` }
ReleaseProgression represents information about a release within the context of a Project Progression Mirrors ReleaseProgressionResource in the server
type ServiceNowExtensionSettings ¶ added in v2.17.3
type ServiceNowExtensionSettings struct { IsStateAutomaticallyTransitioned bool StandardChangeTemplateName string ext.ConnectedChangeControlExtensionSettings }
func NewServiceNowExtensionSettings ¶ added in v2.17.3
func NewServiceNowExtensionSettings(connectionID string, isChangeControlled bool, standardChangeTemplateName string, isStateAutomaticallyTransitioned bool) *ServiceNowExtensionSettings
NewServiceNowExtensionSettings creates an instance of extension settings for ServiceNow.
func (*ServiceNowExtensionSettings) ConnectionID ¶ added in v2.17.3
func (s *ServiceNowExtensionSettings) ConnectionID() string
func (*ServiceNowExtensionSettings) ExtensionID ¶ added in v2.17.3
func (s *ServiceNowExtensionSettings) ExtensionID() extensions.ExtensionID
func (*ServiceNowExtensionSettings) IsChangeControlled ¶ added in v2.17.3
func (s *ServiceNowExtensionSettings) IsChangeControlled() bool
func (ServiceNowExtensionSettings) MarshalJSON ¶ added in v2.17.3
func (s ServiceNowExtensionSettings) MarshalJSON() ([]byte, error)
MarshalJSON returns the ServiceNow extension settings as its JSON encoding.
func (*ServiceNowExtensionSettings) SetConnectionID ¶ added in v2.17.3
func (s *ServiceNowExtensionSettings) SetConnectionID(connectionID string)
func (*ServiceNowExtensionSettings) SetExtensionID ¶ added in v2.17.3
func (s *ServiceNowExtensionSettings) SetExtensionID(extensionID extensions.ExtensionID)
func (*ServiceNowExtensionSettings) SetIsChangeControlled ¶ added in v2.17.3
func (s *ServiceNowExtensionSettings) SetIsChangeControlled(isChangeControlled bool)
func (*ServiceNowExtensionSettings) UnmarshalJSON ¶ added in v2.17.3
func (s *ServiceNowExtensionSettings) UnmarshalJSON(b []byte) error
UnmarshalJSON sets the ServiceNow extension settings to its representation in JSON.
type VersioningStrategy ¶
type VersioningStrategy struct { DonorPackage *packages.DeploymentActionPackage `json:"DonorPackage,omitempty"` DonorPackageStepID *string `json:"DonorPackageStepId,omitempty"` Template string `json:"Template,omitempty"` }
Source Files ¶
- auto_deploy_release_override.go
- conversion_state.go
- convert_to_vcs.go
- convert_to_vcs_response.go
- database_persistence_settings.go
- git_persistence_settings.go
- is_nil.go
- jira_service_management_extension_settings.go
- persistence_settings.go
- persistence_settings_types.go
- progression.go
- project.go
- project_branches.go
- project_clone_request.go
- project_pulse_query.go
- project_service.go
- project_service_git_refs.go
- project_summary.go
- projects_experimental_summaries_query.go
- projects_query.go
- release_creation_strategy.go
- servicenow_extension_settings.go
- versioning_strategy.go