Documentation ¶
Index ¶
- Constants
- func BuildAuth(jwtStr string) (header string, value string)
- func BytesToHex(data []byte, padding ...string) string
- func FormatTime(t time.Time) (s string)
- func GetAuth(ctx iris.Context) (auth string, ok bool)
- func GetRandomString(n int) (s string)
- func GetUUIDString() (s string)
- func Join(delimiter string, s ...string) string
- func NewInterval(ctx context.Context, duration time.Duration, exitOnErr bool, task func() error)
- func ResponseJSON(ctx iris.Context, j interface{})
- type Pk
- type TableChangeInfo
- type TableInfo
Constants ¶
View Source
const ( AuthHeader = "Authorization" Realm = "Bearer " )
View Source
const ( RespCodeSuccess = 200 RespCodeNotFound = 404 RespCodeError = 500 )
View Source
const ( RespMsgNotFount = "not found" RespMsgIdNum = "id must be a int value" )
View Source
const ( DefaultTimeFormatter = "2006-01-02 15:04:05" DateFormatter = "20060102" DatePlusFormatter = "2006-01-02" TimeFormatter = "150405" TimePlusFormatter = "15:04:05" )
Variables ¶
This section is empty.
Functions ¶
func BytesToHex ¶
BytesToHex 字节转换Hex字符串 padding[0]: 左填充 padding[1]:右填充(最后一个字节不填充)
func FormatTime ¶
func GetUUIDString ¶ added in v1.11.3
func GetUUIDString() (s string)
func NewInterval ¶ added in v1.10.11
func ResponseJSON ¶
func ResponseJSON(ctx iris.Context, j interface{})
Types ¶
type TableChangeInfo ¶
Click to show internal directories.
Click to hide internal directories.