Documentation ¶
Index ¶
- Constants
- func CredentialsChain(creds ...cpi.GenericCredentialsSpec) cpi.CredentialsChain
- type Config
- func (a *Config) AddAlias(name string, repo cpi.RepositorySpec, creds ...cpi.CredentialsSpec) error
- func (a *Config) AddConsumer(id cpi.ConsumerIdentity, creds ...cpi.CredentialsSpec) error
- func (a *Config) AddRepository(repo cpi.RepositorySpec, creds ...cpi.CredentialsSpec) error
- func (a *Config) ApplyTo(ctx cfgcpi.Context, target interface{}) error
- func (a *Config) GetType() string
- func (a *Config) MapCredentialsChain(creds ...cpi.CredentialsSpec) ([]cpi.GenericCredentialsSpec, error)
- func (a *Config) MapRepository(repo cpi.RepositorySpec, creds ...cpi.CredentialsSpec) (*RepositorySpec, error)
- type ConsumerSpec
- type RepositorySpec
Constants ¶
View Source
const ( ConfigType = "credentials" + cfgcpi.OCM_CONFIG_TYPE_SUFFIX ConfigTypeV1 = ConfigType + runtime.VersionSeparator + "v1" )
Variables ¶
This section is empty.
Functions ¶
func CredentialsChain ¶
func CredentialsChain(creds ...cpi.GenericCredentialsSpec) cpi.CredentialsChain
Types ¶
type Config ¶
type Config struct { runtime.ObjectVersionedType `json:",inline"` // Consumers describe predefine logical cosumer specs mapped to credentials // These will (potentially) be evaluated if access objects requiring credentials // are provided by other modules (e.g. oci repo access) without // specifying crednentials. Then this module can request credentials here by passing // an appropriate consumer spec. Consumers []ConsumerSpec `json:"consumers,omitempty"` // Repositories describe preloaded credential repositories with potential credential chain Repositories []RepositorySpec `json:"repositories,omitempty"` // Aliases describe logical credential repositories mapped to implementing repositories Aliases map[string]RepositorySpec `json:"aliases,omitempty"` }
Config describes a configuration for the config context.
func (*Config) AddAlias ¶
func (a *Config) AddAlias(name string, repo cpi.RepositorySpec, creds ...cpi.CredentialsSpec) error
func (*Config) AddConsumer ¶
func (a *Config) AddConsumer(id cpi.ConsumerIdentity, creds ...cpi.CredentialsSpec) error
func (*Config) AddRepository ¶
func (a *Config) AddRepository(repo cpi.RepositorySpec, creds ...cpi.CredentialsSpec) error
func (*Config) MapCredentialsChain ¶
func (a *Config) MapCredentialsChain(creds ...cpi.CredentialsSpec) ([]cpi.GenericCredentialsSpec, error)
func (*Config) MapRepository ¶
func (a *Config) MapRepository(repo cpi.RepositorySpec, creds ...cpi.CredentialsSpec) (*RepositorySpec, error)
type ConsumerSpec ¶
type ConsumerSpec struct { Identity cpi.ConsumerIdentity `json:"identity"` Credentials []cpi.GenericCredentialsSpec `json:"credentials"` }
type RepositorySpec ¶
type RepositorySpec struct { Repository cpi.GenericRepositorySpec `json:"repository"` Credentials []cpi.GenericCredentialsSpec `json:"credentials,omitempty"` }
Click to show internal directories.
Click to hide internal directories.