core

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2025 License: Apache-2.0 Imports: 32 Imported by: 0

Documentation

Index

Constants

View Source
const (
	JsRuntimeMetadataBuilderApply            = "builder/apply"
	JsRuntimeMetadataBuilderSkipConfirmation = "builder/skipConfirmation"
)
View Source
const (
	MetadataIdentifier    = "identifier"
	MetadataComponentType = "component-type"
)
View Source
const (
	DocumentsDir = "manifests"
)

Variables

View Source
var (
	// Use this step to populate [KubernetesResource] resources so that other components can rely on this
	// information to modify existing resources or generate extra resources.
	// E.g. when ServiceMonitor is added on this step, other components can generate ServiceMonitor resources
	// to monitor the services.
	StepPopulateKubernetesResources = NewStep("Populate Kubernetes resources", 1)

	// Sanitize the options and the component properties in this step.
	StepSanitize = NewStep("Sanitize", 2)

	// Use this step to generate the documents and additional files.
	StepGenerateResources = NewStep("Generate resources", 5)

	// Use this step to generate the documents and additional files based on other documents and additional files.
	StepGenerateResourcesBasedOnOtherResources = NewStep("Generate based on other resources", 5, 1)

	// Use this step to modify the generated documents, e.g. set labels, annotations, etc. This is useful when
	// other services add documents to the document group on the [StepGenerateResources] step and you want to modify them.
	StepModify = NewStep("Modify", 6)

	// Specify provisioner dependencies in this step.
	StepSpecifyProvisionerDependencies = NewStep("Specify provisioner dependencies", 7)

	// Write the outputs, e.g. documents and additional files in this step.
	StepOutput = NewStep("Output", 99)

	// Apply the resources to the Kubernetes cluster in this step.
	StepApply = NewStep("Apply", 100)
)
View Source
var (
	DefaultKubernetesVersion = semver.MustParse("1.33")
)

Functions

func AddHelmChart

func AddHelmChart(builder *Builder, chartIdentifier string, releaseName string, values string)

func AddHelmChartNoValues

func AddHelmChartNoValues(builder *Builder, chartIdentifier string, releaseName string)

func AddHelmChartObject added in v0.2.0

func AddHelmChartObject(builder *Builder, chartIdentifier string, releaseName string, values *sobek.Object)

func CheckPathInsideMainScriptDirectory

func CheckPathInsideMainScriptDirectory(jsRuntime *js.JsRuntime, filePath string)

func CurrentScriptDirectory

func CurrentScriptDirectory(jsRuntime *js.JsRuntime) string

func CurrentScriptPath

func CurrentScriptPath(jsRuntime *js.JsRuntime) string

func GetAsPointer

func GetAsPointer[T any](o any) *T

func GetImageTag

func GetImageTag(image string) string

GetImageTag returns the tag of the image. If the image does not have a tag, empty string is returned.

func LoadChart

func LoadChart(data []byte) *chart.Chart

Loads the given chart file into memory.

func LoadChartFromPath

func LoadChartFromPath(path string) *chart.Chart

Loads the chart from the given path. The path can be a local file or directory.

func MainScriptDirectory

func MainScriptDirectory(jsRuntime *js.JsRuntime) string

func MainScriptPath

func MainScriptPath(jsRuntime *js.JsRuntime) string

func Parse added in v0.2.0

func Parse(jsRuntime *js.JsRuntime, yamlText string) (*sobek.Object, error)

func ParseYaml

func ParseYaml[T any](data string) (T, error)

Deserializes given string into an object of given type. Dedents the data using [Dedent] so that the multiline strings with indentation are handled properly. Trims the newlines before deserialization.

func Pointer

func Pointer[T any](input T) *T

func ReadAllBytes

func ReadAllBytes(jsRuntime *js.JsRuntime, filePath string) []byte

func ReadAllText

func ReadAllText(jsRuntime *js.JsRuntime, filePath string) string

func RegisterCore

func RegisterCore(jsRuntime *js.JsRuntime)

func RemoveTestHooks

func RemoveTestHooks(helmRelease *release.Release)

func SerializeSobekObjectToYaml added in v0.2.0

func SerializeSobekObjectToYaml(jsRuntime *js.JsRuntime, object *sobek.Object) (string, error)

func SobekObjectGetString added in v0.2.0

func SobekObjectGetString(object *sobek.Object, key string) *string

