privregistry

package
v0.0.0-...-cb886e6 Latest Latest
Warning

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

Go to latest
Published: Dec 26, 2023 License: GPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrRegistryNotFound = errors.New("registry not found")

Functions

func GetECRToken

func GetECRToken(registry string, accessKeyID string, secretAccessKey string, region string) (string, error)

func NewDBPrivRegistryProvider

func NewDBPrivRegistryProvider(db *database.DB, secret string) *dbPrivRegistryProvider

Types

type PrivRegistryProvider

type PrivRegistryProvider interface {
	ListCredsByOwner(ctx context.Context, owner string, skipToken bool) ([]RegistryCreds, error)
	FetchCreds(ctx context.Context, owner, image string) (*RegistryCreds, error)
	StoreRegistry(ctx context.Context, owner, url, provider, credentials string) error
	DeleteRegistry(ctx context.Context, id uuid.UUID) error
}

type RegistryCreds

type RegistryCreds struct {
	ID       uuid.UUID `json:"id"`
	URL      string    `json:"url"`
	Provider string    `json:"provider"`
	Token    string    `json:"-"`
}

Jump to

Keyboard shortcuts

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