helpers

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2023 License: AGPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CensorUserPassword

func CensorUserPassword(user *models.User)

func ClearTemporaryFlashes

func ClearTemporaryFlashes() echo.MiddlewareFunc

func DeleteFlash

func DeleteFlash(c echo.Context, name string)

func GenerateActivationKey

func GenerateActivationKey(length int) string

func GetFlash

func GetFlash(c echo.Context, name string) interface{}

func GetJWT

func GetJWT(cfg config.Keys) (string, error)

func GetUserLastLanguage

func GetUserLastLanguage(ctx context.Context, DB *sql.DB, userID int) (string, error)

func LoginRequired

func LoginRequired(c echo.Context) error

func SetFlash

func SetFlash(c echo.Context, name string, value interface{})

func UnauthorizedError

func UnauthorizedError(c echo.Context) error

Types

type Judge added in v0.3.0

type Judge struct {
	Id     int64  `json:"id"`
	Name   string `json:"name"`
	Ping   int    `json:"ping"`
	Online bool   `json:"online"`

	judge.ServerStatus
}

func NewJudgeFromModelsJudge added in v0.3.0

func NewJudgeFromModelsJudge(j *models.Judge) *Judge

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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