utils

package
v0.0.0-...-7d9ee97 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const DEFAULT_SECRET = "gocoresec"

Variables

This section is empty.

Functions

func CheckPasswordHash

func CheckPasswordHash(password, hash string) bool

func CreateToken

func CreateToken(obj map[string]interface{}, secret string) (string, error)

func CurrentTime

func CurrentTime() int64

func GetHostIP

func GetHostIP() string

GetHostIP get host ip address

func GetHostPort

func GetHostPort(addr string) (string, string)

func HashPassword

func HashPassword(password string) (string, error)

func ParseToken

func ParseToken(tokenStr string, secret string) (string, int64, map[string]interface{}, error)

func ToStrings

func ToStrings(t []interface{}) []string

func Uuid

func Uuid() string

Uuid generate uuid

Types

This section is empty.

Jump to

Keyboard shortcuts

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