Versions in this module Expand all Collapse all v1 v1.0.0 Feb 2, 2021 Changes in this version + const LogKey + const XForwardedFor + const XRealIP + var Errno = map[uint32]string + var SystemErr = Err(400) + func Err(code uint32) (err error) + func GenValidateCode(width int) string + func GetAddressByIP(ipA string) string + func GetLock(redisConn *redis.Client, lockName string, ...) (string, error) + func GetRandomString(l int) string + func GetRandomString6(n uint64) []byte + func Md5(key ...string) string + func ReleaseLock(redisConn *redis.Client, lockName, code string) bool + func RemoteIp(req *http.Request) string + type HeaderParam struct + AppID string + AppName string + RequestID string + type Resp struct + func (res *Resp) Fail(c *gin.Context, err error) + func (res *Resp) Suc(c *gin.Context, data interface{}, msg ...string) + type RspError struct + Code uint32 + Msg string + func (re *RspError) Error() string + func (re *RspError) Render() (code uint32, msg string) + type Time struct + func NewTime(t time.Time, valid bool) Time + func TimeFrom(t time.Time) Time + func TimeFromPtr(t *time.Time) Time + func (t *Time) SetValid(v time.Time) + func (t *Time) UnmarshalJSON(data []byte) error + func (t *Time) UnmarshalText(text []byte) error + func (t Time) Equal(other Time) bool + func (t Time) ExactEqual(other Time) bool + func (t Time) IsZero() bool + func (t Time) MarshalJSON() ([]byte, error) + func (t Time) MarshalText() ([]byte, error) + func (t Time) Ptr() *time.Time + func (t Time) Value() (driver.Value, error) + func (t Time) ValueOrZero() time.Time