Documentation ¶
Index ¶
- Constants
- func AddConfig(opts flagsets.ConfigOptions, config flagsets.Config) error
- func ConfigHandler() flagsets.ConfigOptionTypeSetHandler
- type AccessSpec
- func (a *AccessSpec) AccessMethod(c accspeccpi.ComponentVersionAccess) (accspeccpi.AccessMethod, error)
- func (a *AccessSpec) Describe(_ accspeccpi.Context) string
- func (a *AccessSpec) GetPackageVersion(ctx accspeccpi.Context) (*npm.Version, error)
- func (a *AccessSpec) GetReferenceHint(_ accspeccpi.ComponentVersionAccess) string
- func (_ *AccessSpec) GetType() string
- func (a *AccessSpec) GlobalAccessSpec(_ accspeccpi.Context) accspeccpi.AccessSpec
- func (_ *AccessSpec) IsLocal(accspeccpi.Context) bool
- func (a *AccessSpec) PackageUrl() string
- func (a *AccessSpec) PackageVersionUrl() string
Constants ¶
View Source
const ( Type = "npm" TypeV1 = Type + runtime.VersionSeparator + "v1" )
Type is the access type of NPM registry.
Variables ¶
This section is empty.
Functions ¶
func ConfigHandler ¶
func ConfigHandler() flagsets.ConfigOptionTypeSetHandler
Types ¶
type AccessSpec ¶
type AccessSpec struct { runtime.ObjectVersionedType `json:",inline"` // Registry is the base URL of the NPM registry Registry string `json:"registry"` // Package is the name of NPM package Package string `json:"package"` // Version of the NPM package. Version string `json:"version"` }
AccessSpec describes the access for a NPM registry.
func New ¶
func New(registry, pkg, version string) *AccessSpec
New creates a new NPM registry access spec version v1.
func (*AccessSpec) AccessMethod ¶
func (a *AccessSpec) AccessMethod(c accspeccpi.ComponentVersionAccess) (accspeccpi.AccessMethod, error)
func (*AccessSpec) Describe ¶
func (a *AccessSpec) Describe(_ accspeccpi.Context) string
func (*AccessSpec) GetPackageVersion ¶ added in v0.11.0
func (a *AccessSpec) GetPackageVersion(ctx accspeccpi.Context) (*npm.Version, error)
func (*AccessSpec) GetReferenceHint ¶
func (a *AccessSpec) GetReferenceHint(_ accspeccpi.ComponentVersionAccess) string
func (*AccessSpec) GetType ¶
func (_ *AccessSpec) GetType() string
func (*AccessSpec) GlobalAccessSpec ¶
func (a *AccessSpec) GlobalAccessSpec(_ accspeccpi.Context) accspeccpi.AccessSpec
func (*AccessSpec) IsLocal ¶
func (_ *AccessSpec) IsLocal(accspeccpi.Context) bool
func (*AccessSpec) PackageUrl ¶ added in v0.10.0
func (a *AccessSpec) PackageUrl() string
PackageUrl returns the URL of the NPM package (Registry/Package).
func (*AccessSpec) PackageVersionUrl ¶ added in v0.11.0
func (a *AccessSpec) PackageVersionUrl() string
PackageVersionUrl returns the URL of the NPM package-version (Registry/Package/Version).
Click to show internal directories.
Click to hide internal directories.