mirrors

package
v0.0.0-...-5ddb564 Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2024 License: BSD-3-Clause Imports: 12 Imported by: 0

Documentation

Overview

mirrors package brings up a verdaccio mirror for each supported project.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetTarballsInMirrorStorage

func GetTarballsInMirrorStorage(verdaccioStorageDir string) (map[string]interface{}, error)

GetTarballsInMirrorStorage returns a map of the packages (including their versions) that are available locally on the mirror. These are the packages that the mirror does not have to hit the public NPM registry for.

func NewVerdaccioMirror

func NewVerdaccioMirror(projectName, workDir, host string, cfgTmpl *template.Template) (types.ProjectMirror, error)

NewVerdaccioMirror returns an instance of VerdaccioMirror.

Types

type VerdaccioMirror

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

VerdaccioMirror implements types.ProjectMirror.

func (*VerdaccioMirror) AddToDownloadedPackageTarballs

func (m *VerdaccioMirror) AddToDownloadedPackageTarballs(packageTarballName string)

AddToDownloadedPackageTarballs implements the types.ProjectMirror interface.

func (*VerdaccioMirror) GetDownloadedPackageNames

func (m *VerdaccioMirror) GetDownloadedPackageNames() ([]string, error)

GetDownloadedPackageNames implements the types.ProjectMirror interface.

func (*VerdaccioMirror) GetProjectName

func (m *VerdaccioMirror) GetProjectName() string

GetProjectName implements the types.ProjectMirror interface.

func (*VerdaccioMirror) IsPackageTarballDownloaded

func (m *VerdaccioMirror) IsPackageTarballDownloaded(packageTarballName string) bool

IsPackageTarballDownloaded implements the types.ProjectMirror interface.

func (*VerdaccioMirror) StartMirror

func (m *VerdaccioMirror) StartMirror(ctx context.Context, port int) error

StartMirror implements the types.ProjectMirror interface.

Jump to

Keyboard shortcuts

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