models

package
v1.20.0 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AppNameAndBranchAreRequiredForStartingPipeline

func AppNameAndBranchAreRequiredForStartingPipeline() error

AppNameAndBranchAreRequiredForStartingPipeline Cannot start pipeline when appname and branch are missing

func MatchAll added in v1.17.0

func MatchAll(rr *v1.RadixRegistration) bool

MatchAll returns a ApplicationMatch that always returns true

func OnePartOfDeployKeyIsNotAllowed

func OnePartOfDeployKeyIsNotAllowed() error

OnePartOfDeployKeyIsNotAllowed Error message

func UnmatchedBranchToEnvironment

func UnmatchedBranchToEnvironment(branch string) error

UnmatchedBranchToEnvironment Triggering a pipeline on a un-mapped branch is not allowed

Types

type Application

type Application struct {
	// Name the name of the application
	//
	// required: false
	// example: radix-canary-golang
	Name string `json:"name"`

	// Owner of the application (email). Can be a single person or a shared group email
	//
	// required: false
	Owner string `json:"owner"`

	// Repository the github repository
	//
	// required: false
	Repository string `json:"repository"`

	// Creator of the application (user principle name).
	//
	// required: false
	Creator string `json:"creator"`

	// Registration registration details
	//
	// required: false
	Registration ApplicationRegistration `json:"registration"`

	// Environments List of environments for this application
	//
	// required: false
	Environments []*environmentModels.EnvironmentSummary `json:"environments"`

	// Jobs list of run jobs for the application
	//
	// required: false
	Jobs []*jobModels.JobSummary `json:"jobs"`

	// App alias showing nicer endpoint for application
	//
	// required: false
	AppAlias *ApplicationAlias `json:"appAlias,omitempty"`
}

Application details of an application swagger:model Application

type ApplicationAlias

type ApplicationAlias struct {
	// URL the public endpoint
	//
	// required: true
	// example: https://my-app.app.radix.equinor.com
	URL string `json:"url"`

	// ComponentName the component exposing the endpoint
	//
	// required: true
	// example: frontend
	ComponentName string `json:"componentName"`

	// EnvironmentName the environment hosting the endpoint
	//
	// required: true
	// example: prod
	EnvironmentName string `json:"environmentName"`
}

ApplicationAlias holds public alias information swagger:model ApplicationAlias

type ApplicationMatch added in v1.17.0

type ApplicationMatch func(rr *v1.RadixRegistration) bool

ApplicationMatch defines a match function that takes a RadixRegistration as parameter and returns a bool indicating if the RR matched the filter or not

func MatchByNamesFunc added in v1.17.0

func MatchByNamesFunc(names []string) ApplicationMatch

MatchByNamesFunc returns a ApplicationMatch that checks if the name of a RadixRegistration matches one of the supplied names

func MatchBySSHRepoFunc added in v1.17.0

func MatchBySSHRepoFunc(sshRepo string) ApplicationMatch

MatchByNamesFunc returns a ApplicationMatch that checks if the CloneURL of a RadixRegistration matches sshRepo argument

type ApplicationPatchRequest

type ApplicationPatchRequest struct {
	// AdGroups the groups that should be able to access the application
	//
	// required: false
	AdGroups *[]string `json:"adGroups,omitempty"`

	// Owner of the application - should be an email
	//
	// required: false
	Owner *string `json:"owner,omitempty"`

	// MachineUser is used for interacting directly with Radix API
	//
	// required: false
	// Extensions:
	// x-nullable: true
	MachineUser *bool `json:"machineUser,omitempty"`

	// Repository the github repository
	//
	// required: false
	Repository *string `json:"repository,omitempty"`

	// WBS information
	//
	// required: false
	WBS *string `json:"wbs,omitempty"`

	// ConfigBranch information
	//
	// required: false
	ConfigBranch *string `json:"configBranch,omitempty"`
}

ApplicationPatchRequest contains fields that can be patched on a registration swagger:model ApplicationPatchRequest

type ApplicationRegistration

type ApplicationRegistration struct {
	// Name the unique name of the Radix application
	//
	// required: true
	// example: radix-canary-golang
	Name string `json:"name"`

	// Repository the github repository
	//
	// required: true
	// example: https://github.com/equinor/radix-canary-golang
	Repository string `json:"repository"`

	// SharedSecret the shared secret of the webhook
	//
	// required: true
	SharedSecret string `json:"sharedSecret"`

	// AdGroups the groups that should be able to access the application
	//
	// required: true
	AdGroups []string `json:"adGroups"`

	// Owner of the application (email). Can be a single person or a shared group email
	//
	// required: true
	Owner string `json:"owner"`

	// Owner of the application (email). Can be a single person or a shared group email
	//
	// required: true
	Creator string `json:"creator"`

	// PublicKey the public part of the deploy key set or returned
	// after successful application
	//
	// required: false
	PublicKey string `json:"publicKey,omitempty"`

	// PrivateKey the private part of the deploy key set or returned
	// after successful application
	//
	// required: false
	PrivateKey string `json:"privateKey,omitempty"`

	// MachineUser is on/off toggler of machine user for the application
	//
	// required: false
	MachineUser bool `json:"machineUser"`

	// WBS information
	//
	// required: false
	WBS string `json:"wbs"`

	// ConfigBranch information
	//
	// required: true
	ConfigBranch string `json:"configBranch"`
}

ApplicationRegistration describe an application swagger:model ApplicationRegistration

type ApplicationSummary

