utils

package
v0.0.0-...-a72ac3c Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2022 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CanAddStaff

func CanAddStaff(user_id uint, tournament_id uint) error

func CanEditRounds

func CanEditRounds(user_id uint, tournament_id uint) error

func CanEditTournament

func CanEditTournament(user_id uint, tournament_id uint) error

func CanJudge

func CanJudge(user_id uint, tournament_id uint) error

func CanViewTournament

func CanViewTournament(user_id uint, tournament_id uint) (structs.Tournament, error)

func CheckAuth

func CheckAuth(token string) (string, error)

func DefaultErrorMessage

func DefaultErrorMessage(c *fiber.Ctx, err error, code int) error

func GetRequestFilter

func GetRequestFilter(c *fiber.Ctx) structs.RequestFilter

func GetSelfFromDB

func GetSelfFromDB(c *fiber.Ctx) (structs.User, error)

func GetTokenFromRequest

func GetTokenFromRequest(c *fiber.Ctx) (string, error)

func GetTournament

func GetTournament(tournament_id uint) (structs.Tournament, error)

func GetUserFromSession

func GetUserFromSession(sessionToken string) (structs.User, error)

func IsSuperadmin

func IsSuperadmin(c *fiber.Ctx) error

func StringToUint32

func StringToUint32(s string) (uint, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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