func SobekObjectGetStringChain added in v0.2.0

func SobekObjectGetStringChain(object *sobek.Object, keys ...string) *string

func SortedKeys

func SortedKeys[TKey cmp.Ordered, TValue any](m map[TKey]TValue) []TKey

func WriteAllBytes

func WriteAllBytes(jsRuntime *js.JsRuntime, filePath string, data []byte)

func WriteAllText

func WriteAllText(jsRuntime *js.JsRuntime, filePath string, content string)

Types

type Action

type Action struct {
	Step     *Step
	Callback func(context *BuildContext)
}

Action is added to a Component to be run during the build process.

type AdditionalFile

type AdditionalFile struct {
	Path    string
	Content string
}

func NewAdditionalFile

func NewAdditionalFile(path, content string) *AdditionalFile

Creates a new AdditionalFile with given path and content.

type BuildContext

type BuildContext struct {
	BuilderOptions         *BuilderOptions
	KubernetesResourceInfo *KubernetesResourceInfo
	CustomData             *sobek.Object
	JsRuntime              *js.JsRuntime
	// contains filtered or unexported fields
}

BuildContext provides all the necessary objects and options to generate documents when Builder.Build is called.

func NewBuildContext added in v0.2.0

func NewBuildContext(builder *Builder, options *BuilderOptions) *BuildContext

func (*BuildContext) AddAdditionalFile

func (context *BuildContext) AddAdditionalFile(additionalFile *AdditionalFile)

Adds given additional file to the document group named "". Creates the document group if it doesn't exist.

func (*BuildContext) AddAdditionalFileWithGroupPath

func (context *BuildContext) AddAdditionalFileWithGroupPath(documentGroupPath string, additionalFile *AdditionalFile)

Adds given additional file to the document group with the given name. Creates the document group if it doesn't exist.

func (*BuildContext) AddDocument

func (context *BuildContext) AddDocument(document *Document)

Adds given document to the document group named "". Creates the document group if it doesn't exist.

func (*BuildContext) AddDocumentGroup

func (context *BuildContext) AddDocumentGroup(group *DocumentGroup)

Adds given group to the document groups list.

func (*BuildContext) AddDocumentWithOptions

func (context *BuildContext) AddDocumentWithOptions(jsRuntime *js.JsRuntime, options *NewDocumentOptions) error

Adds given document to the document group with the given path and content. Creates the document group if it doesn't exist.

func (*BuildContext) GetAllComponents

func (context *BuildContext) GetAllComponents() []*Component

func (*BuildContext) GetAllDocuments

func (context *BuildContext) GetAllDocuments() []*Document

Returns all documents inside all document groups as a slice.

func (*BuildContext) GetAllDocumentsSorted

func (context *BuildContext) GetAllDocumentsSorted() []*Document

Returns all documents inside all document groups sorted by their file path as a slice.

func (*BuildContext) GetComponentWithIdentifier

func (context *BuildContext) GetComponentWithIdentifier(identifier string) *Component

func (*BuildContext) GetCurrentComponent

func (context *BuildContext) GetCurrentComponent() *Component

func (*BuildContext) GetDocument

func (context *BuildContext) GetDocument(predicate func(*Document) bool) *Document

Returns the first document that satisfies the given predicate. Returns nil if no document is found.

func (*BuildContext) GetDocumentGroupWithPath

func (context *BuildContext) GetDocumentGroupWithPath(path string) *DocumentGroup

func (*BuildContext) GetDocumentGroups

func (context *BuildContext) GetDocumentGroups() []*DocumentGroup

func (*BuildContext) GetDocumentGroupsForComponent

func (context *BuildContext) GetDocumentGroupsForComponent(component *Component) []*DocumentGroup

func (*BuildContext) GetDocumentWithPath

func (context *BuildContext) GetDocumentWithPath(path string) *Document

Returns the first document that has the given path. Returns nil if no document is found.

func (*BuildContext) IsDevelopment

func (context *BuildContext) IsDevelopment() bool

func (*BuildContext) IsProduction

func (context *BuildContext) IsProduction() bool

func (*BuildContext) RemoveDocumentGroup

func (context *BuildContext) RemoveDocumentGroup(group *DocumentGroup)

Removes given group from the document groups list.

type Builder

type Builder struct {
	Components []*Component
	Options    *BuilderOptions
	// contains filtered or unexported fields
}

