model

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2022 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GenericYAML

type GenericYAML struct {
	Kind     string                  `yaml:"kind,omitempty"`
	Metadata *Metadata               `yaml:"metadata,omitempty"`
	Spec     *map[string]interface{} `yaml:"spec,omitempty"`
}

func NewGenericYAML

func NewGenericYAML() *GenericYAML

func (*GenericYAML) ToPipeline

func (genericYAML *GenericYAML) ToPipeline() (Pipeline, error)

func (*GenericYAML) ToStep

func (genericYAML *GenericYAML) ToStep() (Step, error)

type Job

type Job struct {
	PreCondition   *Runnable `yaml:"preCondition,omitempty" validate:"required,dive"`
	Action         *Runnable `yaml:"action,omitempty" validate:"required,dive"`
	PostValidation *Runnable `yaml:"postValidation,omitempty" validate:"required,dive"`
}

type JobsMap

type JobsMap struct {
	Jobs []Job `yaml:"jobs,omitempty" validate:"required,dive"`
}

type Metadata

type Metadata struct {
	Name        string `yaml:"name,omitempty"`
	Description string `yaml:"description,omitempty"`
	Id          string
	ChildrenIds []string
	Completed   bool
}

type Pipeline

type Pipeline struct {
	Kind     string    `yaml:"kind,omitempty" validate:"required"`
	Metadata *Metadata `yaml:"metadata,omitempty" validate:"required"`
	Spec     *StepsMap `yaml:"spec,omitempty" validate:"required"`
}

func NewPipeline

func NewPipeline() *Pipeline

type Runnable

type Runnable struct {
	Description     string `yaml:"description,omitempty" validate:"required"`
	Command         string `yaml:"command,omitempty"`
	Troubleshooting string `yaml:"troubleshooting,omitempty" validate:"required"`
	Output          string
}

type Step

type Step struct {
	Kind     string    `yaml:"kind,omitempty" validate:"required"`
	Metadata *Metadata `yaml:"metadata,omitempty" validate:"required,dive"`
	Spec     *JobsMap  `yaml:"spec,omitempty" validate:"required,dive"`
}

func NewStep

func NewStep() *Step

func (*Step) ToGeneric

func (stepYaml *Step) ToGeneric() GenericYAML

type StepsMap

type StepsMap struct {
	Steps []string `yaml:"steps,omitempty" validate:"required"`
}

Jump to

Keyboard shortcuts

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