registry

package
v1.0.7 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2019 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ComposerPackage

type ComposerPackage struct {
	Packages     map[string]map[string]composerVersion `json:"packages"`
	PackagesLock *sync.RWMutex                         `json:"-"`
}

type ComposerRegistry

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

func NewComposerRegistry

func NewComposerRegistry(conn *client.GitLabConnection) *ComposerRegistry

NewComposerRegistry - construct composer emulator for GitLab

func (*ComposerRegistry) GetPackageArchive

func (c *ComposerRegistry) GetPackageArchive(uuid string, ref string) ([]byte, error)

GetPackageArchive - get package as archive

func (*ComposerRegistry) GetPackageInfo

func (c *ComposerRegistry) GetPackageInfo(uuid string, endpoint string) (*ComposerPackage, error)

GetPackageInfo - get single package info, debug method.

func (*ComposerRegistry) GetPackageInfoList

func (c *ComposerRegistry) GetPackageInfoList(endpoint string) (*ComposerPackage, error)

GetPackageInfoList - get whole list of packages visible for current token

type NpmPackage

type NpmPackage struct {
	Name        string                `json:"name"`
	Description string                `json:"description"`
	DistTags    map[string]string     `json:"dist-tags"`
	License     string                `json:"license"` // should always be "proprietary"
	Private     bool                  `json:"private"` // should always be true
	Versions    map[string]npmVersion `json:"versions"`
}

type NpmRegistry

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

func NewNpmRegistry

func NewNpmRegistry(conn *client.GitLabConnection) *NpmRegistry

func (*NpmRegistry) GetPackageArchive

func (c *NpmRegistry) GetPackageArchive(uuid string, ref string) ([]byte, error)

This method should always serve packages from cache

func (*NpmRegistry) GetPackageInfo

func (c *NpmRegistry) GetPackageInfo(name string, endpoint string) (*NpmPackage, error)

find project by name in package.json in each master branch of package repository download project archive, calculate sha1 hash and put it to LRU-cache generate final NpmPackage structure

Jump to

Keyboard shortcuts

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