yaml

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AddSSHKeys

type AddSSHKeys struct {
	Fingerprints []string `yaml:"fingerprints,omitempty"`
	Name         string   `yaml:"name,omitempty"`
}

type AttachWorkspace

type AttachWorkspace struct {
	At   string  `yaml:"at,omitempty"`
	Name *string `yaml:"name,omitempty"`
}

type Checkout

type Checkout struct {
	Name string `yaml:"name,omitempty"`
	Path string `yaml:"path,omitempty"`
}

type Command

type Command struct {
	Description string                `yaml:"description,omitempty"`
	Parameters  map[string]*Parameter `yaml:"parameters,omitempty"`
	Steps       []*Step               `yaml:"steps,omitempty"`
}

type Config

type Config struct {
	Commands   map[string]*Command   `yaml:"commands,omitempty"`
	Executors  map[string]*Executor  `yaml:"executors,omitempty"`
	Jobs       map[string]*Job       `yaml:"jobs,omitempty"`
	Orbs       map[string]*Orb       `yaml:"orbs,omitempty"`
	Parameters map[string]*Parameter `yaml:"parameters,omitempty"`
	Setup      bool                  `yaml:"setup,omitempty"`
	Workflows  *Workflows            `yaml:"workflows,omitempty"`
	Version    string                `yaml:"version,omitempty"`
}

func Parse

func Parse(r io.Reader) (*Config, error)

Parse parses the configuration from io.Reader r.

func ParseBytes

func ParseBytes(b []byte) (*Config, error)

ParseBytes parses the configuration from bytes b.

func ParseFile

func ParseFile(p string) (*Config, error)

ParseFile parses the configuration from path p.

func ParseString

func ParseString(s string) (*Config, error)

ParseString parses the configuration from string s.

type Custom

type Custom struct {
	Name   string
	Params map[string]interface{}
}

type Docker

type Docker struct {
	Auth        *DockerAuth       `yaml:"auth,omitempty"`
	AuthAWS     *DockerAuthAWS    `yaml:"aws_auth,omitempty"`
	Command     Stringorslice     `yaml:"command,omitempty"`
	Entrypoint  Stringorslice     `yaml:"entrypoint,omitempty"`
	Environment map[string]string `yaml:"environment,omitempty"`
	Image       string            `yaml:"image,omitempty"`
	Name        string            `yaml:"name,omitempty"`
	User        string            `yaml:"user,omitempty"`
}

type DockerAuth

type DockerAuth struct {
	Username string `yaml:"username,omitempty"`
	Password string `yaml:"password,omitempty"`
}

type DockerAuthAWS

type DockerAuthAWS struct {
	AccessKey string `yaml:"aws_access_key_id,omitempty"`
	SecretKey string `yaml:"aws_secret_access_key,omitempty"`
}

type Executor

type Executor struct {
	Docker        []*Docker         `yaml:"docker,omitempty"`
	ResourceClass string            `yaml:"resource_class,omitempty"`
	Machine       *Machine          `yaml:"machine,omitempty"`
	Macos         *Macos            `yaml:"macos,omitempty"`
	Windows       interface{}       `yaml:"widows,omitempty"`
	Shell         string            `yaml:"shell,omitempty"`
	WorkingDir    string            `yaml:"working_directory,omitempty"`
	Environment   map[string]string `yaml:"environment,omitempty"`
}

type Filter

type Filter struct {
	Only   Stringorslice `yaml:"only,omitempty"`
	Ignore Stringorslice `yaml:"ignore,omitempty"`
}

type Filters

type Filters struct {
	Branches *Filter `yaml:"branches,omitempty"`
	Tags     *Filter `yaml:"tags,omitempty"`
}

type Job

