internal

package
v2.0.0-...-98cc131 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2023 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const CONTEXT_TYPE = "ocm.cmd" + datacontext.OCM_CONTEXT_SUFFIX

Variables

View Source
var DefaultContext = Builder{}.New(datacontext.MODE_SHARED)

DefaultContext is the default context initialized by init functions.

Functions

This section is empty.

Types

type Builder

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

func (Builder) Bound

func (b Builder) Bound() (Context, context.Context)

func (Builder) New

func (b Builder) New(m ...datacontext.BuilderMode) Context

func (Builder) WithContext

func (b Builder) WithContext(ctx context.Context) Builder

func (Builder) WithErrorOutput

func (b Builder) WithErrorOutput(w io.Writer) Builder

func (Builder) WithFileSystem

func (b Builder) WithFileSystem(fs vfs.FileSystem) Builder

func (Builder) WithInput

func (b Builder) WithInput(r io.Reader) Builder

func (Builder) WithOCM

func (b Builder) WithOCM(ctx ocm.Context) Builder

func (Builder) WithOutput

func (b Builder) WithOutput(w io.Writer) Builder

func (Builder) WithSharedAttributes

func (b Builder) WithSharedAttributes(ctx datacontext.AttributesContext) Builder

type Context

type Context interface {
	datacontext.Context

	AttributesContext() datacontext.AttributesContext

	ConfigContext() config.Context
	CredentialsContext() credentials.Context
	OCIContext() oci.Context
	OCMContext() ocm.Context

	FileSystem() *FileSystem

	OCI() OCI
	OCM() OCM

	ApplyOption(options accessio.Options) error

	out.Context
	WithStdIO(r io.Reader, o io.Writer, e io.Writer) Context
}

func DefinedForContext

func DefinedForContext(ctx context.Context) (Context, bool)

func ForContext

func ForContext(ctx context.Context) Context

ForContext returns the Context to use for context.Context. This is either an explicit context or the default context. The returned context incorporates the given context.

type FileSystem

type FileSystem struct {
	vfs.FileSystem
}

func (*FileSystem) ApplyOption

func (f *FileSystem) ApplyOption(options accessio.Options) error

type OCI

type OCI interface {
	Context() oci.Context
	OpenCTF(path string) (oci.Repository, error)
}

type OCM

type OCM interface {
	Context() ocm.Context
	OpenCTF(path string) (ocm.Repository, error)
}

Jump to

Keyboard shortcuts

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