projects

package
v2.3.0 Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2022 License: Apache-2.0 Imports: 19 Imported by: 32

Documentation

Index

Constants

View Source
const (
	GitCredentialTypeAnonymous        = GitCredentialType("Anonymous")
	GitCredentialTypeUsernamePassword = GitCredentialType("UsernamePassword")
)

Variables

This section is empty.

Functions

func IsNil

func IsNil(i interface{}) bool

func NewProjects

func NewProjects() *resources.Resources[*Project]

Types

type AnonymousGitCredential

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

func NewAnonymousGitCredential

func NewAnonymousGitCredential() *AnonymousGitCredential

func (*AnonymousGitCredential) GetType

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 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 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 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 NewProject

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

func (*Project) UnmarshalJSON

func (p *Project) UnmarshalJSON(data []byte) error

UnmarshalJSON sets this project to its representation in JSON.

func (Project) Validate

func (resource Project) Validate() error

Validate checks the state of the project and returns an error if invalid.

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 NewProjectService(sling *sling.Sling, uriTemplate string, pulsePath string, experimentalSummariesPath string, importProjectsPath string, exportProjectsPath string) *ProjectService

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, 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) GetChannels

func (s *ProjectService) GetChannels(project *Project) ([]*channels.Channel, 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 ProjectSummary struct {
	HasDeploymentProcess bool `json:"HasDeploymentProcess,omitempty"`
	HasRunbooks          bool `json:"HasRunbooks,omitempty"`
}

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 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

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"`
}

Jump to

Keyboard shortcuts

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