hopsreg

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// AnnotationMetadataVersion is the annotation key used to describe the metadata version.
	AnnotationMetadataVersion = "formulae.brew.sh/version"

	// MetadataVersionV1 is the value of the "formulae.brew.sh/version" annotation for the v1 API.
	MetadataVersionV1 = "v1"

	// MetadataVersionV2 is the value of the "formulae.brew.sh/version" annotation for the v2 API.
	MetadataVersionV2 = "v2"

	// MetadataVersionV3 is the value of the "formulae.brew.sh/version" annotation for the v3 API.
	MetadataVersionV3 = "v3"
)

Variables

This section is empty.

Functions

func ListTags

func ListTags(ctx context.Context, repo oras.ReadOnlyGraphTarget) ([]string, error)

ListTags lists the tags available in a repository, only if the repository supports listing tags.

Types

type Local

type Local struct {
	Dir string
}

Local defines a local bottle store. The local directory stores oci-layout bottle repository dirs.

func NewLocal

func NewLocal(dir string) *Local

NewLocal initializes a local bottle store.

func (*Local) Repositories

func (r *Local) Repositories(_ context.Context) ([]string, error)

Repositories lists bottle repositories.

func (*Local) Repository

func (r *Local) Repository(ctx context.Context, name string) (oras.GraphTarget, error)

Repository produces a local bottle repository.

type Registry

type Registry interface {
	Repository(ctx context.Context, name string) (oras.GraphTarget, error)
}

Registry stores Bottles.

type Remote

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

Remote defines a registry of bottles.

func NewRemote

func NewRemote(prefix string, client remote.Client, plainHTTP bool) (*Remote, error)

NewRemote initializes a remote registry.

func (*Remote) Ping added in v0.2.0

func (r *Remote) Ping(ctx context.Context) error

Ping checks whether or not the registry implement Docker Registry API V2 or OCI Distribution Specification. Ping can be used to check authentication when an auth client is configured.

func (*Remote) Repositories

func (r *Remote) Repositories(ctx context.Context) ([]string, error)

Repositories lists bottle repositories.

func (*Remote) Repository

func (r *Remote) Repository(ctx context.Context, name string) (oras.GraphTarget, error)

Repository produces a bottle repository.

Jump to

Keyboard shortcuts

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