Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrInvalidParam = ErrorRegistry(). AddErrorCode(4000). AddHttpStatus(http.StatusBadRequest). NewError("invalid parameter") ErrExists = ErrorRegistry(). AddErrorCode(4001). AddHttpStatus(http.StatusConflict). NewError("resource already existed") ErrNotExists = ErrorRegistry(). AddErrorCode(4002). AddHttpStatus(http.StatusNotFound). NewError("resource does not exist") ErrInvalidHttpMethod = ErrorRegistry(). AddErrorCode(4003). AddHttpStatus(http.StatusMethodNotAllowed). WrapError("invalid http method", fiber.ErrMethodNotAllowed) ErrSystem = ErrorRegistry(). AddErrorCode(5000). AddHttpStatus(http.StatusInternalServerError). NewError("system issue") ErrDatabase = ErrorRegistry(). AddErrorCode(5001). AddHttpStatus(http.StatusInternalServerError). NewError("database issue") )
View Source
var ( ErrInvalidUsername = ErrorRegistry(). AddErrorCode(6000). WrapError("username must be having a upper letter", ErrInvalidParam) )
Functions ¶
func ErrorRegistry ¶
func ErrorRegistry() *utility.ErrorRegistry
Types ¶
type Config ¶
type Config struct {
NodeId_ string `yaml:"NodeId"`
Hack utility.Hack `yaml:"Hack"`
ShowErrCode bool `yaml:"ShowErrCode"`
Filepath Filepath `yaml:"Filepath"`
Http Http `yaml:"Http"`
MySql MySql `yaml:"MySql"`
Redis Redis `yaml:"Redis"`
O11Y utility.O11YConfig `yaml:"O11Y"`
Logger wlog.Config `yaml:"Logger"`
}
func MustLoadConfig ¶
func MustLoadConfig() *Config
type MySql ¶
Directories
¶
| Path | Synopsis |
|---|---|
|
Package app is a generated GoMock package.
|
Package app is a generated GoMock package. |
|
dataflow
ref1: https://github.com/KScaesar/art?tab=readme-ov-file#example
|
ref1: https://github.com/KScaesar/art?tab=readme-ov-file#example |
|
wfiber
wfiber is a wrapped fiber
|
wfiber is a wrapped fiber |
|
wgin
wgin is a wrapped gin
|
wgin is a wrapped gin |
|
wlog
wlog is a wrapped logger
|
wlog is a wrapped logger |
Click to show internal directories.
Click to hide internal directories.