Documentation ¶
Index ¶
- Constants
- func IsNil(i interface{}) bool
- func NewProjects() *resources.Resources[*Project]
- type AnonymousGitCredential
- type AutoDeployReleaseOverride
- type ConvertToVcs
- type ConvertToVcsResponse
- type DashboardItem
- type DatabasePersistenceSettings
- type ExtensionSettingsValues
- type GitCredentialType
- type GitPersistenceSettings
- type GitRefType
- type GitReference
- type IGitCredential
- type IPersistenceSettings
- type Progression
- type Project
- type ProjectPulseQuery
- type ProjectService
- func (s *ProjectService) Add(project *Project) (*Project, error)
- func (s *ProjectService) ConvertToVcs(project *Project, commitMessage string, ...) (*Project, error)
- func (s *ProjectService) Get(projectsQuery ProjectsQuery) (*resources.Resources[*Project], error)
- func (s *ProjectService) GetAll() ([]*Project, error)
- func (s *ProjectService) GetByID(id string) (*Project, error)
- func (p *ProjectService) GetByIdOrName(idOrName 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) 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)
- func (s *ProjectService) UpdateWithGitRef(project *Project, gitRef string) (*Project, error)
- type ProjectSummary
- type ProjectsExperimentalSummariesQuery
- type ProjectsQuery
- type ReleaseCreationStrategy
- type ReleaseProgression
- type UsernamePasswordGitCredential
- type VersionControlSettings
- type VersioningStrategy
Constants ¶
const ( GitCredentialTypeAnonymous = GitCredentialType("Anonymous") GitCredentialTypeUsernamePassword = GitCredentialType("UsernamePassword") )
const ( GitRefTypeBranch = GitRefType("GitBranch") GitRefTypeTag = GitRefType("GitTag") GitRefTypeCommit = GitRefType("GitCommit") )
Variables ¶
This section is empty.
Functions ¶
func NewProjects ¶
Types ¶
type AnonymousGitCredential ¶
type AnonymousGitCredential struct {
// contains filtered or unexported fields
}
func NewAnonymousGitCredential ¶
func NewAnonymousGitCredential() *AnonymousGitCredential
func (*AnonymousGitCredential) GetType ¶
func (a *AnonymousGitCredential) GetType() GitCredentialType
GitCredentialType returns the type for this Git credential.
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 ConvertToVcs ¶
type ConvertToVcs struct { CommitMessage string VersionControlSettings *VersionControlSettings }
func NewConvertToVcs ¶
func NewConvertToVcs(commitMessage string, versionControlSettings *VersionControlSettings) *ConvertToVcs
type ConvertToVcsResponse ¶
type ConvertToVcsResponse struct {
Messages []string
}
type DashboardItem ¶ added in v2.4.0
type DatabasePersistenceSettings ¶
type DatabasePersistenceSettings struct {
// contains filtered or unexported fields
}
DatabasePersistenceSettings represents database persistence settings associated with a project.
func NewDatabasePersistenceSettings ¶
func NewDatabasePersistenceSettings() *DatabasePersistenceSettings
NewDatabasePersistenceSettings creates an instance of database persistence settings.
func (*DatabasePersistenceSettings) GetType ¶
func (d *DatabasePersistenceSettings) GetType() string
GetType returns the type for this persistence settings.
type ExtensionSettingsValues ¶
type ExtensionSettingsValues struct { ExtensionID string `json:"ExtensionId,omitempty"` Values interface{} `json:"Values,omitempty"` }
type GitCredentialType ¶
type GitCredentialType string
type GitPersistenceSettings ¶
type GitPersistenceSettings struct { BasePath string Credentials IGitCredential DefaultBranch string URL *url.URL // contains filtered or unexported fields }
GitPersistenceSettings represents persistence settings associated with a project.
func NewGitPersistenceSettings ¶
func NewGitPersistenceSettings( basePath string, credentials IGitCredential, defaultBranch string, url *url.URL) *GitPersistenceSettings
NewGitPersistenceSettings creates an instance of persistence settings.
func (*GitPersistenceSettings) GetType ¶
func (g *GitPersistenceSettings) GetType() string
GetType returns the type for this persistence settings.
func (*GitPersistenceSettings) MarshalJSON ¶
func (p *GitPersistenceSettings) MarshalJSON() ([]byte, error)
MarshalJSON returns persistence settings as its JSON encoding.
func (*GitPersistenceSettings) UnmarshalJSON ¶
func (p *GitPersistenceSettings) UnmarshalJSON(b []byte) error
UnmarshalJSON sets the persistence settings to its representation in JSON.
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" 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 IGitCredential ¶
type IGitCredential interface {
GetType() GitCredentialType
}
IGitCredential defines the interface for Git-associated credentials.
type IPersistenceSettings ¶
type IPersistenceSettings interface {
GetType() string
}
IPersistenceSettings defines the interface for persistence settings.
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,omitempty"` 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,omitempty"` DeploymentChangesTemplate string `json:"DeploymentChangesTemplate,omitempty"` DeploymentProcessID string `json:"DeploymentProcessId,omitempty"` Description string `json:"Description,omitempty"` ExtensionSettings []ExtensionSettingsValues `json:"ExtensionSettings,omitempty"` IncludedLibraryVariableSets []string `json:"IncludedLibraryVariableSetIds,omitempty"` IsDisabled bool `json:"IsDisabled,omitempty"` IsDiscreteChannelRelease bool `json:"DiscreteChannelRelease,omitempty"` IsVersionControlled bool `json:"IsVersionControlled,omitempty"` LifecycleID string `json:"LifecycleId" validate:"required"` Name string `json:"Name" validate:"required"` PersistenceSettings IPersistenceSettings `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 (*Project) UnmarshalJSON ¶
UnmarshalJSON sets this project to its representation in JSON.
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 ¶
func (s *ProjectService) Add(project *Project) (*Project, error)
Add creates a new project.
func (*ProjectService) ConvertToVcs ¶
func (s *ProjectService) ConvertToVcs(project *Project, commitMessage string, versionControlSettings *VersionControlSettings) (*Project, error)
ConvertToVcs converts an input project to use a version-control system (VCS) for its persistence.
func (*ProjectService) Get ¶
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.
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.
func (*ProjectService) GetByID ¶
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.
func (*ProjectService) GetByIdOrName ¶ added in v2.7.0
func (p *ProjectService) GetByIdOrName(idOrName 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) 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 ¶
func (s *ProjectService) Update(project *Project) (*Project, error)
Update modifies a project based on the one provided as input.
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 `url:"clonedFromProjectId"` 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 UsernamePasswordGitCredential ¶
type UsernamePasswordGitCredential struct { Password *core.SensitiveValue `json:"Password"` Username string `json:"Username"` // contains filtered or unexported fields }
UsernamePasswordGitCredential defines a username-password Git credential.
func NewUsernamePasswordGitCredential ¶
func NewUsernamePasswordGitCredential(username string, password *core.SensitiveValue) *UsernamePasswordGitCredential
NewUsernamePasswordGitCredential creates and initializes an username-password Git credential.
func (*UsernamePasswordGitCredential) GetType ¶
func (u *UsernamePasswordGitCredential) GetType() GitCredentialType
GitCredentialType returns the type for this Git credential.
type VersionControlSettings ¶
type VersionControlSettings struct { BasePath string Credentials IGitCredential DefaultBranch string Type string URL *url.URL }
VersionControlSettings represents version control settings associated with a project.
func NewVersionControlSettings ¶
func NewVersionControlSettings( basePath string, credentials IGitCredential, defaultBranch string, persistenceType string, url *url.URL) *VersionControlSettings
NewVersionControlSettings creates an instance of version control settings.
func (*VersionControlSettings) MarshalJSON ¶
func (v *VersionControlSettings) MarshalJSON() ([]byte, error)
MarshalJSON returns version control settings as its JSON encoding.
func (*VersionControlSettings) UnmarshalJSON ¶
func (v *VersionControlSettings) UnmarshalJSON(b []byte) error
UnmarshalJSON sets the version control 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 ¶
- anonymous_git_credential.go
- auto_deploy_release_override.go
- convert_to_vcs.go
- convert_to_vcs_response.go
- database_persistence_settings.go
- extension_settings_values.go
- git_credential.go
- git_credential_types.go
- git_persistence_settings.go
- is_nil.go
- persistence_settings.go
- progression.go
- project.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
- username_password_git_credential.go
- version_control_settings.go
- versioning_strategy.go