Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
CanceledError = errors.New("ctx has canceled")
)
View Source
var (
GlobalLogger *zap.SugaredLogger
)
View Source
var (
ProjectName = "gargantua"
)
ProjectName todo: change some into const
Functions ¶
func LoggerInjectTrigger ¶
func LoggerInjectTrigger(_ *zap.SugaredLogger)
LoggerInjectTrigger make dig framework initiate logger immediately
func NewLogger ¶
func NewLogger(pConfig *ProjectConfig) *zap.SugaredLogger
func SetConfigPath ¶
func SetConfigPath(path string)
Types ¶
type GrpcConfig ¶
type ProjectConfig ¶
type ProjectConfig struct { Log LogConfig `yaml:"log"` Grpc GrpcConfig `yaml:"grpc"` Rest RestConfig `yaml:"rest"` }
func NewConfig ¶
func NewConfig() (*ProjectConfig, error)
type RestConfig ¶
Click to show internal directories.
Click to hide internal directories.