cache

package
v0.0.0-...-bf79a09 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const EMAIL_EXPIRE = 2 * time.Hour
View Source
const STATS_EXPIRE = 4 * time.Hour

Variables

View Source
var Conn *redis.Client

Functions

func DeleteEmailVerification

func DeleteEmailVerification(uid string) error

func DeleteResetToken

func DeleteResetToken(token string) error

func GetResetToken

func GetResetToken(token string) (string, error)

func GetVerification

func GetVerification(uid string) (string, error)

func OpenCache

func OpenCache(addr, password string, db int) error

func SaveResetToken

func SaveResetToken(email, token string) error

func SaveServerStats

func SaveServerStats(users int, storage string, files int) error

func SaveVerification

func SaveVerification(uid, code string) error

Types

type ServerInfo

type ServerInfo struct {
	Users   int    `json:"users"`
	Storage string `json:"storage"`
	Total   int    `json:"total_files"`
}

func GetServerInfo

func GetServerInfo() (ServerInfo, bool, error)

Jump to

Keyboard shortcuts

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