Builder is a collection of components.

func NewBuilder

func NewBuilder(jsRuntime *js.JsRuntime) *Builder

Creates a new Builder instance with default options.

func NewBuilderVersionDistributionEnvironmentType added in v0.2.0

func NewBuilderVersionDistributionEnvironmentType(version *semver.Version, distribution KubernetesDistribution, environment EnvironmentType, jsRuntime *js.JsRuntime) *Builder

func NewBuilderWithOptions

func NewBuilderWithOptions(options *BuilderOptions, jsRuntime *js.JsRuntime) *Builder

Creates a new Builder instance with given options.

func (*Builder) AddAdditionalFile

func (builder *Builder) AddAdditionalFile(additionalFile *AdditionalFile)

func (*Builder) AddAdditionalFileWithGroupPath

func (builder *Builder) AddAdditionalFileWithGroupPath(documentGroupPath string, additionalFile *AdditionalFile)

func (*Builder) AddComponent

func (builder *Builder) AddComponent(component *Component)

Appends given component to the list of components.

func (*Builder) AddDocument

func (builder *Builder) AddDocument(document *Document)

func (*Builder) AddDocumentGroup added in v0.2.1

func (builder *Builder) AddDocumentGroup(documentGroup *DocumentGroup)

func (*Builder) AddDocumentString added in v0.2.0

func (builder *Builder) AddDocumentString(jsRuntime *js.JsRuntime, yaml string)

func (*Builder) AddDocumentWithOptions

func (builder *Builder) AddDocumentWithOptions(jsRuntime *js.JsRuntime, options *NewDocumentOptions)

func (*Builder) AddProvisionCheckpoint

func (builder *Builder) AddProvisionCheckpoint(name string) *Component

Adds a component that creates a document group with the given name during StepGenerateResources. Document group doesn't contain any documents, it serves as a placeholder for provision dependencies.

func (*Builder) Build

func (builder *Builder) Build()

Build method is at the heart of the all process. It collects all actions from all components and sorts them by their steps. Then it applies each action sequentially.

func (*Builder) OnGenerateResources

func (builder *Builder) OnGenerateResources(callback func(context *BuildContext)) *Component

Creates a new component with the given action that will be run during StepGenerateResources and adds it to the list of components.

func (*Builder) OnGenerateResourcesBasedOnOtherResources

func (builder *Builder) OnGenerateResourcesBasedOnOtherResources(callback func(context *BuildContext)) *Component

Creates a new component with the given action that will be run during StepGenerateResourcesBasedOnOtherResources and adds it to the list of components.

func (*Builder) OnModify

func (builder *Builder) OnModify(callback func(context *BuildContext)) *Component

Creates a new component with the given action that will be run during StepModify and adds it to the list of components.

func (*Builder) OnPopulateKubernetesResources

func (builder *Builder) OnPopulateKubernetesResources(callback func(context *BuildContext)) *Component

Creates a new component with the given action that will be run during StepPopulateKubernetesResources and adds it to the list of components.

func (*Builder) OnSanitize

func (builder *Builder) OnSanitize(callback func(context *BuildContext)) *Component

Creates a new component with the given action that will be run during StepSanitize and adds it to the list of components.

func (*Builder) OnSpecifyProvisionerDependencies

func (builder *Builder) OnSpecifyProvisionerDependencies(callback func(context *BuildContext)) *Component

Creates a new component with the given action that will be run during StepSpecifyProvisionerDependencies and adds it to the list of components.

func (*Builder) OnStep

func (builder *Builder) OnStep(step *Step, callback func(context *BuildContext)) *Component

Creates a new component with the given action and adds it to the list of components.

func (*Builder) RemoveComponent

func (builder *Builder) RemoveComponent(component *Component)

Removes given component from the list of components.

type BuilderOptions

type BuilderOptions struct {
	KubernetesCluster   *KubernetesCluster
	Environment         *Environment
	OutputConfiguration *OutputConfiguration
}

BuilderOptions contains common options and global services that are used by all components.

func NewBuilderOptions

func NewBuilderOptions(kubernetesCluster *KubernetesCluster, environment *Environment) *BuilderOptions

func NewBuilderOptionsWithOutputConfiguration

func NewBuilderOptionsWithOutputConfiguration(kubernetesCluster *KubernetesCluster, environment *Environment, outputConfiguration *OutputConfiguration) *BuilderOptions

