Documentation ¶
Overview ¶
mirrors package brings up a verdaccio mirror for each supported project.
Index ¶
- func GetTarballsInMirrorStorage(verdaccioStorageDir string) (map[string]interface{}, error)
- func NewVerdaccioMirror(projectName, workDir, host string, cfgTmpl *template.Template) (types.ProjectMirror, error)
- type VerdaccioMirror
- func (m *VerdaccioMirror) AddToDownloadedPackageTarballs(packageTarballName string)
- func (m *VerdaccioMirror) GetDownloadedPackageNames() ([]string, error)
- func (m *VerdaccioMirror) GetProjectName() string
- func (m *VerdaccioMirror) IsPackageTarballDownloaded(packageTarballName string) bool
- func (m *VerdaccioMirror) StartMirror(ctx context.Context, port int) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetTarballsInMirrorStorage ¶
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.