index

package
v0.1.0-alpha.2 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const SchemaVersion = 1

Variables

This section is empty.

Functions

func Encode

func Encode(d *ArtifactIndex) ([]byte, error)

Types

type ArtifactIndex

type ArtifactIndex struct {
	specs.Versioned
	Index []ArtifactMeta `json:"artifacts"`
}

func Decode

func Decode(data []byte) (*ArtifactIndex, error)

type ArtifactMeta

type ArtifactMeta struct {
	Repository string        `json:"repository"`
	Tag        string        `json:"tag,omitempty"`
	Digest     digest.Digest `json:"digest,omitempty"`
}

func NewMeta

func NewMeta(repo string, tag string, digest digest.Digest) *ArtifactMeta

type RepositoryIndex

type RepositoryIndex struct {
	// contains filtered or unexported fields
}

func NewRepositoryIndex

func NewRepositoryIndex() *RepositoryIndex

func (*RepositoryIndex) AddArtifactInfo

func (r *RepositoryIndex) AddArtifactInfo(n *ArtifactMeta)

func (*RepositoryIndex) AddTagsFor

func (r *RepositoryIndex) AddTagsFor(repo string, digest digest.Digest, tags ...string) error

func (*RepositoryIndex) GetArtifactInfo

func (r *RepositoryIndex) GetArtifactInfo(repo, reference string) *ArtifactMeta

func (*RepositoryIndex) GetArtifactInfos

func (r *RepositoryIndex) GetArtifactInfos(digest digest.Digest) []*ArtifactMeta

func (*RepositoryIndex) GetArtifacts

func (r *RepositoryIndex) GetArtifacts(repo string) []string

func (*RepositoryIndex) GetDescriptor

func (r *RepositoryIndex) GetDescriptor() *ArtifactIndex

func (*RepositoryIndex) GetTags

func (r *RepositoryIndex) GetTags(repo string) []string

func (*RepositoryIndex) HasArtifact

func (r *RepositoryIndex) HasArtifact(repo, tag string) bool

func (*RepositoryIndex) RepositoryList

func (r *RepositoryIndex) RepositoryList() []string

Jump to

Keyboard shortcuts

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