base

package
v0.0.0-...-e417875 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IndexProcessor

type IndexProcessor struct {
	RegCli registry.Client
}

IndexProcessor is a base processor to process artifact enveloped by OCI index or docker manifest list Currently, it is just a null implementation

func NewIndexProcessor

func NewIndexProcessor() *IndexProcessor

NewIndexProcessor creates a new base index processor.

func (*IndexProcessor) AbstractAddition

func (m *IndexProcessor) AbstractAddition(_ context.Context, _ *artifact.Artifact, addition string) (*processor.Addition, error)

AbstractAddition abstracts the addition of artifact

func (*IndexProcessor) AbstractMetadata

func (m *IndexProcessor) AbstractMetadata(_ context.Context, _ *artifact.Artifact, _ []byte) error

AbstractMetadata abstracts metadata of artifact

func (*IndexProcessor) GetArtifactType

func (m *IndexProcessor) GetArtifactType(_ context.Context, _ *artifact.Artifact) string

GetArtifactType returns the artifact type

func (*IndexProcessor) ListAdditionTypes

func (m *IndexProcessor) ListAdditionTypes(_ context.Context, _ *artifact.Artifact) []string

ListAdditionTypes returns the supported addition types

type ManifestProcessor

type ManifestProcessor struct {
	RegCli registry.Client
	// contains filtered or unexported fields
}

ManifestProcessor is a base processor to process artifact enveloped by OCI manifest or docker v2 manifest

func NewManifestProcessor

func NewManifestProcessor(properties ...string) *ManifestProcessor

NewManifestProcessor creates a new base manifest processor. All metadata read from config layer will be populated if specifying no "properties"

func (*ManifestProcessor) AbstractAddition

func (m *ManifestProcessor) AbstractAddition(_ context.Context, _ *artifact.Artifact, addition string) (*processor.Addition, error)

AbstractAddition abstracts the addition of artifact

func (*ManifestProcessor) AbstractMetadata

func (m *ManifestProcessor) AbstractMetadata(ctx context.Context, artifact *artifact.Artifact, content []byte) error

AbstractMetadata abstracts metadata of artifact

func (*ManifestProcessor) GetArtifactType

func (m *ManifestProcessor) GetArtifactType(_ context.Context, _ *artifact.Artifact) string

GetArtifactType returns the artifact type

func (*ManifestProcessor) ListAdditionTypes

func (m *ManifestProcessor) ListAdditionTypes(_ context.Context, _ *artifact.Artifact) []string

ListAdditionTypes returns the supported addition types

func (*ManifestProcessor) UnmarshalConfig

func (m *ManifestProcessor) UnmarshalConfig(_ context.Context, repository string, manifest []byte, v interface{}) error

UnmarshalConfig unmarshal the config blob of the artifact into the specified object "v"

Jump to

Keyboard shortcuts

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