lib

package
v0.0.0-...-eab0a4e Latest Latest
Warning

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

Go to latest
Published: May 20, 2024 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Pbkdf2CompatHashAlgorithm = "SHA256"
	Pbkdf2CompatIterations    = 12000
	Pbkdf2CompatSaltBytes     = 24
	Pbkdf2CompatHashBytes     = 24
)

Variables

This section is empty.

Functions

func CreateDynamicWriteTable

func CreateDynamicWriteTable(dbConn *db.Database, tableName string) error

func CreateHash

func CreateHash(password string) string

func GetClientIp

func GetClientIp(r *http.Request) string

func GetCurrentLoginCount

func GetCurrentLoginCount(request util.Request) [2]int

func GetMenus

func GetMenus() []*model.Menu

func GetRecentPoll

func GetRecentPoll() *model.Poll

func InsertPoint

func InsertPoint(dbConn *db.Database, request util.Request, mbId string, point int, content, relTable, relId, relAction string, expire int)

func IsFileExist

func IsFileExist(filePath string) bool

func IsInterceptIP

func IsInterceptIP(request util.Request, clientIP string) bool

func IsPossibleIP

func IsPossibleIP(request util.Request, clientIP string) bool

func IsSuperAdmin

func IsSuperAdmin(request util.Request, mbId string) bool

func RecordVisit

func RecordVisit(r *http.Request) error

func SendHTML

func SendHTML(w http.ResponseWriter, html string)

func SessionMemberKey

func SessionMemberKey(r *http.Request, member *model.Member) string

Types

type ErrorResponse

type ErrorResponse struct {
	Message string `json:"message"`
}

func NewErrorResponse

func NewErrorResponse(err error) ErrorResponse

Jump to

Keyboard shortcuts

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