commons

package
v0.12.1 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2021 License: MPL-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecodeHCLFromTemplate

func DecodeHCLFromTemplate(templateReader io.Reader, variables interface{}) (map[string]interface{}, error)

func GetVersionPathOrSlotPathForApp

func GetVersionPathOrSlotPathForApp(appPath, slotSuffix, versionSuffix string) (string, error)

func InferSlotIdFromVersionId

func InferSlotIdFromVersionId(slotId, version string) string

func IsIgnored

func IsIgnored(filePath string, staticFilePaths []string) bool

func ProcessTemplates

func ProcessTemplates(path, fileSuffix string, vars interface{}) ([]string, error)

func ProcessTemplatesAndDelete

func ProcessTemplatesAndDelete(path, fileSuffix string, vars interface{}) ([]string, error)

Types

type BoolFlag

type BoolFlag struct {
	cli.StringFlag
	Validator Validator
}

func (BoolFlag) Validate

func (f BoolFlag) Validate(c *Context) error

type Context

type Context struct {
	CliContext *cli.Context
	// contains filtered or unexported fields
}

func NewContext

func NewContext(cliContext *cli.Context) *Context

func (*Context) Bool

func (c *Context) Bool(name string) bool

func (*Context) BoolT

func (c *Context) BoolT(name string) bool

func (*Context) Duration

func (c *Context) Duration(name string) time.Duration

func (*Context) Float64

func (c *Context) Float64(name string) float64

func (*Context) Generic

func (c *Context) Generic(name string) interface{}

func (*Context) GlobalBool

func (c *Context) GlobalBool(name string) bool

func (*Context) GlobalDuration

func (c *Context) GlobalDuration(name string) time.Duration

func (*Context) GlobalGeneric

func (c *Context) GlobalGeneric(name string) interface{}

func (*Context) GlobalInt

func (c *Context) GlobalInt(name string) int

func (*Context) GlobalIntSlice

func (c *Context) GlobalIntSlice(name string) []int

func (*Context) GlobalString

func (c *Context) GlobalString(name string) string

func (*Context) GlobalStringSlice

func (c *Context) GlobalStringSlice(name string) []string

func (*Context) Int

func (c *Context) Int(name string) int

func (*Context) IntSlice

func (c *Context) IntSlice(name string) []int

func (*Context) String

func (c *Context) String(name string) string

func (*Context) StringSlice

func (c *Context) StringSlice(name string) []string

type Float64Flag

type Float64Flag struct {
	cli.Float64Flag
	Validator Validator
}

func (Float64Flag) Validate

func (f Float64Flag) Validate(c *Context) error

type StringFlag

type StringFlag struct {
	cli.StringFlag
	Validator Validator
}

func (StringFlag) Validate

func (f StringFlag) Validate(c *Context) error

type ValidatedFlag

type ValidatedFlag interface {
	cli.Flag
	Validate(c *Context) error
}

type Validator

type Validator func(name string, c interface{}) error

Jump to

Keyboard shortcuts

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