Documentation
¶
Index ¶
- Constants
- func AssignOrDefault(value string, defaultValue string) string
- func Bytes2Size(num int64) string
- func CalcElapsedTime(start time.Time) int64
- func Float64PtrMax(p *float64, maxValue float64) *float64
- func Float64PtrMin(p *float64, minValue float64) *float64
- func GenRequestID() string
- func GetIp() (ip string)
- func GetRequestID(ctx context.Context) string
- func GetResponseID(c *gin.Context) string
- func GetTimeString() string
- func GetTimestamp() int64
- func IntMax(a int, b int) int
- func Interface2String(inter interface{}) string
- func Max(a int, b int) int
- func MessageWithRequestId(message string, id string) string
- func OpenBrowser(url string)
- func Password2Hash(password string) (string, error)
- func SetRequestID(ctx context.Context, id string) context.Context
- func String2Int(str string) int
- func UnescapeHTML(x string) interface{}
- func ValidatePasswordAndHash(password string, hash string) bool
Constants ¶
View Source
const (
RequestIdKey = "X-Oneapi-Request-Id"
)
Variables ¶
This section is empty.
Functions ¶
func AssignOrDefault ¶
func Bytes2Size ¶
func CalcElapsedTime ¶
CalcElapsedTime return the elapsed time in milliseconds (ms)
func Float64PtrMax ¶
func Float64PtrMin ¶
func GenRequestID ¶
func GenRequestID() string
func GetRequestID ¶
func GetResponseID ¶
func GetTimeString ¶
func GetTimeString() string
func GetTimestamp ¶
func GetTimestamp() int64
func Interface2String ¶
func Interface2String(inter interface{}) string
func MessageWithRequestId ¶
func OpenBrowser ¶
func OpenBrowser(url string)
func Password2Hash ¶
func String2Int ¶
func UnescapeHTML ¶
func UnescapeHTML(x string) interface{}
func ValidatePasswordAndHash ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.