Documentation ¶
Index ¶
Constants ¶
View Source
const (
// ArtifactTypeUnknown defines the type for the unknown artifacts
ArtifactTypeUnknown = "UNKNOWN"
)
Variables ¶
View Source
var ( // DefaultProcessor is to process artifact which has no specific processor DefaultProcessor = &defaultProcessor{regCli: registry.Cli} )
View Source
var ( // Registry for registered artifact processors Registry = map[string]Processor{} )
Functions ¶
Types ¶
type Addition ¶
type Addition struct { Content []byte // the content of the addition ContentType string // the content type of the addition, returned as "Content-Type" header in API }
Addition defines the specific addition of different artifacts: build history for image, values.yaml for chart, etc
type Processor ¶
type Processor interface { // GetArtifactType returns the type of one kind of artifact specified by media type GetArtifactType(ctx context.Context, artifact *artifact.Artifact) string // ListAdditionTypes returns the supported addition types of one kind of artifact specified by media type ListAdditionTypes(ctx context.Context, artifact *artifact.Artifact) []string // AbstractMetadata abstracts the metadata for the specific artifact type into the artifact model, // the metadata can be got from the manifest or other layers referenced by the manifest. AbstractMetadata(ctx context.Context, artifact *artifact.Artifact, manifest []byte) error // AbstractAddition abstracts the addition of the artifact. // The additions are different for different artifacts: // build history for image; AbstractAddition(ctx context.Context, artifact *artifact.Artifact, additionType string) (addition *Addition, err error) }
Processor processes specified artifact
Click to show internal directories.
Click to hide internal directories.