utils

package
v0.0.0-...-18a73b7 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2025 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	UserSessionKey  Key = "u"
	TokenSessionKey Key = "at"
	StateSessionKey Key = "state"
	SessionTempAge  Age = 60 * 15   // 15 minutes
	SessionMaxAge   Age = 86400 * 2 // 2 days

)

Variables

This section is empty.

Functions

func AbstractExists

func AbstractExists(team *models.DashboardTeam, event string) bool

func BadRequestError

func BadRequestError(c echo.Context, msg string, err *error) error

func GetAbstractFile

func GetAbstractFile(strTeamId string) (string, error)

func GetAllotmentCSV

func GetAllotmentCSV(userId int, event string) (string, error)

func GetSession

func GetSession(c echo.Context) (*sessions.Session, error)

func InternalError

func InternalError(c echo.Context, msg string, err *error) error

func InvalidateSession

func InvalidateSession(c echo.Context) error

func SaveAbstract

func SaveAbstract(file *multipart.FileHeader, event dao.Event, teamId int) error

func SaveMidTermCSV

func SaveMidTermCSV(file *multipart.FileHeader, userId int, event string) error

func SetSession

func SetSession(c echo.Context, maxAge Age, values *map[Key]interface{}) error

func SetSessionWith

func SetSessionWith(sess *sessions.Session, c echo.Context, maxAge Age, values *map[Key]interface{}) error

func UnauthorizedError

func UnauthorizedError(c echo.Context, msg string, err *error) error

func UploadMidTermScores

func UploadMidTermScores(userId int, event string) error

Types

type Age

type Age int

type Key

type Key string

Jump to

Keyboard shortcuts

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