Documentation ¶
Index ¶
Constants ¶
View Source
const DefaultAuthProviderName string = "dockerConfig"
Variables ¶
View Source
var ErrorNoMatchingCredential = errors.New("no matching credential found for k8 secret")
Functions ¶
func GetRegistryHostName ¶
func Register ¶
func Register(name string, factory AuthProviderFactory)
Register adds the factory to the built in providers map
Types ¶
type AuthConfig ¶
type AuthConfig struct { Username string Password string IdentityToken string Email string Provider AuthProvider ExpiresOn time.Time }
This config represents the credentials that should be used when pulling artifacts from specific repositories.
type AuthProvider ¶
type AuthProvider interface { // Enabled returns true if the config provider is properly enabled // It will verify necessary values provided in config file to // create the AuthProvider Enabled(ctx context.Context) bool // Provide returns AuthConfig for registry. Provide(ctx context.Context, artifact string) (AuthConfig, error) }
func CreateAuthProviderFromConfig ¶
func CreateAuthProviderFromConfig(authProviderConfig AuthProviderConfig) (AuthProvider, error)
CreateAuthProvidersFromConfig creates the AuthProvider from the provided configuration. If the AuthProviderConfig isn't specified, use the default auth provider
type AuthProviderConfig ¶
type AuthProviderConfig map[string]interface{}
AuthProviderConfig represents the configuration of an AuthProvider
type AuthProviderFactory ¶
type AuthProviderFactory interface {
Create(authProviderConfig AuthProviderConfig) (AuthProvider, error)
}
AuthProviderFactory is an interface that defines methods to create an AuthProvider
Source Files ¶
Click to show internal directories.
Click to hide internal directories.