prechecktype

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CtxResultKeyCrossCluster = "cross_cluster" // bool
)

Variables

This section is empty.

Functions

func GetContextResult

func GetContextResult(ctx context.Context, k string) interface{}

func InitContext

func InitContext() context.Context

func PutContextResult

func PutContextResult(ctx context.Context, k string, v interface{})

Types

type ActionPreChecker

type ActionPreChecker interface {
	PreChecker
	ActionType() pipelineyml.ActionType
}

type DiceYmlPreChecker

type DiceYmlPreChecker interface {
	PreChecker
}

type ItemsForCheck

type ItemsForCheck struct {
	// PipelineYml is the pipeline yml content
	PipelineYml string

	// Files include all related files will be used in check process
	Files map[string]string

	// ActionSpecs include all required action specs
	// key: actionType / actionType@actionVersion
	ActionSpecs map[string]apistructs.ActionSpec

	// Labels include all labels declared when create pipeline
	// see: apistructs/labels.go
	Labels map[string]string

	// Envs include all envs:
	// - declared when create pipeline
	Envs map[string]string

	// ClusterName represents which cluster to execute pipeline
	ClusterName string

	Secrets map[string]string

	GlobalSnippetConfigLabels map[string]string
}

type PreChecker

type PreChecker interface {
	Check(ctx context.Context, data interface{}, itemsForCheck ItemsForCheck) (abort bool, message []string)
}

Jump to

Keyboard shortcuts

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