utils

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2024 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const DEFAULT_OCM_CONFIG = ".ocmconfig"
View Source
const DEFAULT_OCM_CONFIG_DIR = ".ocm"

Variables

This section is empty.

Functions

func Configure

func Configure(ctxp config.ContextProvider, path string, fss ...vfs.FileSystem) (ocm.Context, error)

func Configure2 added in v0.12.0

func Configure2(ctx config.ContextProvider, path string, fss ...vfs.FileSystem) (ocm.Context, config.Config, error)

func ConfigureByData

func ConfigureByData(ctx config.ContextProvider, data []byte, info string) error

func ConfigureByData2 added in v0.12.0

func ConfigureByData2(ctx config.ContextProvider, data []byte, info string) (config.Config, error)

func GetOCIArtifactRef

func GetOCIArtifactRef(ctxp ocm.ContextProvider, r ocm.ResourceAccess) (string, error)

func GetResourceData added in v0.3.0

func GetResourceData(acc ocm.AccessProvider) ([]byte, error)

func GetResourceDataForPath added in v0.4.0

func GetResourceDataForPath(cv ocm.ComponentVersionAccess, id metav1.Identity, path []metav1.Identity, resolvers ...ocm.ComponentVersionResolver) ([]byte, error)

func GetResourceDataForRef added in v0.4.0

func GetResourceDataForRef(cv ocm.ComponentVersionAccess, ref metav1.ResourceReference, resolvers ...ocm.ComponentVersionResolver) ([]byte, error)

func GetResourceReader added in v0.4.0

func GetResourceReader(acc ocm.AccessProvider) (io.ReadCloser, error)

func GetResourceReaderForPath added in v0.4.0

func GetResourceReaderForPath(cv ocm.ComponentVersionAccess, id metav1.Identity, path []metav1.Identity, resolvers ...ocm.ComponentVersionResolver) (io.ReadCloser, error)

func GetResourceReaderForRef added in v0.4.0

func GetResourceReaderForRef(cv ocm.ComponentVersionAccess, ref metav1.ResourceReference, resolvers ...ocm.ComponentVersionResolver) (io.ReadCloser, error)

func Walk added in v0.4.1

Walk traverses a component version graph using the WalkingStep to process found component version.

Types

type WalkingStep added in v0.4.1

type WalkingStep[T any] func(state common.WalkingState[T, ocm.ComponentVersionAccess]) (bool, error)

WalkingStep is used to process a component version during graph traversal. If returned true, the traversal process follows local component references- If an error is returned the traversal is aborted with this error, Additionally, an info object of type T can be registered in the state for the component version.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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