credentials

package
v0.0.0-...-a1261cd Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const InvalidAttribute = "InvalidAttribute: '%s'"
View Source
const NotSupportedCredKind = "NotSupportedCredKind: '%s'"

Variables

This section is empty.

Functions

func GetProfileFromAttribute

func GetProfileFromAttribute(attr map[string]string) (string, error)

func RegisterFactory

func RegisterFactory(vendor types.InfraVendor, factory *CredResolverFactory) error

func RegisterLocalCred

func RegisterLocalCred(vendor types.InfraVendor, lc LocalCred) error

Types

type CredResolver

type CredResolver interface {
	// GetSdkConfig Returns sdk credential, cli profile or empty, error
	GetSdkConfig(ctx context.Context) (cred interface{}, profile string, err error)
	SupportIdentityType() types.InfraVendor
	Description() string

	// GetStatus returns: credential status, permission or api error, server internal error (ex type cast)
	GetStatus(ctx context.Context) (protos.CredentialResolverStatus, error, error)
}

type CredResolverFactory

type CredResolverFactory struct {
	NewCredResolverFunc func(credConf *protos.CredResolverConfig) (CredResolver, error)
}

func GetFactory

func GetFactory(vendor types.InfraVendor) (*CredResolverFactory, bool)

type LocalCred

type LocalCred interface {
	GetLocalProfiles() ([]*protos.Profile, error)
}

func GetLocalCred

func GetLocalCred(vendor types.InfraVendor) (LocalCred, bool)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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