type Component

type Component struct {
	// Actions are ordered by their steps and executed in sequence.
	Actions []*Action
	// contains filtered or unexported fields
}

Component is collection of actions that are executed in sequence.

func NewComponent

func NewComponent() *Component

func (*Component) AddAction

func (component *Component) AddAction(step *Step, callback func(context *BuildContext))

Adds given action to the list of actions.

func (*Component) GetComponentType

func (component *Component) GetComponentType() *string

func (*Component) GetCustomData

func (component *Component) GetCustomData(key string) any

func (*Component) GetIdentifier

func (component *Component) GetIdentifier() *string

func (*Component) GetMetadata

func (component *Component) GetMetadata(key string) *string

func (*Component) ProvisionAfter

func (component *Component) ProvisionAfter(provisioner *Provisioner)

func (*Component) ProvisionAfterComponent

func (component *Component) ProvisionAfterComponent(other *Component)

func (*Component) ProvisionBefore

func (component *Component) ProvisionBefore(provisioner *Provisioner)

func (*Component) ProvisionBeforeComponent

func (component *Component) ProvisionBeforeComponent(other *Component)

func (*Component) SetComponentType

func (component *Component) SetComponentType(componentType string)

func (*Component) SetCustomData

func (component *Component) SetCustomData(key string, value any)

func (*Component) SetIdentifier

func (component *Component) SetIdentifier(identifier string)

func (*Component) SetMetadata

func (component *Component) SetMetadata(key, value string)

type Dependencies

type Dependencies[T comparable] struct {
	Prerequisites []T
	Dependents    []T
}

Dependencies specifies prerequisites and dependents of the given type. This information is used to create dependency graphs in order to sort dependent objects.

func NewDependencies

func NewDependencies[T comparable]() *Dependencies[T]

func (*Dependencies[T]) Merge

func (d *Dependencies[T]) Merge(other *Dependencies[T])

Appends dependency specifications of the given object into this object.

func (*Dependencies[T]) RunAfter

func (d *Dependencies[T]) RunAfter(element T)

Makes the given element a prerequisite of this instance.

func (*Dependencies[T]) RunBefore

func (d *Dependencies[T]) RunBefore(element T)

Makes this instance a prerequisite of the given element.

type DependencyGraph

type DependencyGraph[T comparable] struct {
	Elements           []T
	IdentifierGetter   func(element T) string
	DependenciesGetter func(T) *Dependencies[T]
}

func (*DependencyGraph[T]) GetSortedElements

func (d *DependencyGraph[T]) GetSortedElements() []T

type Document

type Document struct {
	*sobek.Object

	Group        *DocumentGroup
	Dependencies *Dependencies[*Document]
	// contains filtered or unexported fields
}

func HelmManifestToDocuments

func HelmManifestToDocuments(jsRuntime *js.JsRuntime, manifests string, releaseName string, defaultName string) []*Document

func NewDocument

func NewDocument(jsRuntime *js.JsRuntime) *Document

func NewDocumentWithContent added in v0.2.0

func NewDocumentWithContent(content *sobek.Object) *Document

func NewDocumentWithOptions

func NewDocumentWithOptions(jsRuntime *js.JsRuntime, options *NewDocumentOptions) (*Document, error)

func NewDocumentWithYaml

func NewDocumentWithYaml(jsRuntime *js.JsRuntime, yaml string) (*Document, error)

func ParseDocument

func ParseDocument(jsRuntime *js.JsRuntime, yaml string) (*Document, error)

Parses given text as a Document.

func (*Document) FullPath

func (document *Document) FullPath() string

Returns the path to write the document. Adds group path as base directory if it is not nil.

func (*Document) GetPath added in v0.2.0

func (document *Document) GetPath() string

Returns the file path of the document. May contain multiple segments separated by slashes.

func (*Document) ProvisionAfter

func (document *Document) ProvisionAfter(other *Document)

func (*Document) ProvisionBefore

func (document *Document) ProvisionBefore(other *Document)

func (*Document) SetPath added in v0.2.0

func (document *Document) SetPath(path *string)

Sets the file path of the document. May contain multiple segments separated by slashes.

func (*Document) ToJSON

func (document *Document) ToJSON(jsRuntime *js.JsRuntime, dummy string) sobek.Value

type DocumentGroup