type ApplicationSummary struct {
	// Name the name of the application
	//
	// required: false
	// example: radix-canary-golang
	Name string `json:"name"`

	// LatestJob The latest started job
	//
	// required: false
	LatestJob *jobModels.JobSummary `json:"latestJob,omitempty"`
}

ApplicationSummary describe an application swagger:model ApplicationSummary

type ApplicationsSearchRequest added in v1.17.0

type ApplicationsSearchRequest struct {
	// List of application names to be returned
	//
	// required: true
	// example: ["app1", "app2"]
	Names []string `json:"names"`
}

ApplicationsSearchRequest contains the list of application names to be queried swagger:model ApplicationsSearchRequest

type DeployKeyAndSecret added in v1.7.1

type DeployKeyAndSecret struct {
	// PublicDeployKey the public value of the deploy key
	//
	// required: true
	PublicDeployKey string `json:"publicDeployKey"`

	// SharedSecret the shared secret
	//
	// required: true
	SharedSecret string `json:"sharedSecret"`
}

DeployKeyAndSecret Holds generated public deploy key and shared secret swagger:model DeployKeyAndSecret

type MachineUser

type MachineUser struct {
	// Token the value of the token
	//
	// required: true
	Token string `json:"token"`
}

MachineUser Holds info about machine user swagger:model MachineUser

type PipelineParametersBuild

type PipelineParametersBuild struct {
	// Branch the branch to build
	// REQUIRED for "build" and "build-deploy" pipelines
	//
	// example: master
	Branch string `json:"branch"`

	// CommitID the commit ID of the branch to build
	// REQUIRED for "build" and "build-deploy" pipelines
	//
	// example: 4faca8595c5283a9d0f17a623b9255a0d9866a2e
	CommitID string `json:"commitID"`

	// PushImage should image be pushed to container registry. Defaults pushing
	//
	// example: true
	PushImage string `json:"pushImage"`

	// TriggeredBy of the job - if empty will use user token upn (user principle name)
	//
	// example: a_user@equinor.com
	TriggeredBy string `json:"triggeredBy,omitempty"`

	// ImageRepository of the component, without image name and image-tag
	//
	// example: ghcr.io/test
	ImageRepository string `json:"imageRepository,omitempty"`

	// ImageName of the component, without repository name and image-tag
	//
	// example: radix-component
	ImageName string `json:"imageName,omitempty"`

	// ImageTag of the image - if empty will use default logic
	//
	// example: master-latest
	ImageTag string `json:"imageTag,omitempty"`
}

PipelineParametersBuild describe branch to build and its commit ID swagger:model PipelineParametersBuild

func (PipelineParametersBuild) MapPipelineParametersBuildToJobParameter

func (buildParam PipelineParametersBuild) MapPipelineParametersBuildToJobParameter() *jobModels.JobParameters

MapPipelineParametersBuildToJobParameter maps to JobParameter

func (PipelineParametersBuild) PushImageToContainerRegistry

func (buildParam PipelineParametersBuild) PushImageToContainerRegistry() bool

PushImageToContainerRegistry Normalises the "PushImage" param from a string

type PipelineParametersDeploy

type PipelineParametersDeploy struct {
	// Name of environment to deploy
	// REQUIRED for "deploy" pipeline
	//
	// example: prod
	ToEnvironment string `json:"toEnvironment"`

	// TriggeredBy of the job - if empty will use user token upn (user principle name)
	//
	// example: a_user@equinor.com
	TriggeredBy string `json:"triggeredBy,omitempty"`
}

PipelineParametersDeploy describes environment to deploy swagger:model PipelineParametersDeploy

func (PipelineParametersDeploy) MapPipelineParametersDeployToJobParameter

func (deployParam PipelineParametersDeploy) MapPipelineParametersDeployToJobParameter() *jobModels.JobParameters

MapPipelineParametersDeployToJobParameter maps to JobParameter

type PipelineParametersPromote

type PipelineParametersPromote struct {
	// ID of the deployment to promote
	// REQUIRED for "promote" pipeline
	//
	// example: dev-9tyu1-tftmnqzq
	DeploymentName string `json:"deploymentName"`

	// Name of environment where to look for the deployment to be promoted
	// REQUIRED for "promote" pipeline
	//
	// example: prod
	FromEnvironment string `json:"fromEnvironment"`

	// Name of environment to receive the promoted deployment
	// REQUIRED for "promote" pipeline
	//
	// example: prod
	ToEnvironment string `json:"toEnvironment"`

	// TriggeredBy of the job - if empty will use user token upn (user principle name)
	//
	// example: a_user@equinor.com
	TriggeredBy string `json:"triggeredBy,omitempty"`
}

PipelineParametersPromote identify deployment to promote and a target environment swagger:model PipelineParametersPromote

func (PipelineParametersPromote) MapPipelineParametersPromoteToJobParameter

func (promoteParam PipelineParametersPromote) MapPipelineParametersPromoteToJobParameter() *jobModels.JobParameters

MapPipelineParametersPromoteToJobParameter maps to JobParameter

type RegenerateDeployKeyAndSecretData added in v1.7.1

type RegenerateDeployKeyAndSecretData struct {
	// SharedSecret of the shared secret
	//
	// required: true
	SharedSecret string `json:"sharedSecret"`
}

RegenerateDeployKeyAndSecretData Holds regenerated shared secret swagger:model RegenerateDeployKeyAndSecretData

Jump to

Keyboard shortcuts

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