flow

package
v0.0.0-...-9da1c94 Latest Latest
Warning

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

Go to latest
Published: Dec 31, 2023 License: AGPL-3.0, AGPL-3.0-or-later Imports: 16 Imported by: 1

Documentation

Index

Constants

View Source
const (
	GitUriDesc      = "the URI of the GIT repository"
	GitBranchDesc   = "the branch to be used to clone the project from the GIT repository"
	GitUserDesc     = "the user name to be used to authenticate with the GIT repository"
	GitPasswordDesc = "the password or token to be used to authenticate with the GIT repository"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Credential

type Credential struct {
	User     string
	Password string
	Domain   string
}

Credential a set of authentication credentials for a package registry

type Flow

type Flow struct {
	Name        string `yaml:"name"`
	Description string `yaml:"description"`
	// a list of labels to document key aspects of the flow execution
	// for example using a target namespace if running in Kubernetes
	Labels      map[string]string `yaml:"labels" json:"labels"`
	Git         *Git              `yaml:"git,omitempty" json:"git,omitempty"`
	Steps       []*Step           `yaml:"steps" json:"steps"`
	Input       *data.Input       `yaml:"input,omitempty" json:"input,omitempty"`
	UseRuntimes *bool             `yaml:"use_runtimes,omitempty" json:"use_runtimes,omitempty"`
	// contains filtered or unexported fields
}

func LoadFlow

func LoadFlow(path, artHome string) (*Flow, error)

func NewFlow

func NewFlow(flowJSONBytes []byte, artHome string) (*Flow, error)

func (*Flow) GetInputDefinition

func (f *Flow) GetInputDefinition(b *data.BuildFile, env *merge.Envar) (*data.Input, error)

GetInputDefinition retrieve all input data required by the flow without values interactive mode is off - gets definition only

func (*Flow) IsValid

func (f *Flow) IsValid() error

func (*Flow) JsonBytes

func (f *Flow) JsonBytes() ([]byte, error)

func (*Flow) Map

func (f *Flow) Map() (map[string]interface{}, error)

Map get the input in map format

func (*Flow) RequiresFile

func (f *Flow) RequiresFile() bool

func (*Flow) RequiresGitSource

func (f *Flow) RequiresGitSource() bool

func (*Flow) RequiresSecrets

func (f *Flow) RequiresSecrets() bool

func (*Flow) Step

func (f *Flow) Step(name string) *Step

func (*Flow) StepByFx

func (f *Flow) StepByFx(fxName string) *Step

type Git

type Git struct {
	Uri      string `yaml:"git_uri" json:"git_uri"`
	Branch   string `yaml:"git_branch" json:"git_branch"`
	Login    string `yaml:"git_login,omitempty" json:"git_login,omitempty"`
	Password string `yaml:"git_password,omitempty" json:"git_password,omitempty"`
}

type Item

type Item struct {
	Key         string                 `json:"key"`
	Name        string                 `json:"name"`
	Description string                 `json:"description"`
	Status      int                    `json:"status"`
	Type        string                 `json:"type"`
	Tag         []interface{}          `json:"tag"`
	Meta        map[string]interface{} `json:"meta"`
	Txt         string                 `json:"txt"`
	Attribute   map[string]interface{} `json:"attribute"`
	Partition   string                 `json:"partition"`
	Version     int64                  `json:"version"`
	Created     string                 `json:"created"`
	Updated     string                 `json:"updated"`
	EncKeyIx    int64                  `json:"encKeyIx"`
	ChangedBy   string                 `json:"changedBy"`
}

type Manager

type Manager struct {
	Flow *Flow
	// contains filtered or unexported fields
}

Manager manages an Artisan flow the pipeline generator requires at least the flow definition if a build file is passed then step variables can be inferred from it

func New

func New(bareFlowPath, buildPath, artHome string) (*Manager, error)

func NewWithEnv

func NewWithEnv(bareFlowPath, buildPath string, env *merge.Envar, artHome string) (*Manager, error)

func (*Manager) AddLabels

func (m *Manager) AddLabels(labels []string)

func (*Manager) JsonString

func (m *Manager) JsonString() (string, error)

func (*Manager) Merge

func (m *Manager) Merge(interactive bool) error

func (*Manager) Run

func (m *Manager) Run(runnerName, creds string, interactive bool) error

Run merge and send a flow to a runner

func (*Manager) SaveJSON

func (m *Manager) SaveJSON() error

func (*Manager) SaveOnixJSON

func (m *Manager) SaveOnixJSON() error

func (*Manager) SaveYAML

func (m *Manager) SaveYAML() error

func (*Manager) YamlString

func (m *Manager) YamlString() (string, error)

type Step

type Step struct {
	Name          string      `yaml:"name" json:"name"`
	Description   string      `yaml:"description,omitempty" json:"description,omitempty"`
	Function      string      `yaml:"function,omitempty" json:"function,omitempty"`
	Package       string      `yaml:"package,omitempty" json:"package,omitempty"`
	PackageSource string      `yaml:"source,omitempty" json:"source,omitempty"`
	Input         *data.Input `yaml:"input,omitempty" json:"input,omitempty"`
	Privileged    bool        `yaml:"privileged" json:"privileged"`
}

Jump to

Keyboard shortcuts

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