internal

package
v0.0.0-...-be3f9aa Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EnvAppEnv          = "APP_ENV"
	EnvAppPort         = "APP_PORT"
	EnvGrpcPort        = "GRPC_PORT"
	EnvLogLevel        = "LOG_LEVEL"
	EnvAPIKey          = "API_KEY"
	EnvAPISecret       = "API_SECRET"
	EnvServiceCertFile = "SERVICE_CERT_FILE"
	EnvServiceKeyFile  = "SERVICE_KEY_FILE"

	EnvPostgresDSN     = "POSTGRES_DSN"
	EnvPostgresHost    = "POSTGRES_HOST"
	EnvPostgresPort    = "POSTGRES_PORT"
	EnvPostgresUser    = "POSTGRES_USER"
	EnvPostgresPass    = "POSTGRES_PASSWORD"
	EnvPostgresDB      = "POSTGRES_DB"
	EnvPostgresSSLMode = "POSTGRES_SSLMODE"
)

Variables

View Source
var (
	ErrNotImplemented = knownErr("not implemented")
	ErrBadRequest     = knownErr("bad request")
	ErrInternal       = knownErr("internal error")
	ErrEntityInvalid  = knownErr("entity state invalid")
	ErrEntityNotFound = knownErr("entity not found")
)

Functions

func IsKnownErr

func IsKnownErr(err error) bool

func JSONString

func JSONString(t testing.TB, v any) string

func MakeErr

func MakeErr(errType error, msg string) error

func PrintData

func PrintData(label string, v interface{})

func SPrintData

func SPrintData(label string, v interface{}) string

func TLogJson

func TLogJson(t testing.TB, label string, v any)

Types

type Errors

type Errors []error

func NewErrors

func NewErrors(errorList ...error) Errors

func (Errors) Append

func (e Errors) Append(errorList ...error) Errors

func (Errors) Error

func (e Errors) Error() string

func (Errors) ErrorOrNil

func (e Errors) ErrorOrNil() error

func (Errors) Is

func (e Errors) Is(target error) bool

Directories

Path Synopsis
db
lib
log
mig

Jump to

Keyboard shortcuts

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