type Job struct {
	Branches      *Filter               `yaml:"branches,omitempty"`
	Docker        []*Docker             `yaml:"docker,omitempty"`
	Environment   map[string]string     `yaml:"environment,omitempty"`
	Executor      *JobExecutor          `yaml:"executor,omitempty"`
	IPRanges      bool                  `yaml:"circleci_ip_ranges,omitempty"`
	Machine       *Machine              `yaml:"machine,omitempty"`
	Macos         *Macos                `yaml:"macos,omitempty"`
	Parallelism   int                   `yaml:"parallelism,omitempty"`
	Parameters    map[string]*Parameter `yaml:"parameters,omitempty"`
	ResourceClass string                `yaml:"resource_class,omitempty"`
	Shell         string                `yaml:"shell,omitempty"`
	Steps         []*Step               `yaml:"steps,omitempty"`
	WorkingDir    string                `yaml:"working_directory,omitempty"`
}

type JobExecutor

type JobExecutor struct {
	Name string `yaml:"name,omitempty"`
	Size string `yaml:"size,omitempty"`
}

func (*JobExecutor) MarshalYAML

func (v *JobExecutor) MarshalYAML() (interface{}, error)

MarshalYAML implements the marshal interface.

func (*JobExecutor) UnmarshalYAML

func (v *JobExecutor) UnmarshalYAML(unmarshal func(interface{}) error) error

UnmarshalYAML implements the unmarshal interface.

type Logical

type Logical struct {
	Literal interface{}

	And     []*Logical
	Equal   []interface{}
	Matches *Matches
	Not     *Logical
	Or      []*Logical
}

func (*Logical) IsEmpty

func (v *Logical) IsEmpty() bool

IsEmpty returns true if the struct is empty.

func (*Logical) MarshalYAML

func (v *Logical) MarshalYAML() (interface{}, error)

MarshalYAML implements the marshal interface.

func (*Logical) UnmarshalYAML

func (v *Logical) UnmarshalYAML(unmarshal func(interface{}) error) error

UnmarshalYAML implements the unmarshal interface.

type Machine

type Machine struct {
	Default            bool   `yaml:"default,omitempty"`
	Image              string `yaml:"image,omitempty"`
	Shell              string `yaml:"shell,omitempty"`
	DockerLayerCaching bool   `yaml:"docker_layer_caching,omitempty"`
}

func (*Machine) MarshalYAML

func (v *Machine) MarshalYAML() (interface{}, error)

MarshalYAML implements the marshal interface.

func (*Machine) UnmarshalYAML

func (v *Machine) UnmarshalYAML(unmarshal func(interface{}) error) error

UnmarshalYAML implements the unmarshal interface.

type Macos

type Macos struct {
	Xcode string `yaml:"xcode,omitempty"`
}

type Matches

type Matches struct {
	Pattern string `yaml:"pattern,omitempty"`
	Value   string `yaml:"value,omitempty"`
}

type Matrix

type Matrix struct {
	Alias      string                   `yaml:"alias,omitempty"`
	Exclude    []map[string]interface{} `yaml:"exclude,omitempty"`
	Parameters map[string][]interface{} `yaml:"parameters,omitempty"`
}

type Orb

type Orb struct {
	Name   string
	Inline *Config
}

func (*Orb) MarshalYAML

func (v *Orb) MarshalYAML() (interface{}, error)

MarshalYAML implements the marshal interface.

func (*Orb) UnmarshalYAML

func (v *Orb) UnmarshalYAML(unmarshal func(interface{}) error) error

UnmarshalYAML implements the unmarshal interface.

type Parameter

type Parameter struct {
	Description string      `yaml:"description,omitempty"`
	Type        string      `yaml:"type,omitempty"` // string, boolean, integer, enum, executor, steps
	Default     interface{} `yaml:"default,omitempty"`
}

type PersistToWorkspace

type PersistToWorkspace struct {
	Name  string        `yaml:"name,omitempty"`
	Paths Stringorslice `yaml:"paths,omitempty"`
	Root  string        `yaml:"root,omitempty"`
}

type RestoreCache

type RestoreCache struct {
	Key  string        `yaml:"key,omitempty"`
	Name string        `yaml:"name,omitempty"`
	Keys Stringorslice `yaml:"keys,omitempty"`
}

type Run

type Run struct {
	Background       bool
	Command          string
	Environment      map[string]string
	Name             string
	NoOutputTimeout  string
	Shell            string
	When             string
	WorkingDirectory string
}

func (*Run) IsEmpty

