Documentation ¶
Index ¶
- Constants
- Variables
- func DefaultConfigHandler(cfg config.Context) (string, config.Config, error)
- func IsEmptyAuthConfig(auth types.AuthConfig) bool
- func NewCredentials(cfg *configfile.ConfigFile, name string, store dockercred.Store) cpi.Credentials
- type ConsumerProvider
- func (p *ConsumerProvider) Get(req cpi.ConsumerIdentity) (cpi.CredentialsSource, bool)
- func (p *ConsumerProvider) Match(ectx cpi.EvaluationContext, req cpi.ConsumerIdentity, cur cpi.ConsumerIdentity, ...) (cpi.CredentialsSource, cpi.ConsumerIdentity)
- func (p *ConsumerProvider) Unregister(id cpi.ProviderIdentity)
- type Credentials
- func (c *Credentials) Credentials(context cpi.Context, source ...cpi.CredentialsSource) (cpi.Credentials, error)
- func (c *Credentials) ExistsProperty(name string) bool
- func (c *Credentials) GetProperty(name string) string
- func (c *Credentials) Properties() common.Properties
- func (c *Credentials) PropertyNames() set.Set[string]
- type Repositories
- type Repository
- type RepositorySpec
Constants ¶
View Source
const ( Type = "DockerConfig" TypeV1 = Type + runtime.VersionSeparator + "v1" )
View Source
const ATTR_REPOS = "ocm.software/ocm/api/credentials/extensions/repositories/dockerconfig"
View Source
const PROVIDER = "ocm.software/credentialprovider/" + Type
Variables ¶
View Source
var REALM = ocmlog.DefineSubRealm("docker config handling as credential repository", "credentials/dockerconfig")
Functions ¶
func DefaultConfigHandler ¶
func IsEmptyAuthConfig ¶
func IsEmptyAuthConfig(auth types.AuthConfig) bool
IsEmptyAuthConfig validates if the resulting auth config contains credentials.
func NewCredentials ¶
func NewCredentials(cfg *configfile.ConfigFile, name string, store dockercred.Store) cpi.Credentials
NewCredentials describes a default getter method for a authentication method.
Types ¶
type ConsumerProvider ¶
type ConsumerProvider struct {
// contains filtered or unexported fields
}
func NewConsumerProvider ¶ added in v0.16.0
func NewConsumerProvider(cfg *configfile.ConfigFile) *ConsumerProvider
func (*ConsumerProvider) Get ¶
func (p *ConsumerProvider) Get(req cpi.ConsumerIdentity) (cpi.CredentialsSource, bool)
func (*ConsumerProvider) Match ¶
func (p *ConsumerProvider) Match(ectx cpi.EvaluationContext, req cpi.ConsumerIdentity, cur cpi.ConsumerIdentity, m cpi.IdentityMatcher) (cpi.CredentialsSource, cpi.ConsumerIdentity)
func (*ConsumerProvider) Unregister ¶
func (p *ConsumerProvider) Unregister(id cpi.ProviderIdentity)
type Credentials ¶
type Credentials struct {
// contains filtered or unexported fields
}
func (*Credentials) Credentials ¶
func (c *Credentials) Credentials(context cpi.Context, source ...cpi.CredentialsSource) (cpi.Credentials, error)
func (*Credentials) ExistsProperty ¶
func (c *Credentials) ExistsProperty(name string) bool
func (*Credentials) GetProperty ¶
func (c *Credentials) GetProperty(name string) string
func (*Credentials) Properties ¶
func (c *Credentials) Properties() common.Properties
func (*Credentials) PropertyNames ¶
func (c *Credentials) PropertyNames() set.Set[string]
type Repositories ¶
type Repositories struct {
// contains filtered or unexported fields
}
func (*Repositories) GetRepository ¶
func (r *Repositories) GetRepository(ctx cpi.Context, name string, data []byte, propagate bool) (*Repository, error)
type Repository ¶
type Repository struct {
// contains filtered or unexported fields
}
func NewRepository ¶
func (*Repository) ExistsCredentials ¶
func (r *Repository) ExistsCredentials(name string) (bool, error)
func (*Repository) LookupCredentials ¶
func (r *Repository) LookupCredentials(name string) (cpi.Credentials, error)
func (*Repository) Read ¶
func (r *Repository) Read(force bool) error
func (*Repository) WriteCredentials ¶
func (r *Repository) WriteCredentials(name string, creds cpi.Credentials) (cpi.Credentials, error)
type RepositorySpec ¶
type RepositorySpec struct { runtime.ObjectVersionedType `json:",inline"` DockerConfigFile string `json:"dockerConfigFile,omitempty"` DockerConfig json.RawMessage `json:"dockerConfig,omitempty"` PropgateConsumerIdentity *bool `json:"propagateConsumerIdentity,omitempty"` }
RepositorySpec describes a docker config based credential repository interface.
func NewRepositorySpec ¶
func NewRepositorySpec(path string, prop ...bool) *RepositorySpec
NewRepositorySpec creates a new memory RepositorySpec.
func NewRepositorySpecForConfig ¶
func NewRepositorySpecForConfig(data []byte, prop ...bool) *RepositorySpec
func (*RepositorySpec) GetType ¶
func (a *RepositorySpec) GetType() string
func (*RepositorySpec) Repository ¶
func (a *RepositorySpec) Repository(ctx cpi.Context, creds cpi.Credentials) (cpi.Repository, error)
func (RepositorySpec) WithConsumerPropagation ¶
func (s RepositorySpec) WithConsumerPropagation(propagate bool) *RepositorySpec
Click to show internal directories.
Click to hide internal directories.