Documentation ¶
Index ¶
- func Dump(v interface{})
- func ExtractReqBody(r *http.Request, i interface{}) error
- func Fdump(w io.Writer, v interface{})
- func InitLogger(level string)
- func JsonBytesToInterface(b []byte) (map[string]interface{}, error)
- func JsonBytesToType(b []byte, v interface{}) error
- func JsonFileToInterface(path string) (map[string]interface{}, error)
- func JsonFileToType(path string, v interface{}) error
- func JsonStringToInterface(s string) (map[string]interface{}, error)
- func JsonStringToType(s string, v interface{}) error
- func Log(s string)
- func PrintError(err error)
- func ReadFileBytes(path string) ([]byte, error)
- func ReadFileString(path string) (string, error)
- func SendResError(w http.ResponseWriter, reason string) error
- func SendResOk(w http.ResponseWriter) error
- func StructToMap(v interface{}) (map[string]interface{}, error)
- func ToJsonBytes(v interface{}) ([]byte, error)
- func ToJsonBytesIndent(v interface{}) ([]byte, error)
- func ToJsonString(v interface{}) (string, error)
- func ToJsonStringIndent(v interface{}) (string, error)
- func Warn(s string)
- type LogType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExtractReqBody ¶
ExtractReqBody extracts the body from the request and parse it, max body size 10000bytes
func InitLogger ¶
func InitLogger(level string)
func JsonBytesToInterface ¶
func JsonBytesToType ¶
func JsonFileToInterface ¶
func JsonFileToType ¶
func JsonStringToInterface ¶
func JsonStringToType ¶
func PrintError ¶
func PrintError(err error)
func ReadFileBytes ¶
func ReadFileString ¶
func SendResError ¶
func SendResError(w http.ResponseWriter, reason string) error
func SendResOk ¶
func SendResOk(w http.ResponseWriter) error
func StructToMap ¶
StructToMap uses the tag structs
func ToJsonBytes ¶
func ToJsonBytesIndent ¶
func ToJsonString ¶
func ToJsonStringIndent ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.