npm

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2024 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

View Source
const BLOB_HANDLER_NAME = "ocm/npmPackage"

Variables

This section is empty.

Functions

func NewArtifactHandler

func NewArtifactHandler(repospec *Config) cpi.BlobHandler

Types

type Attachment

type Attachment struct {
	ContentType string `json:"content_type"`
	Data        []byte `json:"data"`
	Length      int    `json:"length"`
}

func NewAttachment

func NewAttachment(data []byte) *Attachment

type Body

type Body struct {
	ID          string `json:"_id"`
	Name        string `json:"name"`
	Description string `json:"description"`
	DistTags    struct {
		Latest string `json:"latest"`
	} `json:"dist-tags"`
	Versions    map[string]*Package    `json:"versions"`
	Readme      string                 `json:"readme"`
	Attachments map[string]*Attachment `json:"_attachments"`
}

type Config

type Config struct {
	Url string `json:"url"`
}

func (*Config) UnmarshalJSON

func (c *Config) UnmarshalJSON(data []byte) error

type Package

type Package struct {
	Name        string `json:"name"`
	Version     string `json:"version"`
	Readme      string `json:"readme"`
	Description string `json:"description"`
	Dist        struct {
		Integrity string `json:"integrity"`
		Shasum    string `json:"shasum"`
		Tarball   string `json:"tarball"`
	} `json:"dist"`
}

type RegistrationHandler

type RegistrationHandler struct{}

func (*RegistrationHandler) GetHandlers

func (*RegistrationHandler) RegisterByName

func (r *RegistrationHandler) RegisterByName(handler string, ctx cpi.Context, config cpi.BlobHandlerConfig, olist ...cpi.BlobHandlerOption) (bool, error)

Jump to

Keyboard shortcuts

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