helper

package
v0.0.0-...-ab204d3 Latest Latest
Warning

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

Go to latest
Published: May 7, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CONTEXT_USER_TOKEN_AUTHORIZATION_STR = "Authorization"
)

Variables

This section is empty.

Functions

func GenerateRandInt

func GenerateRandInt(length int) string

func GenerateToken

func GenerateToken(userId string) (string, error)

func GenerateUUID

func GenerateUUID() string

func GetTimeDiff

func GetTimeDiff(timestamp int64) int64

func GetTimeStamp

func GetTimeStamp() int64

func GetUserIdFromContext

func GetUserIdFromContext(ctx context.Context) (string, error)

func TransactionHandle

func TransactionHandle(txn *gorm.DB, err *error)

func TypeConverter

func TypeConverter[R any](data any) (*R, error)

func ValidateToken

func ValidateToken(token string) (string, bool)

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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