Version: v0.0.0-...-2b5e5cc Latest Latest

This package is not in the latest version of its module.

Go to latest
Published: Nov 24, 2020 License: Apache-2.0 Imports: 17 Imported by: 0




This section is empty.


This section is empty.


func BadRequest

func BadRequest(ctx *gin.Context, err error)

func CalcTimeRange

func CalcTimeRange(fromDate string, toDate string) int64

func CheckHash

func CheckHash(hash string, secret string) error

func ConvertInterfaceToIntMap

func ConvertInterfaceToIntMap(i []interface{}) []int

func ConvertToString

func ConvertToString(any interface{}) string

func CreateHash

func CreateHash(secret string) string

func CreateMD5

func CreateMD5(secret interface{}) string

func CreateSHA1

func CreateSHA1(secret interface{}) string

func Fail

func Fail(ctx *gin.Context, err error)

func GetBytes

func GetBytes(key interface{}) ([]byte, error)

func GetFileContentType

func GetFileContentType(extension string) string

func GetGinRequest

func GetGinRequest(c *gin.Context)

func GetIso8601

func GetIso8601() string

func GetJSON

func GetJSON(value interface{})

func GetPostJSON

func GetPostJSON(ctx *gin.Context)

func GetRfc2822

func GetRfc2822() string

func GetTimeLayout

func GetTimeLayout() string

func GetType

func GetType(value interface{})

func Response

func Response(ctx *gin.Context, value interface{}, err error)

func Success

func Success(ctx *gin.Context, value interface{}, message interface{})

func Unauthorized

func Unauthorized(ctx *gin.Context, err error)

func UploadSuccess

func UploadSuccess(ctx *gin.Context, value interface{}, message interface{})

func ValidJSONWebToken

func ValidJSONWebToken(requestToken string) bool


type Result

type Result struct {
	Value interface{}
	Error interface{}

type Token

type Token struct {
	Token string
	Exp   int64

func CreateJWT

func CreateJWT() (token Token)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL