auth

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2026 License: MPL-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Basic

type Basic struct {
	Username string `yaml:"username"`
	Password string `yaml:"password"`
}

type Config

type Config struct {
	GitHub GitHub      `yaml:"github,omitempty"`
	HTTP   []HTTPEntry `yaml:"http,omitempty"`
	OCI    []OCIAuth   `yaml:"oci,omitempty"`
}

func (Config) IsZero

func (c Config) IsZero() bool

func (Config) Validate

func (c Config) Validate() error

type GitHub

type GitHub struct {
	Token string `yaml:"token,omitempty"`
}

type HTTPEntry

type HTTPEntry struct {
	Host   string  `yaml:"host"`
	Bearer string  `yaml:"bearer,omitempty"`
	Basic  *Basic  `yaml:"basic,omitempty"`
	Header *Header `yaml:"header,omitempty"`
}

func (HTTPEntry) Validate

func (e HTTPEntry) Validate() error
type Header struct {
	Name  string `yaml:"name"`
	Value string `yaml:"value"`
}

type OCIAuth added in v0.3.0

type OCIAuth struct {
	Registry string `yaml:"registry"`
	Username string `yaml:"username"`
	Password string `yaml:"password"`
}

type Resolver

type Resolver interface {
	GitHubToken() string
	HeadersFor(reqURL string) (http.Header, error)
	OCICredentials(registry string) (username, password string, ok bool)
}

func NewResolver

func NewResolver(cfg Config) (Resolver, error)

func NopResolver

func NopResolver() Resolver

Jump to

Keyboard shortcuts

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