Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Definition ¶
type Definition struct {
Digest artifactstore.Digest `json:"digest"`
Kind artifactstore.ArtifactKind `json:"kind"`
SchemaID artifactstore.SchemaID `json:"schemaID"`
SchemaVersion string `json:"schemaVersion"`
LogicalName artifactstore.LogicalName `json:"logicalName"`
LogicalVersion artifactstore.LogicalVersion `json:"logicalVersion,omitempty"`
DisplayName string `json:"displayName,omitempty"`
Description string `json:"description,omitempty"`
Labels map[string]string `json:"labels,omitempty"`
Body json.RawMessage `json:"body"`
Dependencies []Selector `json:"dependencies,omitempty"`
}
func Canonicalize ¶
func Canonicalize(input Definition) (Definition, error)
func ReadCanonical ¶
func ReadCanonical( ctx context.Context, reader Reader, digest artifactstore.Digest, ) (Definition, error)
ReadCanonical reads a definition through a Reader and establishes the ownership and integrity guarantees required by consumers.
The returned definition is canonical, independently owned, valid, and has the digest requested by the caller.
func (Definition) Validate ¶
func (d Definition) Validate() error
type Reader ¶
type Reader interface {
Get(
ctx context.Context,
digest artifactstore.Digest,
) (Definition, error)
}
type Repository ¶
type Selector ¶
type Selector struct {
Kind artifactstore.ArtifactKind `json:"kind"`
LogicalName artifactstore.LogicalName `json:"logicalName,omitempty"`
VersionConstraint string `json:"versionConstraint,omitempty"`
Labels map[string]string `json:"labels,omitempty"`
}
type Writer ¶
type Writer interface {
Put(
ctx context.Context,
value Definition,
) (Definition, error)
}
Click to show internal directories.
Click to hide internal directories.