utils

package
v0.0.0-...-10dff14 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ServerPort              = 2000
	ServerWriteTimeout      = 15
	ServerReadTimeout       = 15
	GrpcServerPort          = 6000
	CorrelationIdHeaderName = "X-Internal-Correlation-ID"
	NoCorrelationId         = "global"
	LoggerFileName          = "default.log"
	LoggerLevel             = "debug"
	DefaultContentType      = "application/json"

	ConfigFileName      = "config"
	SecretFileName      = "secrets"
	ConfigFileExtension = "yaml"
	SecretFileExtension = "toml"
)

Variables

View Source
var (
	ConfigFilePaths = [4]string{"./config", "$HOME/.imposters", ".", "$HOME/.creds"}
)

Functions

func GenerateCorrelationId

func GenerateCorrelationId() string

func IntToSeconds

func IntToSeconds(number int) time.Duration

func JsonObjectToObject

func JsonObjectToObject(raw []byte, dest interface{}, cid string) error

func ObjectToJsonObject

func ObjectToJsonObject(raw interface{}, cid string) ([]byte, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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