type DocumentGroup struct {
	Path             string
	Documents        []*Document
	AdditionalFiles  []*AdditionalFile
	ApplyProvisioner *Provisioner
	WaitProvisioner  *Provisioner
	// contains filtered or unexported fields
}

DocumentGroup is a named container for multiple Document instances.

func GenerateFromChart

func GenerateFromChart(chart *chart.Chart, context *BuildContext, options *HelmOptions) *DocumentGroup

Runs helm template with values from the options and parses the generated documents.

func NewDocumentGroup

func NewDocumentGroup(path string) *DocumentGroup

Creates a new DocumentGroup with given path.

func (*DocumentGroup) AddAdditionalFile

func (group *DocumentGroup) AddAdditionalFile(additionalFile *AdditionalFile)

Adds the given additional file to this group.

func (*DocumentGroup) AddDocument

func (group *DocumentGroup) AddDocument(document *Document)

Adds the given document to this group and sets its Group field to this group.

func (*DocumentGroup) AddDocuments added in v0.2.0

func (group *DocumentGroup) AddDocuments(documents []*Document)

Adds the given documents to this group and sets their Group field to this group.

func (*DocumentGroup) GetComponent

func (group *DocumentGroup) GetComponent() *Component

Returns the component that created this document group. Component is set when the document group is added to the builder context.

func (*DocumentGroup) GetDocument

func (group *DocumentGroup) GetDocument(path string) *Document

Returns the first document that has the given path. Returns nil if no document is found.

func (*DocumentGroup) GetDocumentFunc

func (group *DocumentGroup) GetDocumentFunc(predicate func(*Document) bool) *Document

Returns the first document that satisfies the given predicate. Returns nil if no document is found.

func (*DocumentGroup) MoveTo

func (group *DocumentGroup) MoveTo(other *DocumentGroup)

Removes all documents and additional files from this group and adds them to the given group.

func (*DocumentGroup) ProvisionAfter

func (documentGroup *DocumentGroup) ProvisionAfter(other *DocumentGroup)

func (*DocumentGroup) ProvisionBefore

func (documentGroup *DocumentGroup) ProvisionBefore(other *DocumentGroup)

func (*DocumentGroup) RemoveAdditionalFile

func (group *DocumentGroup) RemoveAdditionalFile(additionalFile *AdditionalFile)

Removes the given additional file from this group.

func (*DocumentGroup) RemoveDocument

func (group *DocumentGroup) RemoveDocument(document *Document)

Removes the given document from this group and sets its Group field to nil.

func (*DocumentGroup) SortedDocuments

func (group *DocumentGroup) SortedDocuments() []*Document

Returns the documents in this group sorted by their file path.

type Environment

type Environment struct {
	Name string
	Type EnvironmentType
}

Environment contains information about the target environment.

func NewEnvironment

func NewEnvironment(name string, environmentType EnvironmentType) *Environment

type EnvironmentType

type EnvironmentType string

EnvironmentType represents the type of the target environment such as Development or Production.

const (
	EnvironmentTypeUnknown     EnvironmentType = "unknown"
	EnvironmentTypeDevelopment EnvironmentType = "dev"
	EnvironmentTypeTesting     EnvironmentType = "test"
	EnvironmentTypeProduction  EnvironmentType = "prod"
)

type HelmOptions

type HelmOptions struct {
	ReleaseName string
	Namespace   string
	Values      string
}

Options to create documents using Helm.

func NewHelmOptions

func NewHelmOptions(releaseName string, namespace string) *HelmOptions

func NewHelmOptionsWithValues

func NewHelmOptionsWithValues(releaseName string, namespace string, values string) *HelmOptions

type KubernetesCluster

type KubernetesCluster struct {
	Version             *semver.Version
	Distribution        KubernetesDistribution
	AdditionalResources []*KubernetesResource
}

KubernetesCluster contains information about the target Kubernetes cluster.

func NewKubernetesCluster

func NewKubernetesCluster(version *semver.Version, distribution KubernetesDistribution) *KubernetesCluster

func NewKubernetesClusterWithAdditionalResources

func NewKubernetesClusterWithAdditionalResources(
	version *semver.Version,
	distribution KubernetesDistribution,
	additionalResources []*KubernetesResource,
) *KubernetesCluster

type KubernetesDistribution

type KubernetesDistribution string

KubernetesDistribution represents the distribution of the target Kubernetes cluster such as MicroK8s or OpenShift.

const (
	KubernetesDistributionUnknown   KubernetesDistribution = "unknown"
	KubernetesDistributionAKS       KubernetesDistribution = "aks"
	KubernetesDistributionEKS       KubernetesDistribution = "eks"
	KubernetesDistributionGKE       KubernetesDistribution = "gke"
	KubernetesDistributionK3S       KubernetesDistribution = "k3s"
	KubernetesDistributionKubeadm   KubernetesDistribution = "kubeadm"
	KubernetesDistributionMicroK8s  KubernetesDistribution = "microk8s"
	KubernetesDistributionMinikube  KubernetesDistribution = "minikube"
	KubernetesDistributionOpenShift KubernetesDistribution = "openshift"
)

type KubernetesResource

type KubernetesResource struct {
	ApiVersion   string
	Kind         string
	IsNamespaced bool
}

KubernetesResource defines a Kubernetes API resource. This includes both built-in Kubernetes objects and external CRDs.

func NewKubernetesResource

func NewKubernetesResource(apiVersion string, kind string, isNamespaced bool) *KubernetesResource

type KubernetesResourceInfo

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

KubernetesResourceInfo contains all the API resources defined in the target cluster and enables listing them and querying their existence.

func NewKubernetesResourceInfo

func NewKubernetesResourceInfo(version *semver.Version) *KubernetesResourceInfo

Creates a new KubernetesResourceInfo instance.

func (*KubernetesResourceInfo) AddKubernetesResource

func (info *KubernetesResourceInfo) AddKubernetesResource(resource *KubernetesResource)

Adds the given API resource to the available resources list.

func (*KubernetesResourceInfo) AddResource

func (info *KubernetesResourceInfo) AddResource(apiVersion string, kind string, isNamespaced bool)

Adds the given API resource to the available resources list.

func (*KubernetesResourceInfo) AllResources

func (info *KubernetesResourceInfo) AllResources() []*KubernetesResource

func (*KubernetesResourceInfo) Contains

func (info *KubernetesResourceInfo) Contains(apiVersion string, kind string) bool

Returns true if the given API resource exists in the target cluster.

func (*KubernetesResourceInfo) ContainsKind

func (info *KubernetesResourceInfo) ContainsKind(kind string) bool

Returns true if the given kind exists in the target cluster. This ignores the apiVersion field.

func (*KubernetesResourceInfo) IsNamespaced

func (info *KubernetesResourceInfo) IsNamespaced(apiVersion string, kind string) bool

Returns true if the given API resource is namespaced. E.g. returns true for v1/Pod, false for rbac.authorization.k8s.io/v1/ClusterRole.

type NewDocumentOptions added in v0.2.0

type NewDocumentOptions struct {
	Yaml          *string
	Object        *sobek.Object
	Path          *string
	DocumentGroup *string
}

func NewNewDocumentOptions added in v0.2.0

func NewNewDocumentOptions() *NewDocumentOptions

type OutputConfiguration

type OutputConfiguration struct {
	OutputPath string
}

OutputConfiguration specifies the output paths.

func NewOutputConfiguration

func NewOutputConfiguration() *OutputConfiguration

type Provisioner

type Provisioner struct {
	Type          ProvisionerType
	DocumentGroup *DocumentGroup
	Dependencies  *Dependencies[*Provisioner]
}

func ApplyDocuments

func ApplyDocuments(documentGroup *DocumentGroup) *Provisioner

func WaitDocuments

func WaitDocuments(documentGroup *DocumentGroup) *Provisioner

func (*Provisioner) RunAfter

func (provisioner *Provisioner) RunAfter(p *Provisioner)

Makes the given provisioner a prerequisite of this provisioner.

func (*Provisioner) RunBefore

func (provisioner *Provisioner) RunBefore(p *Provisioner)

Makes this provisioner a prerequisite of the given provisioner.

type ProvisionerType

type ProvisionerType string
const (
	ProvisionerTypeApply ProvisionerType = "apply"
	ProvisionerTypeWait  ProvisionerType = "wait"
)

type Step

type Step struct {
	Description string
	Numbers     []int
}

func NewStep

func NewStep(description string, numbers ...int) *Step

func (*Step) Compare

func (s *Step) Compare(other Step) int

func (*Step) Equals

func (s *Step) Equals(other Step) bool

func (*Step) String

func (s *Step) String() string

Jump to

Keyboard shortcuts

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