registry

package
v1.43.2 Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2021 License: Apache-2.0 Imports: 22 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckAccess

func CheckAccess(endpoint, username, password, org string, requestedAction ScopeAction) error

func GetCredentialsFromConfigJSON

func GetCredentialsFromConfigJSON(configJson []byte) (map[string]Credentials, error)

func GetECRBasicAuthToken

func GetECRBasicAuthToken(ecrEndpoint, username, password string) (string, error)

func IsECREndpoint

func IsECREndpoint(host string) bool

func LoadAuthForRegistry

func LoadAuthForRegistry(endpoint string) (string, string, error)

func MakeProxiedImageURL

func MakeProxiedImageURL(proxyHost string, appSlug string, image string) string

func PullSecretForRegistries

func PullSecretForRegistries(registries []string, username, password string, kuberneteNamespace string) (*corev1.Secret, error)

Types

type BearerToken

type BearerToken struct {
	Token       string    `json:"token"`
	AccessToken string    `json:"access_token"`
	ExpiresIn   int       `json:"expires_in"`
	IssuedAt    time.Time `json:"issued_at"`
	// contains filtered or unexported fields
}

Copied from github.com/containers/image/docker Time fields aren't used

type Credentials

type Credentials struct {
	Username string
	Password string
}

func GetCredentialsForRegistryFromConfigJSON

func GetCredentialsForRegistryFromConfigJSON(configJson []byte, registry string) (Credentials, error)

type DockerCfgJSON

type DockerCfgJSON struct {
	Auths map[string]DockercfgAuth `json:"auths"`
}

type DockercfgAuth

type DockercfgAuth struct {
	Auth string `json:"auth,omitempty"`
}

type Login

type Login struct {
	Username string
	Password string
}

func GetECRLogin

func GetECRLogin(ecrEndpoint, username, password string) (*Login, error)

type RegistryOptions

type RegistryOptions struct {
	Endpoint      string
	ProxyEndpoint string
	Namespace     string
	Username      string
	Password      string
}

type RegistryProxyInfo

type RegistryProxyInfo struct {
	Registry string
	Proxy    string
}

func ProxyEndpointFromLicense

func ProxyEndpointFromLicense(license *kotsv1beta1.License) *RegistryProxyInfo

func (*RegistryProxyInfo) ToSlice

func (r *RegistryProxyInfo) ToSlice() []string

type ScopeAction

type ScopeAction string
const (
	ActionPull ScopeAction = "pull"
	ActionPush ScopeAction = "push"
)

Jump to

Keyboard shortcuts

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