npm

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: May 17, 2024 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

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

func DefaultConfig() (string, error)

func DefaultConfigHandler

func DefaultConfigHandler(cfg config.Context) error

Types

type Cache

type Cache struct {
	// contains filtered or unexported fields
}

func (*Cache) GetRepository

func (r *Cache) GetRepository(ctx cpi.Context, name string, prop bool) (*Repository, error)

type ConsumerProvider

type ConsumerProvider struct {
	// contains filtered or unexported fields
}

func (*ConsumerProvider) Get

func (*ConsumerProvider) Unregister

func (p *ConsumerProvider) Unregister(_ cpi.ProviderIdentity)

type Repository

type Repository struct {
	// contains filtered or unexported fields
}

func NewRepository

func NewRepository(ctx cpi.Context, path string, prop ...bool) (*Repository, error)

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)

Jump to

Keyboard shortcuts

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