utils

package
v0.0.12 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var UtilsSet = wire.NewSet(
	NewLogger, NewConfig,
)

Functions

func MakeDir added in v0.0.12

func MakeDir(fullPath string) error

Types

type Config added in v0.0.12

type Config struct {
	Mode             string `env:"MODE"`
	LogFileName      string `env:"LOG_FILE_NAME"`
	TenhouDBPath     string `env:"DB_PATH"`
	TenhouJsonDBPath string `env:"JSON_DB_PATH"`
	Listen           string `env:"LISTEN"`
}

func NewConfig added in v0.0.12

func NewConfig() (*Config, error)

type Logger added in v0.0.12

type Logger interface {
	Debugf(template string, args ...interface{})
	Debugw(template string, keysAndValues ...interface{})
	Infof(template string, args ...interface{})
	Infow(template string, keysAndValues ...interface{})
	Warnf(template string, args ...interface{})
	Warnw(template string, keysAndValues ...interface{})
	Errorf(template string, args ...interface{})
	Errorw(template string, keysAndValues ...interface{})
	Panicf(template string, args ...interface{})
	Panicw(template string, keysAndValues ...interface{})
}

func NewLogger added in v0.0.12

func NewLogger() Logger

Jump to

Keyboard shortcuts

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