Documentation ¶
Index ¶
- Constants
- func DefaultConfig() (string, error)
- func DefaultConfigHandler(cfg config.Context) (string, config.Config, error)
- type Cache
- 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(_ cpi.ProviderIdentity)
- type Repository
- type RepositorySpec
Constants ¶
View Source
const ( // Type is the type of the NPMConfig. Type = "NPMConfig" TypeV1 = Type + runtime.VersionSeparator + "v1" )
View Source
const (
ConfigFileName = ".npmrc"
)
View Source
const PROVIDER = "ocm.software/credentialprovider/" + Type
Variables ¶
This section is empty.
Functions ¶
func DefaultConfig ¶
Types ¶
type Cache ¶
type Cache struct {
// contains filtered or unexported fields
}
func (*Cache) GetRepository ¶
type ConsumerProvider ¶
type ConsumerProvider struct {
// contains filtered or unexported fields
}
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(_ cpi.ProviderIdentity)
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(_ string, _ cpi.Credentials) (cpi.Credentials, error)
type RepositorySpec ¶
type RepositorySpec struct { runtime.ObjectVersionedType `json:",inline"` NpmrcFile string `json:"npmrcFile,omitempty"` PropgateConsumerIdentity *bool `json:"propagateConsumerIdentity,omitempty"` }
RepositorySpec describes a docker npmrc based credential repository interface.
func NewRepositorySpec ¶
func NewRepositorySpec(path string, propagate ...bool) *RepositorySpec
NewRepositorySpec creates a new memory RepositorySpec.
func (*RepositorySpec) GetType ¶
func (rs *RepositorySpec) GetType() string
func (*RepositorySpec) Repository ¶
func (rs *RepositorySpec) Repository(ctx cpi.Context, _ cpi.Credentials) (cpi.Repository, error)
Click to show internal directories.
Click to hide internal directories.