resource

package
v0.22.1 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2022 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Resource

type Resource interface {
	Source(workingDir string) (string, error)
	Condition(version string) (bool, error)
	ConditionFromSCM(version string, scm scm.ScmHandler) (bool, error)
	Target(source string, dryRun bool) (bool, error)
	TargetFromSCM(source string, scm scm.ScmHandler, dryRun bool) (changed bool, files []string, message string, err error)
	Changelog() string
}

Resource allow to manipulate a resource that can be a source, a condition or a target

func New

func New(rs ResourceConfig) (resource Resource, err error)

New returns a newly initialized Resource or an error

type ResourceConfig

type ResourceConfig struct {
	DependsOn []string `yaml:"depends_on"`
	Name      string
	Kind      string
	// Deprecated in favor of Transformers on 2021/01/3
	Prefix string
	// Deprecated in favor of Transformers on 2021/01/3
	Postfix      string
	Transformers transformer.Transformers
	Spec         interface{}
	// Deprecated field on version [1.17.0]
	Scm   map[string]interface{}
	SCMID string `yaml:"scmID"` // SCMID references a uniq scm configuration
}

Jump to

Keyboard shortcuts

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