models

package
v1.3.7 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	PullRequestPermission = "pull-request"
	PushPermission        = "push"
	RunPipelinePermission = "run-pipeline"
)
View Source
const (
	DockerRunnerType RunnerType = "docker"
	VmRunnerType     RunnerType = "vm"
	ServerRunnerType RunnerType = "server"

	WindowsOS OS = "windows"
	LinuxOS   OS = "linux"
	MacOS     OS = "macos"
)
View Source
const (
	CommitSHA     VersionType = "commit"
	TagVersion    VersionType = "tag"
	BranchVersion VersionType = "branch"
	Latest        VersionType = "latest"
	None          VersionType = "none"

	ShellStepType StepType = "shell"
	TaskStepType  StepType = "task"

	DockerTaskType TaskType = "docker"
	CITaskType     TaskType = "ci"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ConcurrencyGroup

type ConcurrencyGroup string

type Condition

type Condition struct {
	Statement string            `json:"statement,omitempty"`
	Allow     *bool             `json:"allow,omitempty"`
	Paths     *Filter           `json:"paths,omitempty"`
	Exists    *Filter           `json:"exists,omitempty"`
	Branches  *Filter           `json:"branches,omitempty"`
	Events    []EventType       `json:"events,omitempty"`
	Variables map[string]string `json:"variables,omitempty"`
}

type Credentials added in v1.0.0

type Credentials struct {
	Username string
	Token    string
}

type Defaults

type Defaults struct {
	EnvironmentVariables *EnvironmentVariablesRef `json:"environment_variables,omitempty"`
	Scans                *Scans                   `json:"scans,omitempty"`
	Runner               *Runner                  `json:"runner,omitempty"`
	Conditions           []*Condition             `json:"conditions,omitempty"`
	ContinueOnError      *bool                    `json:"continue_on_error,omitempty"`
	TokenPermissions     *TokenPermissions        `json:"token_permissions,omitempty"`
	Settings             *map[string]any          `json:"settings,omitempty"`
	FileReference        *FileReference           `json:"file_reference,omitempty"`
	PostSteps            []*Step                  `json:"post_steps,omitempty"`
	PreSteps             []*Step                  `json:"pre_steps,omitempty"`
	Resources            *Resources               `json:"resources,omitempty"`
}

type DockerMetadata

type DockerMetadata struct {
	Image                 *string `json:"image,omitempty"`
	Label                 *string `json:"label,omitempty"`
	RegistryURL           *string `json:"registry_url,omitempty"`
	RegistryCredentialsID *string `json:"registry_credentials_id,omitempty"`
}

type Entity

type Entity struct {
	ID   *string `json:"id,omitempty"`
	Name *string `json:"name,omitempty"`
}

type EnvironmentVariables

type EnvironmentVariables map[string]any

type EnvironmentVariablesRef

type EnvironmentVariablesRef struct {
	EnvironmentVariables `json:"environment_variables,omitempty"`
	FileReference        *FileReference `json:"file_reference,omitempty"`
	Imports              *Import        `json:"imports,omitempty"`
}

type EventType

type EventType string
const (
	PushEvent            EventType = "push"
	PullRequestEvent     EventType = "pull_request"
	ForkEvent            EventType = "fork"
	ManualEvent          EventType = "manual"
	PipelineTriggerEvent EventType = "pipeline_trigger"
	PipelineRunEvent     EventType = "pipeline_run"
	ScheduledEvent       EventType = "scheduled"
)

type FileLocation

type FileLocation struct {
	Line   int `json:"line,omitempty"`
	Column int `json:"column,omitempty"`
}

type FileReference

type FileReference struct {
	StartRef *FileLocation `json:"start_ref,omitempty"`
	EndRef   *FileLocation `json:"end_ref,omitempty"`
	IsAlias  bool          `json:"is_alias,omitempty"`
}

type Filter

type Filter struct {
	AllowList []string `json:"allow_list,omitempty"`
	DenyList  []string `json:"deny_list,omitempty"`
}

type Import added in v1.0.0

type Import struct {
	Source        *ImportSource  `json:"source,omitempty"`
	Version       *string        `json:"version,omitempty"`
	VersionType   VersionType    `json:"version_type,omitempty"`
	Pipeline      *Pipeline      `json:"pipeline,omitempty"`
	Parameters    map[string]any `json:"parameters,omitempty"`
	Secrets       *SecretsRef    `json:"secrets,omitempty"`
	FileReference *FileReference `json:"file_reference,omitempty"`
}

type ImportSource added in v1.0.0

type ImportSource struct {
	SCM             Platform   `json:"scm,omitempty"`
	Organization    *string    `json:"organization,omitempty"`
	Repository      *string    `json:"repository,omitempty"`
	Path            *string    `json:"path,omitempty"`
	Type            SourceType `json:"type,omitempty"`
	RepositoryAlias *string    `json:"alias,omitempty"`
	Reference       *string    `json:"reference,omitempty"`
}

type Job

type Job struct {
	ID                   *string                  `json:"id,omitempty"`
	Name                 *string                  `json:"name,omitempty"`
	Steps                []*Step                  `json:"steps,omitempty"`
	ContinueOnError      *string                  `json:"continue_on_error,omitempty"`
	PreSteps             []*Step                  `json:"pre_steps,omitempty"`
	PostSteps            []*Step                  `json:"post_steps,omitempty"`
	EnvironmentVariables *EnvironmentVariablesRef `json:"environment_variables,omitempty"`
	Runner               *Runner                  `json:"runner,omitempty"`
	Conditions           []*Condition             `json:"conditions,omitempty"`
	ConcurrencyGroup     *ConcurrencyGroup        `json:"concurrency_group,omitempty"`
	Inputs               []*Parameter             `json:"inputs,omitempty"`
	TimeoutMS            *int                     `json:"timeout_ms,omitempty"`
	Tags                 []string                 `json:"tags,omitempty"`
	TokenPermissions     *TokenPermissions        `json:"token_permissions,omitempty"`
	Dependencies         []*JobDependency         `json:"dependencies,omitempty"`
	Metadata             Metadata                 `json:"metadata,omitempty"`
	Matrix               *Matrix                  `json:"matrix,omitempty"`
	FileReference        *FileReference           `json:"file_reference,omitempty"`
	Imports              *Import                  `json:"imports,omitempty"`
}

type JobDependency

type JobDependency struct {
	JobID            *string           `json:"job_id,omitempty"`
	ConcurrencyGroup *ConcurrencyGroup `json:"concurrency_group,omitempty"`
	Pipeline         *string           `json:"pipeline,omitempty"`
}

type Matrix added in v0.2.0

type Matrix struct {
	Matrix        map[string]any
	Include       []map[string]any
	Exclude       []map[string]any
	FileReference *FileReference
}

type Metadata

type Metadata struct {
	Build  bool `json:"build,omitempty"`
	Test   bool `json:"test,omitempty"`
	Deploy bool `json:"deploy,omitempty"`
}

type OS

type OS string

type Parameter

type Parameter struct {
	Name          *string        `json:"name,omitempty"`
	Value         any            `json:"value,omitempty"`
	Description   *string        `json:"description,omitempty"`
	Default       any            `json:"default,omitempty"`
	Options       []string       `json:"options,omitempty"`
	FileReference *FileReference `json:"file_reference,omitempty"`
}

type Permission

type Permission struct {
	Read  bool `json:"read,omitempty"`
	Write bool `json:"write,omitempty"`
	Admin bool `json:"admin,omitempty"`
}

type Pipeline

type Pipeline struct {
	Id         *string      `json:"id,omitempty"`
	Name       *string      `json:"name,omitempty"`
	Triggers   *Triggers    `json:"triggers,omitempty"`
	Jobs       []*Job       `json:"jobs,omitempty"`
	Imports    []*Import    `json:"imports,omitempty"`
	Parameters []*Parameter `json:"parameters,omitempty"`
	Defaults   *Defaults    `json:"defaults,omitempty"`
	Platform   Platform     `json:"platform,omitempty"`
}

type Platform added in v1.0.0

type Platform string

type Resources added in v1.2.0

type Resources struct {
	Repositories  []*ImportSource `json:"repositories,omitempty"`
	FileReference *FileReference  `json:"file_reference,omitempty"`
}

type Runner

type Runner struct {
	Type           *string         `json:"type,omitempty"`
	Labels         *[]string       `json:"labels,omitempty"`
	OS             *string         `json:"os,omitempty"`
	Arch           *string         `json:"arch,omitempty"`
	SelfHosted     *bool           `json:"self_hosted,omitempty"`
	DockerMetadata *DockerMetadata `json:"docker_metadata,omitempty"`
	FileReference  *FileReference  `json:"file_reference,omitempty"`
}

type RunnerType

type RunnerType string

type Scans

type Scans struct {
	Secrets      *bool `json:"secrets,omitempty"`
	Iac          *bool `json:"iac,omitempty"`
	Pipelines    *bool `json:"pipelines,omitempty"`
	SAST         *bool `json:"sast,omitempty"`
	Dependencies *bool `json:"dependencies,omitempty"`
	License      *bool `json:"license,omitempty"`
}

type SecretsRef added in v1.0.0

type SecretsRef struct {
	Secrets       map[string]any `json:"secrets,omitempty"`
	Inherit       bool           `json:"inherit,omitempty"`
	FileReference *FileReference `json:"file_reference,omitempty"`
}

type Shell

type Shell struct {
	Type          *string        `json:"type,omitempty"`
	Script        *string        `json:"script,omitempty"`
	FileReference *FileReference `json:"file_reference,omitempty"`
}

type SourceType added in v1.0.0

type SourceType string
const (
	SourceTypeLocal  SourceType = "local"
	SourceTypeRemote SourceType = "remote"
)

type Step

type Step struct {
	ID                   *string                  `json:"id,omitempty"`
	Name                 *string                  `json:"name,omitempty"`
	Type                 StepType                 `json:"type,omitempty"`
	Runner               *Runner                  `json:"runner,omitempty"`
	FailsPipeline        *bool                    `json:"fails_pipeline,omitempty"`
	Disabled             *bool                    `json:"disabled,omitempty"`
	EnvironmentVariables *EnvironmentVariablesRef `json:"environment_variables,omitempty"`
	WorkingDirectory     *string                  `json:"working_directory,omitempty"`
	Timeout              *int                     `json:"timeout,omitempty"`
	Conditions           *[]Condition             `json:"conditions,omitempty"`
	Shell                *Shell                   `json:"shell,omitempty"`
	Task                 *Task                    `json:"task,omitempty"`
	Metadata             Metadata                 `json:"metadata,omitempty"`
	AfterScript          *Shell                   `json:"after_script,omitempty"`
	FileReference        *FileReference           `json:"file_reference,omitempty"`
	Imports              *Import                  `json:"imports,omitempty"`
}

type StepType

type StepType string

type Task

type Task struct {
	ID          *string      `json:"id,omitempty"`
	Name        *string      `json:"name,omitempty"`
	Inputs      []*Parameter `json:"inputs,omitempty"`
	Version     *string      `json:"version,omitempty"`
	VersionType VersionType  `json:"version_type,omitempty"`
	Type        TaskType     `json:"type,omitempty"`
}

type TaskType added in v1.3.3

type TaskType string

type TokenPermissions

type TokenPermissions struct {
	Permissions   map[string]Permission
	FileReference *FileReference
}

type Trigger

type Trigger struct {
	Branches      *Filter        `json:"branches,omitempty"`
	Paths         *Filter        `json:"paths,omitempty"`
	Tags          *Filter        `json:"tags,omitempty"`
	Exists        *Filter        `json:"exists,omitempty"`
	Parameters    []Parameter    `json:"parameters,omitempty"`
	Pipelines     []string       `json:"pipelines,omitempty"`
	Filters       map[string]any `json:"filters,omitempty"`
	Event         EventType      `json:"event,omitempty"`
	Disabled      *bool          `json:"disabled,omitempty"`
	Schedules     *[]string      `json:"schedules,omitempty"`
	FileReference *FileReference `json:"file_reference,omitempty"`
}

type Triggers

type Triggers struct {
	Triggers      []*Trigger     `json:"triggers,omitempty"`
	FileReference *FileReference `json:"file_reference,omitempty"`
}

type Variable

type Variable struct {
	Context   *string `json:"context,omitempty"`
	Name      *string `json:"name,omitempty"`
	Value     *string `json:"value,omitempty"`
	Parent    *Entity `json:"parent,omitempty"`
	Masked    *bool   `json:"masked,omitempty"`
	Protected *bool   `json:"protected,omitempty"`
}

type VersionType

type VersionType string

Jump to

Keyboard shortcuts

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