common

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2024 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RuntimeParameters

type RuntimeParameters struct {
	RuntimePluginVariables []*RuntimePluginVariableDto `json:"runtimePluginVariables,omitempty" validate:"dive"`
}

RuntimeParameters holds values that needed to be injected/used in ci build process.

func NewRuntimeParameters

func NewRuntimeParameters() *RuntimeParameters

NewRuntimeParameters returns a new instance of RuntimeParameters.

func (*RuntimeParameters) AddRuntimeGlobalVariable

func (r *RuntimeParameters) AddRuntimeGlobalVariable(name, value string) *RuntimeParameters

func (*RuntimeParameters) AddSystemVariable

func (r *RuntimeParameters) AddSystemVariable(name, value string) *RuntimeParameters

func (*RuntimeParameters) GetGlobalRuntimeVariables

func (r *RuntimeParameters) GetGlobalRuntimeVariables() map[string]string

func (*RuntimeParameters) GetSystemVariables

func (r *RuntimeParameters) GetSystemVariables() map[string]string

type RuntimePluginVariableDto

type RuntimePluginVariableDto struct {
	Name              string            `json:"name" validate:"required"`
	Value             string            `json:"value"`
	Format            commonBean.Format `json:"format" validate:"required"`
	VariableStepScope VariableStepScope `json:"variableStepScope" validate:"oneof=GLOBAL PIPELINE_STAGE"`
}

RuntimePluginVariableDto is used to define the runtime plugin variables.

func NewRuntimeGlobalVariableDto

func NewRuntimeGlobalVariableDto(name, value string) *RuntimePluginVariableDto

NewRuntimeGlobalVariableDto returns a new instance of RuntimePluginVariableDto with global variable scope.

func NewRuntimePluginVariableDto

func NewRuntimePluginVariableDto(name, value string, format commonBean.Format, variableStepScope VariableStepScope) *RuntimePluginVariableDto

NewRuntimePluginVariableDto returns a new instance of RuntimePluginVariableDto.

func NewRuntimeSystemVariableDto

func NewRuntimeSystemVariableDto(name, value string) *RuntimePluginVariableDto

NewRuntimeSystemVariableDto returns a new instance of RuntimePluginVariableDto with system variable.

func (*RuntimePluginVariableDto) IsGlobalVariableScope

func (r *RuntimePluginVariableDto) IsGlobalVariableScope() bool

IsGlobalVariableScope returns true if the runtime plugin variable is of global variable scope. If the variable is nil, it returns false.

func (*RuntimePluginVariableDto) IsSystemVariableScope

func (r *RuntimePluginVariableDto) IsSystemVariableScope() bool

IsSystemVariableScope returns true if the variable is of SYSTEM variable type. If the variable is nil, it returns false.

type VariableStepScope

type VariableStepScope string

VariableStepScope is used to define the scope of the runtime plugin variable.

const (
	// GlobalVariableScope is used to define the global variable scope.
	GlobalVariableScope VariableStepScope = "GLOBAL"
	// SystemVariableScope is used to define the global variable scope.
	SystemVariableScope VariableStepScope = "SYSTEM"
)

Jump to

Keyboard shortcuts

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