command

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2020 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SampleConfigFileName = "db2ctl-sample.yaml"
	ConfigFileName       = "db2ctl.yaml"
)

constants needed

Variables

This section is empty.

Functions

func GetAllDirsInsideTmpl

func GetAllDirsInsideTmpl() ([]string, error)

GetAllDirsInsideTmpl gets all directories inside template folder

func Log

func Log(file string, msg string)

Log file to display part size and elapsed time

Types

type Instance

type Instance struct {
	CombinedConfig *config.Combined
	Error          error
	Flags          *pflag.FlagSet
	StartTime      time.Time
	ConfigDir      string
	bash.Instance
	S3ConfigInstance *config.S3ConfigStruct
}

Instance is the main struct for command configs

func New

func New(flags *pflag.FlagSet) *Instance

New creates a new instance for command execution

func (*Instance) CreateFromConfig

func (i *Instance) CreateFromConfig(confFile string) *Instance

CreateFromConfig creates yaml config

func (*Instance) CreateSampleConfigFile

func (i *Instance) CreateSampleConfigFile() *Instance

CreateSampleConfigFile creates sample config file

func (*Instance) DeleteStateForDir

func (i *Instance) DeleteStateForDir(directory string) *Instance

DeleteStateForDir deletes state for given dir

func (*Instance) DownloadFromS3

func (i *Instance) DownloadFromS3() *Instance

DownloadFromS3 downloads file from the IBM S3 Storage

func (*Instance) GenerateBinPackingCSV

func (i *Instance) GenerateBinPackingCSV() *Instance

GenerateBinPackingCSV generates bin packing csv

func (*Instance) GenerateConfigFilesFromDir

func (i *Instance) GenerateConfigFilesFromDir(dirToGenerateFrom string) *Instance

GenerateConfigFilesFromDir generates all config files

func (*Instance) GenerateMappingFile

func (i *Instance) GenerateMappingFile() *Instance

GenerateMappingFile generates mapping file

func (*Instance) ParseS3Config

func (i *Instance) ParseS3Config(confFile string) *Instance

ParseS3Config parse S3 Config file

func (*Instance) ParseYaml

func (i *Instance) ParseYaml(confFile string) *Instance

ParseYaml parses yaml and puts configuration into config struct

func (*Instance) PrintStateForDir

func (i *Instance) PrintStateForDir(directory string) *Instance

PrintStateForDir prints state for given dir

func (*Instance) ReadBinPackingCSV

func (i *Instance) ReadBinPackingCSV() *Instance

ReadBinPackingCSV reads binpacking csv

func (*Instance) ReadMappingCSV

func (i *Instance) ReadMappingCSV() *Instance

ReadMappingCSV reads mapping csv file

func (*Instance) ReturnStateForDir

func (i *Instance) ReturnStateForDir(directory string) *Instance

ReturnStateForDir prints state for given dir

func (*Instance) RunBashScripts

func (i *Instance) RunBashScripts() *Instance

RunBashScripts runs all bash scripts in a directory

func (*Instance) SetAutoYesEnabled

func (i *Instance) SetAutoYesEnabled(autoYesEnabled bool) *Instance

SetAutoYesEnabled is a setter for autoYesEnabled field

func (*Instance) SetRunOnLocal

func (i *Instance) SetRunOnLocal(runOnLocal bool) *Instance

SetRunOnLocal is a setter for runOnLocal field

func (*Instance) StopRunningCommand

func (i *Instance) StopRunningCommand() *Instance

StopRunningCommand stops currently running command

func (*Instance) TimeTaken

func (i *Instance) TimeTaken() *Instance

TimeTaken prints time taken for execution

func (*Instance) UploadToS3

func (i *Instance) UploadToS3() *Instance

UploadToS3 uploads file to the IBM S3 Storage

Jump to

Keyboard shortcuts

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