func (v *Run) IsEmpty() bool

IsEmpty returns true if the struct is empty.

func (*Run) MarshalYAML

func (v *Run) MarshalYAML() (interface{}, error)

MarshalYAML implements the marshal interface.

func (*Run) UnmarshalYAML

func (v *Run) UnmarshalYAML(unmarshal func(interface{}) error) error

UnmarshalYAML implements the unmarshal interface.

type SaveCache

type SaveCache struct {
	Key   string        `yaml:"key,omitempty"`
	Name  string        `yaml:"name,omitempty"`
	Paths Stringorslice `yaml:"paths,omitempty"`
	When  string        `yaml:"when,omitempty"`
}

type Schedule

type Schedule struct {
	Cron    string   `yaml:"cron,omitempty"`
	Filters *Filters `yaml:"filters,omitempty"`
}

type SetupRemoteDocker

type SetupRemoteDocker struct {
	DockerLayerCaching bool   `yaml:"docker_layer_caching,omitempty"`
	Name               string `yaml:"name,omitempty"`
	Version            string `yaml:"version,omitempty"`
}

type Step

type Step struct {
	AddSSHKeys         *AddSSHKeys
	AttachWorkspace    *AttachWorkspace
	Checkout           *Checkout
	PersistToWorkspace *PersistToWorkspace
	RestoreCache       *RestoreCache
	Run                *Run
	SaveCache          *SaveCache
	SetupRemoteDocker  *SetupRemoteDocker
	StoreArtifacts     *StoreArtifacts
	StoreTestResults   *StoreTestResults
	Unless             *Unless
	When               *When
	Custom             *Custom
}

func (*Step) MarshalYAML

func (v *Step) MarshalYAML() (interface{}, error)

MarshalYAML implements the marshal interface.

func (*Step) UnmarshalYAML

func (v *Step) UnmarshalYAML(unmarshal func(interface{}) error) error

UnmarshalYAML implements the unmarshal interface.

type StoreArtifacts

type StoreArtifacts struct {
	Destination string `yaml:"destination,omitempty"`
	Name        string `yaml:"name,omitempty"`
	Path        string `yaml:"path,omitempty"`
}

type StoreTestResults

type StoreTestResults struct {
	Name string `yaml:"name,omitempty"`
	Path string `yaml:"path,omitempty"`
}

type Stringorslice

type Stringorslice []string

Stringorslice represents a string or an array of strings.

func (*Stringorslice) UnmarshalYAML

func (s *Stringorslice) UnmarshalYAML(unmarshal func(interface{}) error) error

UnmarshalYAML implements the unmarshal interface.

type Trigger

type Trigger struct {
	Schedule *Schedule `yaml:"schedule,omitempty"`
}

type Unless

type Unless struct {
	Condition *Logical `json:"condition,omitempty"`
	Steps     []*Step  `json:"steps,omitempty"`
}

type When

type When struct {
	Condition *Logical `json:"condition,omitempty"`
	Steps     []*Step  `json:"steps,omitempty"`
}

type Workflow

type Workflow struct {
	Jobs     []*WorkflowJob `yaml:"jobs,omitempty"`
	Triggers []*Trigger     `yaml:"triggers,omitempty"`
	Unless   *Logical       `yaml:"when,omitempty"`
	When     *Logical       `yaml:"unless,omitempty"`
}

type WorkflowJob

type WorkflowJob struct {
	Name     string
	Context  []string
	Filters  *Filters
	Matrix   *Matrix
	Type     string
	Requires []string
	Params   map[string]interface{} // custom params
}

func (*WorkflowJob) MarshalYAML

func (v *WorkflowJob) MarshalYAML() (interface{}, error)

MarshalYAML implements the marshal interface.

func (*WorkflowJob) UnmarshalYAML

func (v *WorkflowJob) UnmarshalYAML(unmarshal func(interface{}) error) error

UnmarshalYAML implements the unmarshal interface.

type Workflows

type Workflows struct {
	Version string               `yaml:"version,omitempty"`
	Items   map[string]*Workflow `yaml:",inline"`
}

Jump to

Keyboard shortcuts

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