ast

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AddSSHKey

type AddSSHKey struct {
	protocol.Range
	Fingerprints []string
}

func (AddSSHKey) GetName

func (step AddSSHKey) GetName() string

func (AddSSHKey) GetRange

func (step AddSSHKey) GetRange() protocol.Range

type AttachWorkspace

type AttachWorkspace struct {
	protocol.Range
	At string
}

func (AttachWorkspace) GetName

func (step AttachWorkspace) GetName() string

func (AttachWorkspace) GetRange

func (step AttachWorkspace) GetRange() protocol.Range

type BaseExecutor

type BaseExecutor struct {
	Name                string
	NameRange           protocol.Range
	Range               protocol.Range
	ResourceClass       string
	ResourceClassRange  protocol.Range
	BuiltInParameters   ExecutableParameters
	UserParameters      map[string]Parameter
	UserParametersRange protocol.Range
	Uncomplete          bool
	Environment         Environment
}

func (BaseExecutor) GetEnvs

func (e BaseExecutor) GetEnvs() Environment

func (BaseExecutor) GetName

func (e BaseExecutor) GetName() string

func (BaseExecutor) GetNameRange

func (e BaseExecutor) GetNameRange() protocol.Range

func (BaseExecutor) GetParameters

func (e BaseExecutor) GetParameters() map[string]Parameter

func (BaseExecutor) GetParametersRange

func (e BaseExecutor) GetParametersRange() protocol.Range

func (BaseExecutor) GetRange

func (e BaseExecutor) GetRange() protocol.Range

func (BaseExecutor) GetResourceClass

func (e BaseExecutor) GetResourceClass() string

func (BaseExecutor) IsUncomplete

func (e BaseExecutor) IsUncomplete() bool

type BaseParameter

type BaseParameter struct {
	Name         string
	NameRange    protocol.Range
	Range        protocol.Range
	HasDefault   bool
	Description  string
	TypeRange    protocol.Range
	DefaultRange protocol.Range
}

type BooleanParameter

type BooleanParameter struct {
	BaseParameter
	Default bool
}

Boolean parameter definition

func (BooleanParameter) GetDefaultRange

func (p BooleanParameter) GetDefaultRange() protocol.Range

func (BooleanParameter) GetDescription

func (p BooleanParameter) GetDescription() string

func (BooleanParameter) GetName

func (p BooleanParameter) GetName() string

func (BooleanParameter) GetNameRange

func (p BooleanParameter) GetNameRange() protocol.Range

func (BooleanParameter) GetRange

func (p BooleanParameter) GetRange() protocol.Range

func (BooleanParameter) GetType

func (p BooleanParameter) GetType() string

func (BooleanParameter) GetTypeRange

func (p BooleanParameter) GetTypeRange() protocol.Range

func (BooleanParameter) IsOptional

func (p BooleanParameter) IsOptional() bool

type BranchesFilter

type BranchesFilter struct {
	Range protocol.Range

	Only      []string
	OnlyRange protocol.Range

	Ignore      []string
	IgnoreRange protocol.Range
}

type Checkout

type Checkout struct {
	protocol.Range
	Path string
}

func (Checkout) GetName

func (step Checkout) GetName() string

func (Checkout) GetRange

func (step Checkout) GetRange() protocol.Range

type Command

type Command struct {
	Range protocol.Range

	Name             string
	NameRange        protocol.Range
	Description      string
	DescriptionRange protocol.Range

	Steps      []Step
	StepsRange protocol.Range

	Parameters      map[string]Parameter
	ParametersRange protocol.Range

	Contexts *[]string
}

type DockerExecutor

type DockerExecutor struct {
	BaseExecutor
	Image         []DockerImage
	ServiceImages []DockerImage
}

func (DockerExecutor) GetEnvs

func (e DockerExecutor) GetEnvs() Environment

func (DockerExecutor) GetName

func (e DockerExecutor) GetName() string

func (DockerExecutor) GetNameRange

func (e DockerExecutor) GetNameRange() protocol.Range

func (DockerExecutor) GetParameters

func (e DockerExecutor) GetParameters() map[string]Parameter

func (DockerExecutor) GetParametersRange

func (e DockerExecutor) GetParametersRange() protocol.Range

func (DockerExecutor) GetRange

func (e DockerExecutor) GetRange() protocol.Range

