testregistry

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2025 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Auth

type Auth interface {
	Params(data test.Data, helpers test.Helpers) []string
}

Auth is an interface to pass to the test registry for configuring authentication

type BasicAuth

type BasicAuth struct {
	Realm    string
	HtFile   string
	Username string
	Password string
}

func (*BasicAuth) Params

func (ba *BasicAuth) Params(data test.Data, helpers test.Helpers) []string

type NoAuth

type NoAuth struct {
}

func (*NoAuth) Params

func (na *NoAuth) Params(data test.Data, helpers test.Helpers) []string

type RegistryServer

type RegistryServer struct {
	IP       net.IP
	Port     int
	Scheme   string
	ListenIP net.IP
	Cleanup  func(err error)
	Logs     func()
	HostsDir string // contains "<HostIP>:<ListenPort>/hosts.toml"
}

func NewRegistry

func NewRegistry(data test.Data, helpers test.Helpers, ca *testca.CA, port int, auth Auth, boundCleanup func(error)) *RegistryServer

func NewWithNoAuth

func NewWithNoAuth(data test.Data, helpers test.Helpers, port int, tls bool) *RegistryServer

func NewWithTokenAuth

func NewWithTokenAuth(data test.Data, helpers test.Helpers, user, pass string, port int, tls bool) *RegistryServer

type TokenAuth

type TokenAuth struct {
	Address  string
	CertPath string
}

func (*TokenAuth) Params

func (ta *TokenAuth) Params(data test.Data, helpers test.Helpers) []string

type TokenAuthServer

type TokenAuthServer struct {
	IP       net.IP
	Port     int
	Scheme   string
	ListenIP net.IP
	Cleanup  func(err error)
	Logs     func()
	Auth     Auth
	CertPath string
}

func NewAuthServer

func NewAuthServer(data test.Data, helpers test.Helpers, ca *testca.CA, port int, user, pass string, tls bool) *TokenAuthServer

Jump to

Keyboard shortcuts

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