models

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2022 License: Apache-2.0 Imports: 0 Imported by: 5 modules, 3 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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"
)

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 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"`
}

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"`
}

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"`
}

type Filter

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

type Job

type Job struct {
	ID                   *string                  `json:"id,omitempty"`
	Name                 *string                  `json:"name,omitempty"`
	Steps                []*Step                  `json:"steps,omitempty"`
	ContinueOnError      *bool                    `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"`
}

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    []string     `json:"imports,omitempty"`
	Parameters []*Parameter `json:"parameters,omitempty"`
	Defaults   *Defaults    `json:"defaults,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 Shell

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

type Step

type Step struct {
	ID                   *string                  `json:"id,omitempty"`
	Name                 *string                  `json:"name,omitempty"`
	Type                 StepType                 `json:"type,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"`
	FileReference        *FileReference           `json:"file_reference,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 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