downgrader

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: 14 Imported by: 0

Documentation

Index

Constants

View Source
const MaxDepth = 100

Variables

This section is empty.

Functions

This section is empty.

Types

type Downgrader

type Downgrader struct {
	// contains filtered or unexported fields
}

Downgrader downgrades pipelines from the v0 harness configuration format to the v1 configuration format.

func New

func New(options ...Option) *Downgrader

New creates a new Downgrader that downgrades pipelines from the v0 harness configuration format to the v1 configuration format.

func (*Downgrader) Downgrade

func (d *Downgrader) Downgrade(b []byte) ([]byte, error)

Downgrade downgrades a v1 pipeline.

func (*Downgrader) DowngradeFile

func (d *Downgrader) DowngradeFile(path string) ([]byte, error)

DowngradeFile downgrades a v1 pipeline.

func (*Downgrader) DowngradeFrom

func (d *Downgrader) DowngradeFrom(src []*v1.Config) ([]byte, error)

DowngradeFrom downgrades a v1 pipeline object.

func (*Downgrader) DowngradeString

func (d *Downgrader) DowngradeString(s string) ([]byte, error)

DowngradeString downgrades a v1 pipeline.

type Option

type Option func(*Downgrader)

Option configures a Downgrade option.

func WithCodebase

func WithCodebase(name, connector string) Option

WithCodebase returns an option to set the codebase.

func WithDockerhub

func WithDockerhub(connector string) Option

WithDockerhub returns an option to set the default dockerhub registry connector.

func WithIdentifier

func WithIdentifier(identifier string) Option

WithIdentifier returns an option to set the pipeline identifier.

func WithKubernetes

func WithKubernetes(namespace, connector string) Option

WithKubernetes returns an option to set the default runtime to Kubernetes.

func WithName

func WithName(name string) Option

WithName returns an option to set the pipeline name.

func WithOrganization

func WithOrganization(organization string) Option

WithOrganization returns an option to set the harness organization.

func WithProject

func WithProject(project string) Option

WithProject returns an option to set the harness project name..

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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