artifacts

package
v0.22.2 Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrFileRead        = errors.New("failed to read artifact")
	ErrInvalidFileName = errors.New("invalid file name")
)
View Source
var Artifacts = make(map[string]Artifact)

Functions

func IsValidName added in v0.16.0

func IsValidName(itemName string) bool

func Read

func Read(ctx context.Context, repoStore drivers.RepoStore, registryStore drivers.RegistryStore, instID, filePath string) (*drivers.CatalogEntry, error)

func Register

func Register(name string, artifact Artifact)

func SanitizedName added in v0.16.0

func SanitizedName(filePath string) string

SanitizedName returns a sanitized name for an artifact from file path.

func Write

func Write(ctx context.Context, repoStore drivers.RepoStore, instID string, catalog *drivers.CatalogEntry) error

Types

type Artifact

type Artifact interface {
	DeSerialise(ctx context.Context, filePath string, blob string) (*drivers.CatalogEntry, error)
	Serialise(ctx context.Context, catalogObject *drivers.CatalogEntry) (string, error)
}

Directories

Path Synopsis
Package yaml reads and writes artifacts that exactly mirror the internal representation
Package yaml reads and writes artifacts that exactly mirror the internal representation

Jump to

Keyboard shortcuts

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