builder

package
v0.0.0-...-877fc11 Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2024 License: Apache-2.0 Imports: 31 Imported by: 0

Documentation

Index

Constants

View Source
const (
	T_OCIARTIFACT = "artifact"
	T_OCIINDEX    = "index"
	T_OCIMANIFEST = "manifest"
)
View Source
const T_BLOBACCESS = "blob access"
View Source
const T_COMPARCH = "component archive"
View Source
const T_OCIARTIFACTSET = "artifact set"
View Source
const T_OCICONFIG = "oci config"
View Source
const T_OCILAYER = "oci layer"
View Source
const T_OCINAMESPACE = "oci namespace"
View Source
const T_OCIPLATFORM = "platform consumer"
View Source
const T_OCIREPOSITORY = "oci repository"
View Source
const T_OCI_CTF = "oci common transport format"
View Source
const T_OCMACCESS = "access"
View Source
const T_OCMCOMPONENT = "component"
View Source
const T_OCMLABELS = "element with labels"
View Source
const T_OCMMETA = "element with metadata"
View Source
const T_OCMPROVIDER = "provider"
View Source
const T_OCMREF = "reference"
View Source
const T_OCMREPOSITORY = "ocm repository"
View Source
const T_OCMRESOURCE = "resource"
View Source
const T_OCMSOURCE = "source"
View Source
const T_OCMVERSION = "component version"
View Source
const T_OCM_COMPOSITION = "ocm composition repositoryt"
View Source
const T_OCM_CTF = "ocm common transport format"

Variables

This section is empty.

Functions

This section is empty.

Types

type Builder

type Builder struct {
	*env.Environment
	// contains filtered or unexported fields
}

func New

func New(opts ...env.Option) *Builder

New creates a new composition environment including an own OCM context and a private filesystem, which can be used to compose OCM/OCI repositories and their content. It can be configured to work with dedicated settings, also.

func NewBuilder

func NewBuilder(opts ...env.Option) *Builder

NewBuilder creates a new composition environment including an own OCM context and a private filesystem, which can be used to compose OCM/OCI repositories and their content. By default, a private environment is created based on a ginko fail handling intended to be used for test cases. But it can be configured to work as library with dedicated settings, also.

func (*Builder) Access

func (b *Builder) Access(acc compdesc.AccessSpec)

func (*Builder) Annotation

func (b *Builder) Annotation(name, value string)

func (*Builder) Artifact

func (b *Builder) Artifact(desc *artdesc.Descriptor)

func (*Builder) ArtifactSet

func (b *Builder) ArtifactSet(path string, fmt accessio.FileFormat, f ...func())

func (*Builder) BlobData

func (b *Builder) BlobData(mime string, data []byte)

func (*Builder) BlobFromDirTree

func (b *Builder) BlobFromDirTree(path string, opts ...dirtree.Option)

func (*Builder) BlobFromFile

func (b *Builder) BlobFromFile(mime string, path string)

func (*Builder) BlobStringData

func (b *Builder) BlobStringData(mime string, data string)

func (*Builder) Build

func (b *Builder) Build(funcs ...func(*Builder)) (err error)

Build executes the given functions and returns a potential configuration error, instead of using the builder's env.FailHandler. Additionally, a build can always throw an exception using the exception.Throw function.

func (*Builder) ClearExtraIdentities

func (b *Builder) ClearExtraIdentities()

func (*Builder) ClearLabels

func (b *Builder) ClearLabels()

func (*Builder) Component

func (b *Builder) Component(name string, f ...func())

func (*Builder) ComponentArchive

func (b *Builder) ComponentArchive(path string, fmt accessio.FileFormat, name, vers string, f ...func())

func (*Builder) ComponentVersion

func (b *Builder) ComponentVersion(name, version string, f ...func())

func (*Builder) Config

func (b *Builder) Config(f ...func())

func (*Builder) Configure

func (b *Builder) Configure(funcs ...func())

func (*Builder) Digest

func (b *Builder) Digest(value, algo, norm string)

func (*Builder) ExtraIdentity

func (b *Builder) ExtraIdentity(name string, value string)

func (*Builder) GeneralOCIRepository

func (b *Builder) GeneralOCIRepository(spec oci.RepositorySpec, f ...func())

func (*Builder) Hint

func (b *Builder) Hint(hint string)

func (*Builder) Index

func (b *Builder) Index(tag string, f ...func()) *artdesc.Descriptor

func (*Builder) Label

func (b *Builder) Label(name string, value interface{}, opts ...metav1.LabelOption)

func (*Builder) Layer

func (b *Builder) Layer(f ...func()) *artdesc.Descriptor

func (*Builder) Manifest

func (b *Builder) Manifest(tag string, f ...func()) *artdesc.Descriptor

func (*Builder) ModificationOptions

func (b *Builder) ModificationOptions(opts ...ocm.ModificationOption)

func (*Builder) ModifyResource

func (b *Builder) ModifyResource(id metav1.Identity, f ...func())

func (*Builder) Namespace

func (b *Builder) Namespace(name string, f ...func())

func (*Builder) OCIBasedOCMRepository

func (b *Builder) OCIBasedOCMRepository(url string, path string, f ...func())

func (*Builder) OCICommonTransport

func (b *Builder) OCICommonTransport(path string, fmt accessio.FileFormat, f ...func())

func (*Builder) OCIRegistry

func (b *Builder) OCIRegistry(url string, path string, f ...func())

func (*Builder) OCMCommonTransport

func (b *Builder) OCMCommonTransport(path string, fmt accessio.FileFormat, f ...func())

func (*Builder) OCMCompositionRepository

func (b *Builder) OCMCompositionRepository(name string, f ...func())

func (*Builder) OCMRepository

func (b *Builder) OCMRepository(spec ocm.RepositorySpec, f ...func())

func (*Builder) Platform

func (b *Builder) Platform(os string, arch string)

func (*Builder) PropagateError

func (b *Builder) PropagateError(errp *error, matchers ...exception.Matcher)

PropagateError can be used in defer to convert an composition error into an error return.

func (*Builder) Provider

func (b *Builder) Provider(name string, f ...func())

func (*Builder) RSAKeyPair

func (b *Builder) RSAKeyPair(name ...string)

TODO: switch to context local setting.

func (*Builder) ReadRSAKeyPair

func (b *Builder) ReadRSAKeyPair(name, path string)

func (*Builder) Reference

func (b *Builder) Reference(name, comp, vers string, f ...func())

func (*Builder) RemoveExtraIdentity

func (b *Builder) RemoveExtraIdentity(name string)

func (*Builder) RemoveLabel

func (b *Builder) RemoveLabel(name string)

func (*Builder) Resource

func (b *Builder) Resource(name, vers, typ string, relation metav1.ResourceRelation, f ...func())

func (*Builder) SetFailhandler

func (b *Builder) SetFailhandler(h ...env.FailHandler) *Builder

func (*Builder) Source

func (b *Builder) Source(name, vers, typ string, f ...func())

func (*Builder) Tags

func (b *Builder) Tags(tags ...string)

func (*Builder) Version

func (b *Builder) Version(name string, f ...func())

type State

type State struct{}

Jump to

Keyboard shortcuts

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