controllers

package
v0.0.0-...-ce4f20c Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2024 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ALL_EVENT = -1
)

Variables

This section is empty.

Functions

func AddNewWeeklyCompetition

func AddNewWeeklyCompetition(db *pgxpool.Pool, envMap map[string]string)

func AddPlacementToRankings

func AddPlacementToRankings(rankings []RankingsEntry)

func CreateCompetition

func CreateCompetition(db *pgxpool.Pool, competition models.CompetitionData, envMap map[string]string) (string, string)

func DeleteAnnouncement

func DeleteAnnouncement(db *pgxpool.Pool) gin.HandlerFunc

func GetAnnouncementById

func GetAnnouncementById(db *pgxpool.Pool, envMap map[string]string) gin.HandlerFunc

func GetAnnouncements

func GetAnnouncements(db *pgxpool.Pool, envMap map[string]string) gin.HandlerFunc

func GetAverageInfo

func GetAverageInfo(db *pgxpool.Pool) gin.HandlerFunc

func GetAverageInfoRecords

func GetAverageInfoRecords(db *pgxpool.Pool) gin.HandlerFunc

func GetCompetitionById

func GetCompetitionById(db *pgxpool.Pool) gin.HandlerFunc

func GetEvents

func GetEvents(db *pgxpool.Pool) gin.HandlerFunc

func GetFilteredCompetitions

func GetFilteredCompetitions(db *pgxpool.Pool) gin.HandlerFunc

func GetManageRolesUsers

func GetManageRolesUsers(db *pgxpool.Pool) gin.HandlerFunc

func GetNewWeeklyCompetitionInfo

func GetNewWeeklyCompetitionInfo(db *pgxpool.Pool) (models.CompetitionData, error)

func GetNoOfNewAnnouncements

func GetNoOfNewAnnouncements(db *pgxpool.Pool, envMap map[string]string) gin.HandlerFunc

func GetProfileResults

func GetProfileResults(db *pgxpool.Pool) gin.HandlerFunc

func GetRankings

func GetRankings(db *pgxpool.Pool) gin.HandlerFunc

func GetRecords

func GetRecords(db *pgxpool.Pool) gin.HandlerFunc

func GetRegionsGrouped

func GetRegionsGrouped(db *pgxpool.Pool) gin.HandlerFunc

func GetResultsByIdAndEvent

func GetResultsByIdAndEvent(db *pgxpool.Pool) gin.HandlerFunc

func GetResultsFromCompetition

func GetResultsFromCompetition(db *pgxpool.Pool) gin.HandlerFunc

func GetResultsQuery

func GetResultsQuery(db *pgxpool.Pool) gin.HandlerFunc

func GetResultsStatuses

func GetResultsStatuses(db *pgxpool.Pool) gin.HandlerFunc

func GetResultsValidation

func GetResultsValidation(db *pgxpool.Pool) gin.HandlerFunc

func GetSearchUsers

func GetSearchUsers(db *pgxpool.Pool) gin.HandlerFunc

func GetTags

func GetTags(db *pgxpool.Pool) gin.HandlerFunc

func GetUserMapData

func GetUserMapData(db *pgxpool.Pool) gin.HandlerFunc

func PostAnnouncement

func PostAnnouncement(db *pgxpool.Pool, envMap map[string]string) gin.HandlerFunc

func PostCompetition

func PostCompetition(db *pgxpool.Pool, envMap map[string]string) gin.HandlerFunc

func PostLogIn

func PostLogIn(db *pgxpool.Pool, envMap map[string]string) gin.HandlerFunc

func PostResults

func PostResults(db *pgxpool.Pool, envMap map[string]string) gin.HandlerFunc

func PostResultsValidation

func PostResultsValidation(db *pgxpool.Pool) gin.HandlerFunc

func PutAnnouncement

func PutAnnouncement(db *pgxpool.Pool, envMap map[string]string) gin.HandlerFunc

func PutCompetition

func PutCompetition(db *pgxpool.Pool, envMap map[string]string) gin.HandlerFunc

func PutManageRolesUsers

func PutManageRolesUsers(db *pgxpool.Pool) gin.HandlerFunc

func ReactToAnnouncement

func ReactToAnnouncement(db *pgxpool.Pool) gin.HandlerFunc

func ReadAnnouncement

func ReadAnnouncement(db *pgxpool.Pool) gin.HandlerFunc

func ValidateResults

func ValidateResults(db *pgxpool.Pool, body ValidateResultsBody, isadmin bool) (string, string)

Types

type AnnouncementReactResponse

type AnnouncementReactResponse struct {
	Set bool `json:"set"`
}

type AverageInfo

type AverageInfo struct {
	Single              string   `json:"single"`
	Average             string   `json:"average"`
	Times               []string `json:"times"`
	Bpa                 string   `json:"bpa"`
	Wpa                 string   `json:"wpa"`
	ShowPossibleAverage bool     `json:"showPossibleAverage"`
	FinishedCompeting   bool     `json:"finishedCompeting"`
	Place               string   `json:"place"`
	SingleRecord        string   `json:"singleRecord"`
	SingleRecordColor   string   `json:"singleRecordColor"`
	AverageRecord       string   `json:"averageRecord"`
	AverageRecordColor  string   `json:"averageRecordColor"`
}

type RankingsEntry

type RankingsEntry struct {
	Place           string   `json:"place"`
	Username        string   `json:"username"`
	WcaId           string   `json:"wca_id"`
	CountryISO2     string   `json:"country_iso2"`
	CountryName     string   `json:"country_name"`
	Result          string   `json:"result"`
	CompetitionId   string   `json:"competitionId"`
	CompetitionName string   `json:"competitionName"`
	Times           []string `json:"times"`
}

func MergeNonUniqueRankings

func MergeNonUniqueRankings(rankings []RankingsEntry, isfmc bool) []RankingsEntry

type RecordsItem

type RecordsItem struct {
	EventName string             `json:"eventname"`
	Iconcode  string             `json:"iconcode"`
	Entries   []RecordsItemEntry `json:"entries"`
}

type RecordsItemEntry

type RecordsItemEntry struct {
	Type               string    `json:"type"` // Single or Average
	Username           string    `json:"username"`
	WcaId              string    `json:"wcaId"`
	Result             string    `json:"result"`
	CountryIso2        string    `json:"countryIso2"`
	CountryName        string    `json:"countryName"`
	CompetitionName    string    `json:"competitionName"`
	CompetitionId      string    `json:"competitionId"`
	Solves             []string  `json:"solves"`
	CompetitionEndDate time.Time `json:"-"`
	EventName          string    `json:"-"`
	IconCode           string    `json:"-"`
}

type RegionSelectGroup

type RegionSelectGroup struct {
	GroupName    string   `json:"groupName"`
	GroupMembers []string `json:"groupMembers"`
}

type ValidateResultsBody

type ValidateResultsBody struct {
	ResultId int  `json:"resultId"`
	Verdict  bool `json:"verdict"`
}

Jump to

Keyboard shortcuts

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