Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckConfig ¶
func CheckConfig(conf *ErrCodeConfig)
func ParseModuleConfig ¶
func ParseModuleConfig() error
func PatchConfig ¶
func PatchConfig(conf *ErrCodeConfig)
func PatchModules ¶
func PatchModules(modules []ErrCodeModuleConfig)
Types ¶
type ErrCodeCommonConfig ¶
type ErrCodeCommonConfig struct { PkgName string `json:"pkg_name"` ClientCodePrefix string `json:"client_code_prefix"` ServerCodePrefix string `json:"server_code_prefix"` AppCode string `json:"app_code"` NewErrorFuncPkg string `json:"new_error_func_pkg"` // pkg like fmt or errors NewErrorFunc string `json:"new_error_func"` // func like `New` from errors or `Errorf` from fmt }
type ErrCodeConfig ¶
type ErrCodeConfig struct { ErrCodeCommonConfig Modules []ErrCodeModuleConfig `json:"modules"` }
func GetConfig ¶
func GetConfig() *ErrCodeConfig
type ErrCodeModuleConfig ¶
type ErrCodeModuleConfig struct { ModuleName string `json:"module_name"` ModuleCode string `json:"module_code"` ClientCodes []ErrCodeVariableConfig `json:"client_codes"` ServerCodes []ErrCodeVariableConfig `json:"server_codes"` }
type ErrCodeVariableConfig ¶
Click to show internal directories.
Click to hide internal directories.