tea

package
v0.0.5 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EnvGetIntOr added in v0.0.5

func EnvGetIntOr(key string, fallback int) int

EnvGetIntOr returns env value if present otherwise returns fallback value.

func EnvGetOr added in v0.0.5

func EnvGetOr(key string, fallback string) string

EnvGetOr returns env value if present otherwise returns fallback value.

func ErrCoalesce

func ErrCoalesce(errs ...error) error

func MustJson

func MustJson(o interface{}) []byte

func SysCallWait added in v0.0.5

func SysCallWait(signals ...os.Signal)

SysCallWait waits for syscalls (INT, TERM, ...)

func SysCallWaitDefault added in v0.0.5

func SysCallWaitDefault()

SysCallWaitDefault waits for INT and TERM signals.

func TplRender

func TplRender(writer io.Writer, bytes []byte, data interface{}) error

Types

type Consul added in v0.0.5

type Consul struct {
	// contains filtered or unexported fields
}

func NewConsul added in v0.0.5

func NewConsul() (*Consul, error)

func (*Consul) Deregister added in v0.0.5

func (c *Consul) Deregister(id string) error

func (*Consul) KV added in v0.0.5

func (c *Consul) KV() *consulapi.KV

func (*Consul) Register added in v0.0.5

func (c *Consul) Register(id string, port int, tags []string, meta map[string]string) error

type EqArgs

type EqArgs struct {
	Raw    map[string]string
	Errors []error
	// contains filtered or unexported fields
}

func ParseEqArgs

func ParseEqArgs(args []string) *EqArgs

func (*EqArgs) ErrorMessages added in v0.0.5

func (a *EqArgs) ErrorMessages() string

func (*EqArgs) GetBoolDefault

func (a *EqArgs) GetBoolDefault(key string, defaultValue bool) bool

func (*EqArgs) GetString

func (a *EqArgs) GetString(key string) string

func (*EqArgs) GetStrings

func (a *EqArgs) GetStrings(key string, sep string) []string

func (*EqArgs) Valid added in v0.0.5

func (a *EqArgs) Valid() bool

func (*EqArgs) ValidateInclusion added in v0.0.5

func (a *EqArgs) ValidateInclusion(key string, values []string)

func (*EqArgs) ValidatePresence added in v0.0.5

func (a *EqArgs) ValidatePresence(keys ...string)

type EqArgsInclusionValidator added in v0.0.5

type EqArgsInclusionValidator struct {
	// contains filtered or unexported fields
}

func (*EqArgsInclusionValidator) Valid added in v0.0.5

func (v *EqArgsInclusionValidator) Valid() bool

type EqArgsPresenceValidator added in v0.0.5

type EqArgsPresenceValidator struct {
	// contains filtered or unexported fields
}

func (*EqArgsPresenceValidator) Valid added in v0.0.5

func (v *EqArgsPresenceValidator) Valid() bool

type EqArgsValidator added in v0.0.5

type EqArgsValidator interface {
	Valid() bool
}

type HttpReq

type HttpReq struct {
	Err  error
	Resp *req.Resp
}

func HttpDelete

func HttpDelete(ctx context.Context, url string, args ...interface{}) *HttpReq

func HttpGet

func HttpGet(ctx context.Context, url string, args ...interface{}) *HttpReq

func HttpPost

func HttpPost(ctx context.Context, url string, args ...interface{}) *HttpReq

func (*HttpReq) ToJSON

func (r *HttpReq) ToJSON(o interface{}) *HttpReq

func (*HttpReq) ToYAML

func (r *HttpReq) ToYAML(o interface{}) *HttpReq

type Vault added in v0.0.5

type Vault struct {
	// contains filtered or unexported fields
}

func NewVault added in v0.0.5

func NewVault() (*Vault, error)

Jump to

Keyboard shortcuts

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