config

package
v0.0.0-...-acf58c8 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2021 License: Apache-2.0 Imports: 8 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CurrentTimestamp

func CurrentTimestamp() int64

func DecodeB64

func DecodeB64(in string) ([]byte, error)

func DedupSlice

func DedupSlice(stringSlice []string) []string

func GenRandomByteSlice

func GenRandomByteSlice(length int) ([]byte, error)

func MarshalPretty

func MarshalPretty(any interface{}) ([]byte, error)

func MarshalYAML

func MarshalYAML(any interface{}) ([]byte, error)

func NewID

func NewID() string

func TsToUnixUTC

func TsToUnixUTC(in *timestamppb.Timestamp) int64

func UnixToUtcTS

func UnixToUtcTS(in int64) *timestamppb.Timestamp

helper func to convert unix timestamp (seconds) to timestamppb.Timestamp

func UnmarshalJson

func UnmarshalJson(data []byte, any interface{}) error

func UnmarshalYAML

func UnmarshalYAML(data []byte, any interface{}) error

Types

type Configurator

type Configurator interface {
	Validate() error
}

TODO @gutterbacon: use this as abstraction for per module configs.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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