libpuroto

package
v0.0.0-...-c79e315 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2022 License: GPL-3.0 Imports: 15 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckEmail

func CheckEmail(value string) bool

returns true if the given string is an email

func ConfigRouter

func ConfigRouter(router *gin.Engine)

func Connect

func Connect(dbNumber int) *redis.Client

func ConnectDB

func ConnectDB() *gorm.DB

func ErrorFatal

func ErrorFatal(name string, err error)

func ErrorPanic

func ErrorPanic(err error)

func JsonRequested

func JsonRequested(c *gin.Context) bool

returns true, if the client requested json format, also sets the response to 406, if not

func LogError

func LogError(name string, err error)

func LogEvent

func LogEvent(name string, message string)

func RandomBytes

func RandomBytes(length uint32) ([]byte, error)

func RandomString

func RandomString(length uint32) (string, error)

func Redirect

func Redirect(url string) gin.HandlerFunc

redirects to the given url

func SessionValid

func SessionValid(uid, token *string, redisClient *redis.Client) (bool, error)

returns true if the session of the given redis DB is valid

Types

This section is empty.

Jump to

Keyboard shortcuts

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