func (DockerExecutor) GetResourceClass

func (e DockerExecutor) GetResourceClass() string

func (DockerExecutor) IsUncomplete

func (e DockerExecutor) IsUncomplete() bool

type DockerImage

type DockerImage struct {
	Image      DockerImageInfo
	ImageRange protocol.Range

	Name        string
	Entrypoint  []string
	Command     []string
	User        string
	Environment map[string]string
	Auth        DockerImageAuth
	AwsAuth     DockerImageAWSAuth
}

type DockerImageAWSAuth

type DockerImageAWSAuth struct {
	AWSAccessKeyID     string
	AWSSecretAccessKey string
}

type DockerImageAuth

type DockerImageAuth struct {
	Username string
	Password string
}

type DockerImageInfo

type DockerImageInfo struct {
	Namespace string
	Name      string
	Tag       string

	FullPath string
}

type EnumParameter

type EnumParameter struct {
	BaseParameter
	Default string   // TODO: check
	Enum    []string // TODO: check
}

Enum parameter definition

func (EnumParameter) GetDefaultRange

func (p EnumParameter) GetDefaultRange() protocol.Range

func (EnumParameter) GetDescription

func (p EnumParameter) GetDescription() string

func (EnumParameter) GetName

func (p EnumParameter) GetName() string

func (EnumParameter) GetNameRange

func (p EnumParameter) GetNameRange() protocol.Range

func (EnumParameter) GetRange

func (p EnumParameter) GetRange() protocol.Range

func (EnumParameter) GetType

func (p EnumParameter) GetType() string

func (EnumParameter) GetTypeRange

func (p EnumParameter) GetTypeRange() protocol.Range

func (EnumParameter) IsOptional

func (p EnumParameter) IsOptional() bool

type EnvVariableParameter

type EnvVariableParameter struct {
	BaseParameter
	Default string
}

Environment Variable parameter definition

func (EnvVariableParameter) GetDefaultRange

func (p EnvVariableParameter) GetDefaultRange() protocol.Range

func (EnvVariableParameter) GetDescription

func (p EnvVariableParameter) GetDescription() string

func (EnvVariableParameter) GetName

func (p EnvVariableParameter) GetName() string

func (EnvVariableParameter) GetNameRange

func (p EnvVariableParameter) GetNameRange() protocol.Range

func (EnvVariableParameter) GetRange

func (p EnvVariableParameter) GetRange() protocol.Range

func (EnvVariableParameter) GetType

func (p EnvVariableParameter) GetType() string

func (EnvVariableParameter) GetTypeRange

func (p EnvVariableParameter) GetTypeRange() protocol.Range

func (EnvVariableParameter) IsOptional

func (p EnvVariableParameter) IsOptional() bool

type Environment

type Environment struct {
	Range protocol.Range
	Keys  []string
}

type EnvironmentParameter

type EnvironmentParameter map[string]string

type ExecutableParameters

type ExecutableParameters struct {
	Description      string
	Shell            string
	WorkingDirectory string
}

type Executor

type Executor interface {
	GetRange() protocol.Range

	GetName() string
	GetNameRange() protocol.Range

	IsUncomplete() bool

	GetResourceClass() string

	GetParameters() map[string]Parameter
	GetParametersRange() protocol.Range

	GetEnvs() Environment
}

type ExecutorParameter

type ExecutorParameter struct {
	BaseParameter
	Default string
}

Executor parameter definition

func (ExecutorParameter) GetDefaultRange

func (p ExecutorParameter) GetDefaultRange() protocol.Range

func (ExecutorParameter) GetDescription

func (p ExecutorParameter) GetDescription() string

func (ExecutorParameter) GetName

func (p ExecutorParameter) GetName() string

func (ExecutorParameter) GetNameRange

func (p ExecutorParameter) GetNameRange() protocol.Range

func (ExecutorParameter) GetRange

func (p ExecutorParameter) GetRange() protocol.Range

func (ExecutorParameter) GetType

func (p ExecutorParameter) GetType() string

func (ExecutorParameter) GetTypeRange

func (p ExecutorParameter) GetTypeRange() protocol.Range

func (ExecutorParameter) IsOptional

func (p ExecutorParameter) IsOptional() bool

type IntegerParameter

type IntegerParameter struct {
	BaseParameter
	Default int
}

Integer parameter definition

