model

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2025 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BusinessCriticalityUnspecified = "unspecified"
	BusinessCriticalityLow         = "low"
	BusinessCriticalityMedium      = "medium"
	BusinessCriticalityHigh        = "high"
	BusinessCriticalityCritical    = "critical"

	MaturityLevelUnspecified  = "unspecified"
	MaturityLevelExperimental = "experimental"
	MaturityLevelProduction   = "production"
	MaturityLevelEndOfLife    = "end_of_life"
)
View Source
const (
	PromotionTypeCopy = "copy"
	PromotionTypeMove = "move"

	// This value cannot be set via the --promotion-type flag in the CLI.
	// It is sent to the promotion_type field in the REST API only when the --dry-run flag is used.
	PromotionTypeDryRun = "dry_run"
)

Variables

View Source
var PromotionTypeValues = []string{
	PromotionTypeCopy,
	PromotionTypeMove,
}

Functions

This section is empty.

Types

type AppDescriptor

type AppDescriptor struct {
	ApplicationKey      string             `json:"application_key"`
	ApplicationName     string             `json:"application_name,omitempty"`
	ProjectKey          string             `json:"project_key,omitempty"`
	Description         *string            `json:"description,omitempty"`
	MaturityLevel       *string            `json:"maturity_level,omitempty"`
	BusinessCriticality *string            `json:"criticality,omitempty"`
	Labels              *map[string]string `json:"labels,omitempty"`
	UserOwners          *[]string          `json:"user_owners,omitempty"`
	GroupOwners         *[]string          `json:"group_owners,omitempty"`
}

type ArtifactProperty

type ArtifactProperty struct {
	Key    string   `json:"key"`
	Values []string `json:"values"`
}

type BindPackageRequest

type BindPackageRequest struct {
	Type    string `json:"package_type"`
	Name    string `json:"package_name"`
	Version string `json:"package_version"`
}

type CommonPromoteAppVersion

type CommonPromoteAppVersion struct {
	PromotionType                string             `json:"promotion_type,omitempty"`
	IncludedRepositoryKeys       []string           `json:"included_repository_keys,omitempty"`
	ExcludedRepositoryKeys       []string           `json:"excluded_repository_keys,omitempty"`
	ArtifactAdditionalProperties []ArtifactProperty `json:"artifact_additional_properties,omitempty"`
}

type CreateAppVersionRequest

type CreateAppVersionRequest struct {
	ApplicationKey string                `json:"application_key"`
	Version        string                `json:"version"`
	Sources        *CreateVersionSources `json:"sources,omitempty"`
	Tag            string                `json:"tag,omitempty"`
}

type CreateVersionArtifact

type CreateVersionArtifact struct {
	Path   string `json:"path"`
	SHA256 string `json:"sha256,omitempty"`
}

type CreateVersionBuild

type CreateVersionBuild struct {
	RepositoryKey       string `json:"repository_key,omitempty"`
	Name                string `json:"name"`
	Number              string `json:"number"`
	Started             string `json:"started,omitempty"`
	IncludeDependencies bool   `json:"include_dependencies,omitempty"`
}

type CreateVersionPackage

type CreateVersionPackage struct {
	Type       string `json:"type"`
	Name       string `json:"name"`
	Version    string `json:"version"`
	Repository string `json:"repository_key"`
}

type CreateVersionReference

type CreateVersionReference struct {
	ApplicationKey string `json:"application_key,omitempty"`
	Version        string `json:"version"`
}

type CreateVersionReleaseBundle

type CreateVersionReleaseBundle struct {
	ProjectKey    string `json:"project_key"`
	RepositoryKey string `json:"repository_key"`
	Name          string `json:"name"`
	Version       string `json:"version"`
}

type CreateVersionSources

type CreateVersionSources struct {
	Packages       []CreateVersionPackage       `json:"packages,omitempty"`
	Builds         []CreateVersionBuild         `json:"builds,omitempty"`
	ReleaseBundles []CreateVersionReleaseBundle `json:"release_bundles,omitempty"`
	Versions       []CreateVersionReference     `json:"versions,omitempty"`
}

type PromoteAppVersionRequest

type PromoteAppVersionRequest struct {
	CommonPromoteAppVersion
	Stage string `json:"target_stage"`
}

type ReleaseAppVersionRequest

type ReleaseAppVersionRequest struct {
	CommonPromoteAppVersion
}

ReleaseAppVersionRequest represents a request to release an application version to production. This struct reuses CommonPromoteAppVersion for consistency with PromoteAppVersionRequest. A release is functionally promoted with a hardcoded stage ("prod") set by the backend, so the stage is not included here. This separation improves readability and intent in the codebase.

func NewReleaseAppVersionRequest

func NewReleaseAppVersionRequest(
	promotionType string,
	includedRepositoryKeys []string,
	excludedRepositoryKeys []string,
	artifactProperties []ArtifactProperty,
) *ReleaseAppVersionRequest

type RollbackAppVersionRequest

type RollbackAppVersionRequest struct {
	FromStage string `json:"from_stage"`
}

func NewRollbackAppVersionRequest

func NewRollbackAppVersionRequest(fromStage string) *RollbackAppVersionRequest

type RollbackAppVersionResponse

type RollbackAppVersionResponse struct {
	ApplicationKey    string `json:"application_key"`
	Version           string `json:"version"`
	ProjectKey        string `json:"project_key"`
	RollbackFromStage string `json:"rollback_from_stage"`
	RollbackToStage   string `json:"rollback_to_stage"`
}

type UpdateAppVersionRequest

type UpdateAppVersionRequest struct {
	Tag              string              `json:"tag,omitempty"`
	Properties       map[string][]string `json:"properties,omitempty"`
	DeleteProperties []string            `json:"delete_properties,omitempty"`
}

Jump to

Keyboard shortcuts

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