infra

package
v0.0.0-...-a56e4fe Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2022 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CustomPanicHandler

func CustomPanicHandler(ctx context.Context, p interface{}) (err error)

CustomPanicHandler Define how to handle panic

func NewExampleError

func NewExampleError() *customError

NewExampleError Example error

func UnaryZerologInterceptor

func UnaryZerologInterceptor(cfg *Config) grpc.UnaryServerInterceptor

UnaryZerologInterceptor Interceps each request and setup requestId

Types

type Config

type Config struct {
	APP  appConfig  `mapstructure:",squash"`
	GRPC grpcConfig `mapstructure:",squash"`
}

Config The configuration struc has all the configurations needed by the appConfig

func NewConfig

func NewConfig() (*Config, error)

NewConfig Creates a new config struct with current env var values

Directories

Path Synopsis
api

Jump to

Keyboard shortcuts

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