cli

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LocalCacheOptions

type LocalCacheOptions struct {
	Dir string `env:"NPMI_LOCAL_DIR"`
}

LocalCacheOptions constains configuration for Local Cache

type MinioCacheOptions

type MinioCacheOptions struct {
	Endpoint        string `env:"NPMI_MINIO_ENDPOINT"`
	AccessKeyID     string `env:"NPMI_MINIO_ACCESS_KEY_ID"`
	SecretAccessKey string `env:"NPMI_MINIO_SECRET_ACCESS_KEY"`
	Bucket          string `env:"NPMI_MINIO_BUCKET"`
	UseTLS          bool   `env:"NPMI_MINIO_TLS"`
}

MinioCacheOptions contains configuration for Minio Cache

type Options

type Options struct {
	Verbose       bool `env:"NPMI_VERBOSE"`
	Force         bool `env:"NPMI_FORCE"`
	UseLocalCache bool `env:"NPMI_LOCAL"`
	UseMinioCache bool `env:"NPMI_MINIO"`
	MinioCache    *MinioCacheOptions
	LocalCache    *LocalCacheOptions
	PrecacheCmd   string `env:"NPMI_PRECACHE"`
}

Options describes the runtime configuration

func ParseFlags

func ParseFlags() (*Options, error)

ParseFlags parses command line flags

Jump to

Keyboard shortcuts

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