Documentation ¶
Index ¶
- Constants
- func BoolToString(value bool) string
- func CheckError(err error)
- func DeSerialize(data []byte) any
- func Float64ToString(value float64) string
- func GenerateRandomToken(x int) string
- func GenerateRandomTokenPlus(x int, c string) string
- func GetEnv(key string) string
- func GetTimeFromUnixTime(i int64) time.Time
- func Hash(data string) string
- func Hmac256Signature(secret, data string) string
- func Int32ToString(value int32) string
- func Int64ToString(value int64) string
- func NewFromFiber(a any, c *fiber.Ctx) int
- func Recast(a, b any) error
- func Serialize(s any) []byte
- func ServerErrorHandler(ctx *fiber.Ctx, err error) error
- func SetNoCacheControl(c *fiber.Ctx)
- func SlugToKeyword(slug string) string
- func StringToBool(value string) bool
- func StringToFloat64(value string) float64
- func StringToInt32(value string) int32
- func StringToInt64(value string) int64
Constants ¶
View Source
const ( FIBER_SERVER = "fiber_server" FIBER_CACHE = "fiber_cache" FIBER_STORAGE = "fiber_storage" SESSIONS = "sessions" CACHE_CONTROL = "Cache-Control" NO_CACHE = "no-cache" UA = "USER-AGENT" PLATFORM = "Sec-CH-UA-Platform" X_RECV_WINDOW = "X-RECV-WINDOW" X_KAPI_SIGN = "X-KAPI-SIGN" X_TIMESTAMP = "X-TIMESTAMP" X_AUTH_EXPIRE = "X-AUTH-EXPIRE" X_AUTH_USER = "X-AUTH-USER" //username X_AUTH_KEY = "X-AUTH-KEY" X_USER_SESSION = "x_user_session" WEEK_IN_MILLI = int64(604800000) METHOD_GET = "GET" METHOD_POST = "POST" DEV_ENV = true )
Variables ¶
This section is empty.
Functions ¶
func BoolToString ¶
func CheckError ¶
func CheckError(err error)
func DeSerialize ¶
func Float64ToString ¶
func GenerateRandomToken ¶
func GenerateRandomTokenPlus ¶
func GetTimeFromUnixTime ¶
func Hmac256Signature ¶
sign data with secrect key
func Int32ToString ¶
func Int64ToString ¶
func NewFromFiber ¶
func ServerErrorHandler ¶
func SetNoCacheControl ¶
func SetNoCacheControl(c *fiber.Ctx)
func SlugToKeyword ¶
func StringToBool ¶
func StringToFloat64 ¶
func StringToInt32 ¶
func StringToInt64 ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.