func (IntegerParameter) GetDefaultRange

func (p IntegerParameter) GetDefaultRange() protocol.Range

func (IntegerParameter) GetDescription

func (p IntegerParameter) GetDescription() string

func (IntegerParameter) GetName

func (p IntegerParameter) GetName() string

func (IntegerParameter) GetNameRange

func (p IntegerParameter) GetNameRange() protocol.Range

func (IntegerParameter) GetRange

func (p IntegerParameter) GetRange() protocol.Range

func (IntegerParameter) GetType

func (p IntegerParameter) GetType() string

func (IntegerParameter) GetTypeRange

func (p IntegerParameter) GetTypeRange() protocol.Range

func (IntegerParameter) IsOptional

func (p IntegerParameter) IsOptional() bool

type Job

type Job struct {
	Range protocol.Range

	Name      string
	NameRange protocol.Range

	Shell            string
	WorkingDirectory string
	Parallelism      int
	ParallelismRange protocol.Range

	ResourceClass      string
	ResourceClassRange protocol.Range

	Steps      []Step
	StepsRange protocol.Range

	Description string

	Executor           string
	ExecutorParameters map[string]ParameterValue
	ExecutorRange      protocol.Range

	Parameters      map[string]Parameter
	ParametersRange protocol.Range

	Docker      DockerExecutor
	DockerRange protocol.Range

	Environment      map[string]string
	EnvironmentRange protocol.Range

	Contexts     *[]string
	Machine      MachineExecutor
	MachineRange protocol.Range

	MacOS      MacOSExecutor
	MacOSRange protocol.Range

	CompletionItem *[]protocol.CompletionItem
}

func (*Job) AddCompletionItem

func (job *Job) AddCompletionItem(label string, commitCharacters []string)

type JobRef

type JobRef struct {
	JobRefRange protocol.Range

	// JobName is the name of the job that will be executed,
	// it can be used to reference a job in the workflow
	JobName      string
	JobNameRange protocol.Range

	// StepName is the name of the job in the workflow,
	// not the job that will be executed
	StepName      string
	StepNameRange protocol.Range
	Requires      []TextAndRange
	Context       []TextAndRange
	Type          string
	TypeRange     protocol.Range
	Parameters    map[string]ParameterValue

	PreSteps      []Step
	PreStepsRange protocol.Range

	PostSteps      []Step
	PostStepsRange protocol.Range

	HasMatrix    bool
	MatrixParams map[string][]ParameterValue
}

type MacOSExecutor

type MacOSExecutor struct {
	BaseExecutor
	Xcode      string
	XcodeRange protocol.Range
}

func (MacOSExecutor) GetEnvs

func (e MacOSExecutor) GetEnvs() Environment

func (MacOSExecutor) GetName

func (e MacOSExecutor) GetName() string

func (MacOSExecutor) GetNameRange

func (e MacOSExecutor) GetNameRange() protocol.Range

func (MacOSExecutor) GetParameters

func (e MacOSExecutor) GetParameters() map[string]Parameter

func (MacOSExecutor) GetParametersRange

func (e MacOSExecutor) GetParametersRange() protocol.Range

func (MacOSExecutor) GetRange

func (e MacOSExecutor) GetRange() protocol.Range

func (MacOSExecutor) GetResourceClass

func (e MacOSExecutor) GetResourceClass() string

func (MacOSExecutor) IsUncomplete

func (e MacOSExecutor) IsUncomplete() bool

type MachineExecutor

type MachineExecutor struct {
	BaseExecutor
	Image              string
	ImageRange         protocol.Range
	DockerLayerCaching bool
	Machine            bool
	IsDeprecated       bool // This field is true when using `machine: true`
}

func (MachineExecutor) GetEnvs

func (e MachineExecutor) GetEnvs() Environment

func (MachineExecutor) GetName

func (e MachineExecutor) GetName() string

func (MachineExecutor) GetNameRange

func (e MachineExecutor) GetNameRange() protocol.Range

func (MachineExecutor) GetParameters

func (e MachineExecutor) GetParameters() map[string]Parameter

func (MachineExecutor) GetParametersRange

func (e MachineExecutor) GetParametersRange() protocol.Range

func (MachineExecutor) GetRange

func (e MachineExecutor) GetRange() protocol.Range

func (MachineExecutor) GetResourceClass

func (e MachineExecutor) GetResourceClass() string

