oci

package
v0.25.0 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2023 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const ProviderID = "OCI"

Variables

This section is empty.

Functions

This section is empty.

Types

type Backend

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

func NewBackend

func NewBackend(repository string, regOpts *RegistryOptions, opts ...NewBackendOpt) (*Backend, error)

func (*Backend) CheckWritePermissions

func (b *Backend) CheckWritePermissions(_ context.Context) error

CheckWritePermissions performs an actual write to the repository to check that the credentials

func (*Backend) Describe

func (b *Backend) Describe(_ context.Context, digest string) (*pb.CASResource, error)

func (*Backend) Download

func (b *Backend) Download(_ context.Context, w io.Writer, digest string) error

func (*Backend) Exists

func (b *Backend) Exists(_ context.Context, digest string) (bool, error)

Exists check that the artifact is already present in the repository and it points to the same image digest, meaning it has not been re-pushed/replaced This method is very naive so signatures will be used in future releases

func (*Backend) Upload

func (b *Backend) Upload(_ context.Context, r io.Reader, resource *pb.CASResource) error

type BackendProvider

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

func NewBackendProvider

func NewBackendProvider(cReader credentials.Reader) *BackendProvider

func (*BackendProvider) FromCredentials

func (p *BackendProvider) FromCredentials(ctx context.Context, secretName string) (backend.UploaderDownloader, error)

func (*BackendProvider) ID added in v0.14.0

func (p *BackendProvider) ID() string

func (*BackendProvider) ValidateAndExtractCredentials added in v0.14.0

func (p *BackendProvider) ValidateAndExtractCredentials(location string, credsJSON []byte) (any, error)

type Keychain

type Keychain = authn.Keychain

type NewBackendOpt added in v0.11.1

type NewBackendOpt func(*Backend)

func WithPrefix added in v0.11.1

func WithPrefix(prefix string) NewBackendOpt

type RegistryOptions

type RegistryOptions struct {
	AllowInsecure bool
	Keychain      Keychain
}

Jump to

Keyboard shortcuts

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