registries

package
v0.0.0-...-4c17a3b Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Credential

type Credential struct {
	Username string `json:"username"`
	Password string `json:"password"`
}

type Domain

type Domain string

type Keychain

type Keychain map[Domain]Credential

Keychain is the umbrella wrapping all the logic to extract the any authentication fields that the builder support. The authentication token origin can change quite a lot between location where the cluster runs. It should be noted that this is subject to change a lot as I get more exposure to the different environnments.

func NewKeychain

func NewKeychain(r io.Reader) (Keychain, error)

Create a new Keychain

Keychain can be used with the container registry as a way to authenticate to any private registry

Currently, the logic expects the user/password to already be set up for the registry provider. The Keychain is created off the JSON payload from the reader and needs to follow the structure of the private struct define in the method.

func (Keychain) Resolve

func (kc Keychain) Resolve(target authn.Resource) (authn.Authenticator, error)

Resolve returns an Authenticator that will be used by the container registry to authenticate the session.

type Registry

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

func NewRegistry

func NewRegistry(url string, opts ...RegistryOption) (*Registry, error)

func (*Registry) Reference

func (r *Registry) Reference() name.Reference

func (*Registry) Upload

func (r *Registry) Upload(ctx context.Context, index gcr.ImageIndex) (*spot.BuildImage, error)

Upload the given imageIndex to the registy at `url`

type RegistryOption

type RegistryOption func(*Registry)

func WithKeyChain

func WithKeyChain(keychain *Keychain) RegistryOption

Jump to

Keyboard shortcuts

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