func (MachineExecutor) IsUncomplete

func (e MachineExecutor) IsUncomplete() bool

type NamedStep

type NamedStep struct {
	Name            string
	Parameters      map[string]ParameterValue // Handle more values than just strings
	ParametersRange protocol.Range
	Range           protocol.Range
}

func (NamedStep) GetName

func (step NamedStep) GetName() string

func (NamedStep) GetRange

func (step NamedStep) GetRange() protocol.Range

type Orb

type Orb struct {
	Url          OrbURL
	Name         string
	Range        protocol.Range
	NameRange    protocol.Range
	VersionRange protocol.Range
	ValueRange   protocol.Range
	ValueNode    *sitter.Node
}

type OrbInfo

type OrbInfo struct {
	OrbParsedAttributes
	IsLocal bool

	CreatedAt   string
	Description string
	Source      string
	RemoteInfo  RemoteOrbInfo
}

type OrbParsedAttributes

type OrbParsedAttributes struct {
	Name string

	Commands           map[string]Command
	Jobs               map[string]Job
	Executors          map[string]Executor
	PipelineParameters map[string]Parameter

	ExecutorsRange          protocol.Range
	CommandsRange           protocol.Range
	JobsRange               protocol.Range
	PipelineParametersRange protocol.Range
	WorkflowRange           protocol.Range
	OrbsRange               protocol.Range
}

type OrbURL

type OrbURL struct {
	IsLocal bool
	Name    string
	Version string
}

func (*OrbURL) GetOrbID

func (orb *OrbURL) GetOrbID() string

type OrbURLDefinition

type OrbURLDefinition struct {
	Namespace TextAndRange
	Name      TextAndRange
	Version   TextAndRange
}

type Parameter

type Parameter interface {
	IsOptional() bool

	GetName() string
	GetNameRange() protocol.Range

	GetRange() protocol.Range

	GetType() string
	GetTypeRange() protocol.Range

	GetDefaultRange() protocol.Range

	GetDescription() string
}

type ParameterValue

type ParameterValue struct {
	Name       string
	Value      any
	ValueRange protocol.Range
	Range      protocol.Range
	Type       string
	Node       *sitter.Node
}

type PersistToWorkspace

type PersistToWorkspace struct {
	protocol.Range
	Root  string
	Paths []string
}

func (PersistToWorkspace) GetName

func (step PersistToWorkspace) GetName() string

func (PersistToWorkspace) GetRange

func (step PersistToWorkspace) GetRange() protocol.Range

type RemoteOrbInfo

type RemoteOrbInfo struct {
	ID                 string
	FilePath           string
	Version            string
	LatestVersion      string
	LatestMinorVersion string
	LatestPatchVersion string
}

type Require

type Require struct {
	Name  string
	Range protocol.Range
}

type RestoreCache

type RestoreCache struct {
	protocol.Range
	Key       string
	Keys      []string
	CacheName string
}

func (RestoreCache) GetName

func (step RestoreCache) GetName() string

func (RestoreCache) GetRange

func (step RestoreCache) GetRange() protocol.Range

type Run

type Run struct {
	protocol.Range
	Command          string
	CommandRange     protocol.Range
	RawCommand       string
	Name             string
	Shell            string
	Background       bool
	WorkingDirectory string
	NoOutputTimeout  string
	When             string
	WhenRange        protocol.Range
	Environment      map[string]string
	IsDeployStep     bool
}

func (Run) GetName

func (step Run) GetName() string

func (Run) GetRange

func (step Run) GetRange() protocol.Range

type SaveCache

type SaveCache struct {
	protocol.Range
	Paths     []string
	Key       string
	CacheName string
}

func (SaveCache) GetName

func (step SaveCache) GetName() string

func (SaveCache) GetRange

func (step SaveCache) GetRange() protocol.Range

type ScheduleTrigger

type ScheduleTrigger struct {
	Cron    string
	Filters WorkflowFilters
	Range   protocol.Range
}

type SetupRemoteDocker

type SetupRemoteDocker struct {
	protocol.Range
	DockerLayerCaching bool
	Version            string
}

func (SetupRemoteDocker) GetName

func (step SetupRemoteDocker) GetName() string

func (SetupRemoteDocker) GetRange

func (step SetupRemoteDocker) GetRange() protocol.Range

type Step

