Documentation
¶
Overview ¶
util
Index ¶
- Variables
- func Bool2Int(a bool) int64
- func CreateTempFile(data []byte) (*os.File, error)
- func Exists(path string) bool
- func GetUnixString() string
- func GetYMDStylePath() string
- func Md5hex(input string) string
- func NewRestyClient() *resty.Client
- func PostJSON(url string, data interface{}, header map[string]string) (res []byte, err error)
- func Retry(attempts int, fn func() error) error
- func Tnt2Bool(a int64) bool
- func WithTimeoutRoutine(td time.Duration, args interface{}, fc func(interface{}) (interface{}, error)) (interface{}, error)
- type ResponseStruct
Constants ¶
This section is empty.
Variables ¶
View Source
var Json = json.ConfigCompatibleWithStandardLibrary
Json
View Source
var Response = ResponseStruct{}
Response gloabl response fmt
View Source
var RestyClient = NewRestyClient()
RestyClient
Functions ¶
func NewRestyClient ¶
func NewRestyClient() *resty.Client
Types ¶
type ResponseStruct ¶
type ResponseStruct struct{}
ResponseStruct
func (ResponseStruct) ResponsFmt ¶
func (ResponseStruct) ResponsFmt(ctx *gin.Context, httpStatus int, code int, data gin.H, msg string)
ResponsFmt
@receiver ResponseStruct @param ctx @param httpStatus @param code @param data @param msg
Click to show internal directories.
Click to hide internal directories.