utils

package
v1.2.5 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2020 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	//ClaimCtxKey claim context key
	ClaimCtxKey string = "claim_context_key"
	//ResponseCtxKey page data context key
	ResponseCtxKey string = "response_context_key"
	//SessionCookieKey auth token in session key
	SessionCookieKey string = "session_token"
	//PageStyleCookieKey allows users to choose the style wants to use for page
	PageStyleCookieKey string = "page_style"
	//RedisAppListKey redis app list key
	RedisAppListKey string = "APPLIST"
)

Variables

View Source
var Logger *zap.Logger

Logger global Logger

Functions

func ComparePasswords

func ComparePasswords(hashedPwd string, plainPwd []byte) bool

ComparePasswords password

func HashAndSalt

func HashAndSalt(pwd []byte) string

HashAndSalt password

func RandomString

func RandomString(length int) string

RandomString get random string with length

func WriteContentToFile

func WriteContentToFile(content []string, path string) error

WriteContentToFile write to file

Types

This section is empty.

Jump to

Keyboard shortcuts

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