type Step interface {
	GetRange() protocol.Range

	GetName() string
}

type Steps

type Steps struct {
	Name            string
	Parameters      map[string]ParameterValue // Handle more values than just strings
	ParametersRange protocol.Range
	Range           protocol.Range
	Steps           []Step
}

func (Steps) GetName

func (step Steps) GetName() string

func (Steps) GetRange

func (step Steps) GetRange() protocol.Range

type StepsParameter

type StepsParameter struct {
	BaseParameter
	Default ParameterValue
}

Steps parameter definition

func (StepsParameter) GetDefaultRange

func (p StepsParameter) GetDefaultRange() protocol.Range

func (StepsParameter) GetDescription

func (p StepsParameter) GetDescription() string

func (StepsParameter) GetName

func (p StepsParameter) GetName() string

func (StepsParameter) GetNameRange

func (p StepsParameter) GetNameRange() protocol.Range

func (StepsParameter) GetRange

func (p StepsParameter) GetRange() protocol.Range

func (StepsParameter) GetType

func (p StepsParameter) GetType() string

func (StepsParameter) GetTypeRange

func (p StepsParameter) GetTypeRange() protocol.Range

func (StepsParameter) IsOptional

func (p StepsParameter) IsOptional() bool

type StoreArtifacts

type StoreArtifacts struct {
	protocol.Range
	Path        string
	Destination string
}

func (StoreArtifacts) GetName

func (step StoreArtifacts) GetName() string

func (StoreArtifacts) GetRange

func (step StoreArtifacts) GetRange() protocol.Range

type StoreTestResults

type StoreTestResults struct {
	protocol.Range
	Path string
}

func (StoreTestResults) GetName

func (step StoreTestResults) GetName() string

func (StoreTestResults) GetRange

func (step StoreTestResults) GetRange() protocol.Range

type StringParameter

type StringParameter struct {
	BaseParameter
	Default string
}

String parameter definition

func (StringParameter) GetDefaultRange

func (p StringParameter) GetDefaultRange() protocol.Range

func (StringParameter) GetDescription

func (p StringParameter) GetDescription() string

func (StringParameter) GetName

func (p StringParameter) GetName() string

func (StringParameter) GetNameRange

func (p StringParameter) GetNameRange() protocol.Range

func (StringParameter) GetRange

func (p StringParameter) GetRange() protocol.Range

func (StringParameter) GetType

func (p StringParameter) GetType() string

func (StringParameter) GetTypeRange

func (p StringParameter) GetTypeRange() protocol.Range

func (StringParameter) IsOptional

func (p StringParameter) IsOptional() bool

type TextAndRange

type TextAndRange struct {
	Text  string         `json:"text"`
	Range protocol.Range `json:"range"`
}

type WindowsExecutor

type WindowsExecutor struct {
	BaseExecutor
	Image string
}

func (WindowsExecutor) GetEnvs

func (e WindowsExecutor) GetEnvs() Environment

func (WindowsExecutor) GetName

func (e WindowsExecutor) GetName() string

func (WindowsExecutor) GetNameRange

func (e WindowsExecutor) GetNameRange() protocol.Range

func (WindowsExecutor) GetParameters

func (e WindowsExecutor) GetParameters() map[string]Parameter

func (WindowsExecutor) GetParametersRange

func (e WindowsExecutor) GetParametersRange() protocol.Range

func (WindowsExecutor) GetRange

func (e WindowsExecutor) GetRange() protocol.Range

func (WindowsExecutor) GetResourceClass

func (e WindowsExecutor) GetResourceClass() string

func (WindowsExecutor) IsUncomplete

func (e WindowsExecutor) IsUncomplete() bool

type Workflow

type Workflow struct {
	protocol.Range
	Name      string
	NameRange protocol.Range
	JobsRange protocol.Range
	JobRefs   []JobRef
	JobsDAG   map[string][]string // maps each job ref to its requirements, should be a directed acyclic graph

	HasTrigger    bool
	Triggers      []WorkflowTrigger
	TriggersRange protocol.Range
}

type WorkflowFilters

type WorkflowFilters struct {
	Range    protocol.Range
	Branches BranchesFilter
}

type WorkflowTrigger

type WorkflowTrigger struct {
	Schedule ScheduleTrigger
	Range    protocol.Range
}

Jump to

Keyboard shortcuts

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