common

package
v0.3.84-rc110 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AwsPrefixEnv       = "AWS_PREFIX"
	GCloudProjectIdEnv = "PROJECT_ID"
	GCloudLocationEnv  = "LOCATION"
	GCloudZoneEnv      = "ZONE"
)

Variables

View Source
var Logger = prodLogger

Functions

func ChooseLogger

func ChooseLogger(loggingLvl LoggingLevel)

func PrintError

func PrintError(err error)

func PrintVersion

func PrintVersion()

func PrintWarning

func PrintWarning(message string)

Types

type AWS

type AWS struct {
	RoleArn string
}

type Command

type Command int
const (
	RunCommand Command = iota
	BootstrapCommand
	MergeCommand
	DeleteCommand
)

type DeleteFlags

type DeleteFlags struct {
	DeleteBucket     bool
	SkipConfirmation bool
}

type Flags

type Flags struct {
	LoggingLevel  string
	Config        string
	BaseConfig    string
	Branch        string
	AWSPrefix     string
	AllowParallel bool
	GCloud        GCloud
	AWS           AWS
	Delete        DeleteFlags
}

func (*Flags) Setup

func (f *Flags) Setup(cmd Command) error

type GCloud

type GCloud struct {
	ProjectId string
	Location  string
	Zone      string
}

type LoggingLevel

type LoggingLevel int
const (
	DevLoggingLvl LoggingLevel = iota
	ProdLoggingLvl
)

func ConvStrToLoggingLvl

func ConvStrToLoggingLvl(str string) LoggingLevel

type PrefixedError

type PrefixedError struct {
	Reason error
}

func (*PrefixedError) Error

func (pe *PrefixedError) Error() string

type Version

type Version struct {
	Version   string
	BuildDate string
	GitCommit string
	GitTag    string
	GoVersion string
	Compiler  string
	Platform  string
}

Version contains agent version information

func (Version) String

func (v Version) String() string

type Warning

type Warning struct {
	Reason error
}

func (*Warning) Error

func (w *Warning) Error() string

Jump to

Keyboard shortcuts

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