api

package
v0.0.0-...-c0093cc Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2026 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildAPIRoutes

func BuildAPIRoutes(api_group *gin.RouterGroup, repo EventRepository, gameCache *background.GameCache, app *firebase.App)

func GetUserEmail

func GetUserEmail(c *gin.Context) string

Types

type AddTicketRequest

type AddTicketRequest struct {
	EventId             string `json:"eventId" binding:"required"`
	PurchaserEmail      string `json:"purchaserEmail" binding:"required"`
	GenconRecipientName string `json:"genconRecipientName" binding:"required"`
	HolderEmail         string `json:"holderEmail" binding:"required"`
	TicketType          string `json:"ticketType" binding:"required"`
}

type AdminOrganizer

type AdminOrganizer struct {
	Id        int64    `json:"id"`
	Aliases   []string `json:"aliases"`
	NumEvents int64    `json:"numEvents"`
}

type AuthService

type AuthService interface {
	VerifyIDToken(ctx context.Context, idToken string) (string, error)
}

AuthService wraps authentication logic, typically Firebase.

type BulkReplaceRequest

type BulkReplaceRequest struct {
	Text        string `json:"text"`
	Overwrite   bool   `json:"overwrite"`
	AsGroups    bool   `json:"asGroups"`
	AsPurchased bool   `json:"asPurchased"`
}

type CalendarEventCluster

type CalendarEventCluster struct {
	EventId          string    `json:"eventId"`
	Title            string    `json:"title"`
	StartTime        time.Time `json:"startTime"`
	EndTime          time.Time `json:"endTime"`
	GenconUrl        string    `json:"genconUrl"`
	PlannerUrl       string    `json:"plannerUrl"`
	ShortCategory    string    `json:"shortCategory"`
	ShortDescription string    `json:"shortDescription"`
	SimilarCount     int       `json:"similarCount"`
	Location         string    `json:"location"`
	RoomName         string    `json:"roomName"`
	TableNumber      string    `json:"tableNumber"`
	MapLink          string    `json:"mapLink,omitempty"`
	PartyMembers     []string  `json:"partyMembers"`
}

type CalendarMetadata

type CalendarMetadata struct {
	StartDate time.Time `json:"startDate"`
	EndDate   time.Time `json:"endDate"`
}

type Category

type Category struct {
	Name       string `json:"name"`
	Code       string `json:"code"`
	EventCount int    `json:"eventCount"`
	Year       int    `json:"year"`
}

type CreatePartyRequest

type CreatePartyRequest struct {
	Name string `json:"name"`
	Year int64  `json:"year"`
}

type ErrorResponse

type ErrorResponse struct {
	Error string `json:"error"`
}

ErrorResponse is the standard format for API error messages.

type Event

type Event struct {
	EventId              string     `json:"eventId"`
	Year                 int        `json:"year"`
	Active               bool       `json:"active"`
	Title                string     `json:"title"`
	ShortDescription     string     `json:"shortDescription"`
	LongDescription      string     `json:"longDescription"`
	CategoryCode         string     `json:"categoryCode"`
	EventType            string     `json:"eventType"`
	Group                string     `json:"group"`
	OrgId                int64      `json:"orgId"`
	GameSystem           GameSystem `json:"gameSystem"`
	RulesEdition         string     `json:"rulesEdition"`
	MinPlayers           int        `json:"minPlayers"`
	MaxPlayers           int        `json:"maxPlayers"`
	AgeRequired          string     `json:"ageRequired"`
	ExperienceRequired   string     `json:"experienceRequired"`
	MaterialsProvided    bool       `json:"materialsProvided"`
	StartTime            time.Time  `json:"startTime"`
	Duration             int        `json:"duration"`
	EndTime              time.Time  `json:"endTime"`
	GMNames              string     `json:"gmNames"`
	Website              string     `json:"website"`
	Email                string     `json:"email"`
	IsTournament         bool       `json:"isTournament"`
	RoundNumber          int        `json:"roundNumber"`
	TotalRounds          int        `json:"totalRounds"`
	MinPlayTime          int        `json:"minPlayTime"`
	AttendeeRegistration string     `json:"attendeeRegistration"`
	Cost                 int        `json:"cost"`
	Location             string     `json:"location"`
	RoomName             string     `json:"roomName"`
	TableNumber          string     `json:"tableNumber"`
	MapLink              string     `json:"mapLink,omitempty"`
	TicketsAvailable     int        `json:"ticketsAvailable"`
	LastModified         time.Time  `json:"lastModified"`
	RelatedEvents        []EventRef `json:"relatedEvents"`
	GenconUrl            string     `json:"genconUrl"`
}

type EventRef

type EventRef struct {
	EventId          string    `json:"eventId"`
	Active           bool      `json:"active"`
	TicketsAvailable int       `json:"ticketsAvailable"`
	StartTime        time.Time `json:"startTime"`
	EndTime          time.Time `json:"endTime"`
	MapLink          string    `json:"mapLink,omitempty"`
}

type EventRepository

type EventRepository interface {
	LoadCategorySummary(year int) ([]*postgres.CategorySummary, error)
	LoadEventGroupsForCategory(ctx context.Context, category string, year int) ([]*postgres.EventGroup, error)
	SearchEvents(ctx context.Context, q postgres.SearchQuery) ([]*postgres.EventGroup, error)
	LoadSimilarEvents(ctx context.Context, eventId string, userEmail string) ([]*events.GenconEvent, error)
	LoadOrCreateUser(email string) (*postgres.User, error)
	GetStarredIds(email string, year int) (*postgres.UserStarredEvents, error)
	GetAllStarredIds(email string) (*postgres.UserStarredEvents, error)
	UpdateStarredEvent(email string, eventId string, tier string, starGroup bool, add bool) (*postgres.UserStarredEvents, error)
	UpdateStarredEventMinimal(email string, eventId string, tier string, starGroup bool, add bool) (*postgres.UserStarredEvents, error)
	RemoveStarredEventGroup(email string, eventId string) (*postgres.UserStarredEvents, error)
	LoadStarredEvents(email string, year int) ([]*events.GenconEvent, error)
	LoadStarredEventGroups(email string, year int) ([]*postgres.EventGroup, error)
	LoadStarredEventClusters(email string, year int, starredEvents []*events.GenconEvent) ([]*postgres.CalendarEventCluster, error)
	ClearStarredEvents(email string, year int) error
	BulkStarEvents(email string, year int, eventIds []string, overwrite bool, asGroups bool, asPurchased bool) error
	ResolveNumericEventIds(year int, numericIds []string) (map[string]string, error)
	LoadAgenda(email string, year int) ([]*postgres.AgendaEntry, error)
	GetWishlistConstraints(email string) ([]postgres.WishlistConstraint, error)
	UpdateWishlistConstraints(email string, constraints []postgres.WishlistConstraint) error
	GetWishlistCache(email string, year int) ([]postgres.WishlistCacheItem, bool, time.Time, error)
	SaveWishlistCache(email string, year int, items []postgres.WishlistCacheItem, updatedAt time.Time) error

	// Party related
	LoadParties(user *postgres.User) ([]*postgres.Party, error)
	LoadParty(id int64) (*postgres.Party, error)
	LoadPartyByCode(code string) (*postgres.Party, error)
	NewParty(name string, year int64, founderEmail string) (*postgres.Party, error)
	UpdatePartyLeader(id int64, newLeaderEmail string) error
	RenameParty(id int64, name string) error
	DeleteParty(id int64) error
	RemoveMember(partyId int64, email string) error
	JoinParty(partyId int64, email string) error
	LoadPartySharedInterests(partyId int64, year int) ([]*postgres.SharedInterestGroup, error)
	UpdatePartyMemberInfo(partyId int64, email string, displayName string, genconName string, genconId string, genconEmail string) error
	LoadPartyMemberPurchases(partyId int64, year int) (map[string]int, error)
	SyncPartyTickets(partyId int64, year int, authEmail string, tickets []postgres.TicketSyncInput) ([]*postgres.PartyTicket, error)
	LoadPartyTickets(partyId int64, year int) ([]*postgres.PartyTicket, error)
	AddPartyTicket(partyId int64, year int, eventId, purchaserEmail, genconRecipientName, holderEmail, ticketType string) (*postgres.PartyTicket, error)
	DeletePartyTicket(partyId int64, ticketId string) error
	InitiateTicketTransfer(partyId int64, ticketId, fromEmail, toEmail, transferType string) (*postgres.TicketTransfer, error)
	RespondTicketTransfer(partyId int64, transferId, action, callerEmail string) (*postgres.TicketTransfer, error)
	ToggleTicketReturn(partyId int64, ticketId string) (*postgres.PartyTicket, error)
	UpdateTicketPurchaser(partyId int64, ticketId string, newPurchaserEmail string) (*postgres.PartyTicket, error)

	// User related
	UpdateDisplayName(email string, name string) error
	UpdateUserGenconInfo(email string, displayName string, genconName string, genconId string, genconEmail string) error
	GetLastUpdate() (time.Time, error)

	// Admin related
	IsAdmin(email string) (bool, error)
	LoadAllOrgs() ([]*postgres.Organizer, error)
	MergeOrgs(orgs []int64) error
	LoadEventOrgMetadata() ([]postgres.EventOrgMetadata, error)
}

type EventSample

type EventSample struct {
	Year   int      `json:"year"`
	Titles []string `json:"titles"`
}

type EventSummary

type EventSummary struct {
	AnchorEventId    string     `json:"anchorEventId"`
	Title            string     `json:"title"`
	ShortDescription string     `json:"shortDescription"`
	NumEvents        int        `json:"numEvents"`
	WedEvents        int        `json:"wedEvents"`
	WedTotalTickets  int        `json:"wedTotalTickets"`
	WedTickets       int        `json:"wedTickets"`
	ThuEvents        int        `json:"thuEvents"`
	ThuTotalTickets  int        `json:"thuTotalTickets"`
	ThuTickets       int        `json:"thuTickets"`
	FriEvents        int        `json:"friEvents"`
	FriTotalTickets  int        `json:"friTotalTickets"`
	FriTickets       int        `json:"friTickets"`
	SatEvents        int        `json:"satEvents"`
	SatTotalTickets  int        `json:"satTotalTickets"`
	SatTickets       int        `json:"satTickets"`
	SunEvents        int        `json:"sunEvents"`
	SunTotalTickets  int        `json:"sunTotalTickets"`
	SunTickets       int        `json:"sunTickets"`
	OrgId            int        `json:"orgId"`
	CategoryCode     string     `json:"categoryCode"`
	GameSystem       GameSystem `json:"gameSystem"`
}

Used in search results

type EventsSearch

type EventsSearch struct {
	Category      string `form:"cat"`
	Year          int    `form:"year"`
	MinWedTickets int    `form:"minWedTickets"`
	MinThuTickets int    `form:"minThuTickets"`
	MinFriTickets int    `form:"minFriTickets"`
	MinSatTickets int    `form:"minSatTickets"`
	MinSunTickets int    `form:"minSunTickets"`

	TextQuery string `form:"search"`
	OrgId     int    `form:"org_id"`
	OnlyFree  bool   `form:"free"`
}

Search param struct for looking up events

type FirebaseAuthWrapper

type FirebaseAuthWrapper struct {
	App *firebase.App
}

FirebaseAuthWrapper implements AuthService using Firebase.

func (*FirebaseAuthWrapper) VerifyIDToken

func (w *FirebaseAuthWrapper) VerifyIDToken(ctx context.Context, idToken string) (string, error)

type GameCacheWrapper

type GameCacheWrapper struct {
	Cache *background.GameCache
}

GameCacheWrapper implements GameService using the background GameCache.

func (*GameCacheWrapper) FindGame

func (w *GameCacheWrapper) FindGame(name string) *postgres.Game

type GameService

type GameService interface {
	FindGame(name string) *postgres.Game
}

GameService wraps game metadata lookup logic.

type GameSystem

type GameSystem struct {
	Name          string  `json:"name"`
	BggId         int64   `json:"bggId,omitempty"`
	BggRating     float64 `json:"bggRating,omitempty"`
	NumBggRatings int64   `json:"numBggRatings,omitempty"`
	YearPublished int64   `json:"yearPublished,omitempty"`
}

type MergeOrgsRequest

type MergeOrgsRequest struct {
	Ids []int64 `json:"ids" binding:"required"`
}

type MergeSuggestion

type MergeSuggestion struct {
	Id           int64         `json:"id"`
	Aliases      []string      `json:"aliases"`
	NumEvents    int64         `json:"numEvents"`
	Reasons      []string      `json:"reasons"`
	EventSamples []EventSample `json:"eventSamples"`
}

type OrganizerWithSuggestions

type OrganizerWithSuggestions struct {
	Id           int64             `json:"id"`
	Aliases      []string          `json:"aliases"`
	NumEvents    int64             `json:"numEvents"`
	EventSamples []EventSample     `json:"eventSamples"`
	Suggestions  []MergeSuggestion `json:"suggestions"`
}

type Party

type Party struct {
	Id          int64         `json:"id"`
	Name        string        `json:"name"`
	Year        int64         `json:"year"`
	LeaderEmail string        `json:"leaderEmail"`
	ShortCode   string        `json:"shortCode"`
	InviteLink  string        `json:"inviteLink"`
	Members     []PartyMember `json:"members"`
}

type PartyMember

type PartyMember struct {
	DisplayName string `json:"displayName"`
	Email       string `json:"email"`
	GenconName  string `json:"genconName"`
	GenconId    string `json:"genconId"`
	GenconEmail string `json:"genconEmail"`
}

type PostgresRepository

type PostgresRepository struct {
	DB *sql.DB
}

func (*PostgresRepository) AddPartyTicket

func (r *PostgresRepository) AddPartyTicket(partyId int64, year int, eventId, purchaserEmail, genconRecipientName, holderEmail, ticketType string) (*postgres.PartyTicket, error)

func (*PostgresRepository) BulkStarEvents

func (r *PostgresRepository) BulkStarEvents(email string, year int, eventIds []string, overwrite bool, asGroups bool, asPurchased bool) error

func (*PostgresRepository) ClearStarredEvents

func (r *PostgresRepository) ClearStarredEvents(email string, year int) error

func (*PostgresRepository) DeleteParty

func (r *PostgresRepository) DeleteParty(id int64) error

func (*PostgresRepository) DeletePartyTicket

func (r *PostgresRepository) DeletePartyTicket(partyId int64, ticketId string) error

func (*PostgresRepository) GetAllStarredIds

func (r *PostgresRepository) GetAllStarredIds(email string) (*postgres.UserStarredEvents, error)

func (*PostgresRepository) GetLastUpdate

func (r *PostgresRepository) GetLastUpdate() (time.Time, error)

func (*PostgresRepository) GetStarredIds

func (r *PostgresRepository) GetStarredIds(email string, year int) (*postgres.UserStarredEvents, error)

func (*PostgresRepository) GetWishlistCache

func (r *PostgresRepository) GetWishlistCache(email string, year int) ([]postgres.WishlistCacheItem, bool, time.Time, error)

func (*PostgresRepository) GetWishlistConstraints

func (r *PostgresRepository) GetWishlistConstraints(email string) ([]postgres.WishlistConstraint, error)

func (*PostgresRepository) InitiateTicketTransfer

func (r *PostgresRepository) InitiateTicketTransfer(partyId int64, ticketId, fromEmail, toEmail, transferType string) (*postgres.TicketTransfer, error)

func (*PostgresRepository) IsAdmin

func (r *PostgresRepository) IsAdmin(email string) (bool, error)

func (*PostgresRepository) JoinParty

func (r *PostgresRepository) JoinParty(partyId int64, email string) error

func (*PostgresRepository) LoadAgenda

func (r *PostgresRepository) LoadAgenda(email string, year int) ([]*postgres.AgendaEntry, error)

func (*PostgresRepository) LoadAllOrgs

func (r *PostgresRepository) LoadAllOrgs() ([]*postgres.Organizer, error)

func (*PostgresRepository) LoadCategorySummary

func (r *PostgresRepository) LoadCategorySummary(year int) ([]*postgres.CategorySummary, error)

func (*PostgresRepository) LoadEventGroupsForCategory

func (r *PostgresRepository) LoadEventGroupsForCategory(ctx context.Context, category string, year int) ([]*postgres.EventGroup, error)

func (*PostgresRepository) LoadEventOrgMetadata

func (r *PostgresRepository) LoadEventOrgMetadata() ([]postgres.EventOrgMetadata, error)

func (*PostgresRepository) LoadOrCreateUser

func (r *PostgresRepository) LoadOrCreateUser(email string) (*postgres.User, error)

func (*PostgresRepository) LoadParties

func (r *PostgresRepository) LoadParties(user *postgres.User) ([]*postgres.Party, error)

func (*PostgresRepository) LoadParty

func (r *PostgresRepository) LoadParty(id int64) (*postgres.Party, error)

func (*PostgresRepository) LoadPartyByCode

func (r *PostgresRepository) LoadPartyByCode(code string) (*postgres.Party, error)

func (*PostgresRepository) LoadPartyMemberPurchases

func (r *PostgresRepository) LoadPartyMemberPurchases(partyId int64, year int) (map[string]int, error)

func (*PostgresRepository) LoadPartySharedInterests

func (r *PostgresRepository) LoadPartySharedInterests(partyId int64, year int) ([]*postgres.SharedInterestGroup, error)

func (*PostgresRepository) LoadPartyTickets

func (r *PostgresRepository) LoadPartyTickets(partyId int64, year int) ([]*postgres.PartyTicket, error)

func (*PostgresRepository) LoadSimilarEvents

func (r *PostgresRepository) LoadSimilarEvents(ctx context.Context, eventId string, userEmail string) ([]*events.GenconEvent, error)

func (*PostgresRepository) LoadStarredEventClusters

func (r *PostgresRepository) LoadStarredEventClusters(email string, year int, starredEvents []*events.GenconEvent) ([]*postgres.CalendarEventCluster, error)

func (*PostgresRepository) LoadStarredEventGroups

func (r *PostgresRepository) LoadStarredEventGroups(email string, year int) ([]*postgres.EventGroup, error)

func (*PostgresRepository) LoadStarredEvents

func (r *PostgresRepository) LoadStarredEvents(email string, year int) ([]*events.GenconEvent, error)

func (*PostgresRepository) MergeOrgs

func (r *PostgresRepository) MergeOrgs(orgs []int64) error

func (*PostgresRepository) NewParty

func (r *PostgresRepository) NewParty(name string, year int64, founderEmail string) (*postgres.Party, error)

func (*PostgresRepository) RemoveMember

func (r *PostgresRepository) RemoveMember(partyId int64, email string) error

func (*PostgresRepository) RemoveStarredEventGroup

func (r *PostgresRepository) RemoveStarredEventGroup(email string, eventId string) (*postgres.UserStarredEvents, error)

func (*PostgresRepository) RenameParty

func (r *PostgresRepository) RenameParty(id int64, name string) error

func (*PostgresRepository) ResolveNumericEventIds

func (r *PostgresRepository) ResolveNumericEventIds(year int, numericIds []string) (map[string]string, error)

func (*PostgresRepository) RespondTicketTransfer

func (r *PostgresRepository) RespondTicketTransfer(partyId int64, transferId, action, callerEmail string) (*postgres.TicketTransfer, error)

func (*PostgresRepository) SaveWishlistCache

func (r *PostgresRepository) SaveWishlistCache(email string, year int, items []postgres.WishlistCacheItem, updatedAt time.Time) error

func (*PostgresRepository) SearchEvents

func (*PostgresRepository) SyncPartyTickets

func (r *PostgresRepository) SyncPartyTickets(partyId int64, year int, authEmail string, tickets []postgres.TicketSyncInput) ([]*postgres.PartyTicket, error)

func (*PostgresRepository) ToggleTicketReturn

func (r *PostgresRepository) ToggleTicketReturn(partyId int64, ticketId string) (*postgres.PartyTicket, error)

func (*PostgresRepository) UpdateDisplayName

func (r *PostgresRepository) UpdateDisplayName(email string, name string) error

func (*PostgresRepository) UpdatePartyLeader

func (r *PostgresRepository) UpdatePartyLeader(id int64, newLeaderEmail string) error

func (*PostgresRepository) UpdatePartyMemberInfo

func (r *PostgresRepository) UpdatePartyMemberInfo(partyId int64, email string, displayName string, genconName string, genconId string, genconEmail string) error

func (*PostgresRepository) UpdateStarredEvent

func (r *PostgresRepository) UpdateStarredEvent(email string, eventId string, tier string, starGroup bool, add bool) (*postgres.UserStarredEvents, error)

func (*PostgresRepository) UpdateStarredEventMinimal

func (r *PostgresRepository) UpdateStarredEventMinimal(email string, eventId string, tier string, starGroup bool, add bool) (*postgres.UserStarredEvents, error)

func (*PostgresRepository) UpdateTicketPurchaser

func (r *PostgresRepository) UpdateTicketPurchaser(partyId int64, ticketId string, newPurchaserEmail string) (*postgres.PartyTicket, error)

func (*PostgresRepository) UpdateUserGenconInfo

func (r *PostgresRepository) UpdateUserGenconInfo(email string, displayName string, genconName string, genconId string, genconEmail string) error

func (*PostgresRepository) UpdateWishlistConstraints

func (r *PostgresRepository) UpdateWishlistConstraints(email string, constraints []postgres.WishlistConstraint) error

type RenamePartyRequest

type RenamePartyRequest struct {
	Name string `json:"name"`
}

type RenameUserRequest

type RenameUserRequest struct {
	DisplayName string `json:"displayName"`
	GenconName  string `json:"genconName"`
	GenconId    string `json:"genconId"`
	GenconEmail string `json:"genconEmail"`
}

type RespondTransferRequest

type RespondTransferRequest struct {
	Action string `json:"action" binding:"required"`
}

type Server

type Server struct {
	Repo            EventRepository
	Auth            AuthService
	Games           GameService
	LocationMatcher *locations.Matcher
}

func NewServer

func NewServer(repo EventRepository, auth AuthService, games GameService) *Server

func (*Server) AddTicket

func (s *Server) AddTicket(c *gin.Context)

func (*Server) AdminOnly

func (s *Server) AdminOnly() gin.HandlerFunc

func (*Server) AuthMiddleware

func (s *Server) AuthMiddleware() gin.HandlerFunc

func (*Server) BulkClearStarredEvents

func (s *Server) BulkClearStarredEvents(c *gin.Context)

func (*Server) BulkReplaceStarredEvents

func (s *Server) BulkReplaceStarredEvents(c *gin.Context)

func (*Server) CreateParty

func (s *Server) CreateParty(c *gin.Context)

func (*Server) DeleteParty

func (s *Server) DeleteParty(c *gin.Context)

func (*Server) DeleteTicket

func (s *Server) DeleteTicket(c *gin.Context)

func (*Server) GetAgenda

func (s *Server) GetAgenda(c *gin.Context)

func (*Server) GetCalendarMetadata

func (s *Server) GetCalendarMetadata(c *gin.Context)

func (*Server) GetMergeSuggestions

func (s *Server) GetMergeSuggestions(c *gin.Context)

func (*Server) GetParties

func (s *Server) GetParties(c *gin.Context)

func (*Server) GetParty

func (s *Server) GetParty(c *gin.Context)

func (*Server) GetPartyInterests

func (s *Server) GetPartyInterests(c *gin.Context)

func (*Server) GetStarredCalendarEvents

func (s *Server) GetStarredCalendarEvents(c *gin.Context)

func (*Server) GetStarredEvents

func (s *Server) GetStarredEvents(c *gin.Context)

func (*Server) GetStarredIndividualEvents

func (s *Server) GetStarredIndividualEvents(c *gin.Context)

func (*Server) GetStarredPageData

func (s *Server) GetStarredPageData(c *gin.Context)

func (*Server) GetTickets

func (s *Server) GetTickets(c *gin.Context)

func (*Server) GetUpdateStatus

func (s *Server) GetUpdateStatus(c *gin.Context)

func (*Server) GetUser

func (s *Server) GetUser(c *gin.Context)

func (*Server) GetWishlist

func (s *Server) GetWishlist(c *gin.Context)

func (*Server) GetWishlistConstraints

func (s *Server) GetWishlistConstraints(c *gin.Context)

func (*Server) JoinParty

func (s *Server) JoinParty(c *gin.Context)

func (*Server) LeaveParty

func (s *Server) LeaveParty(c *gin.Context)

func (*Server) ListCategories

func (s *Server) ListCategories(c *gin.Context)

func (*Server) LoadUserEvents

func (s *Server) LoadUserEvents(c *gin.Context)

func (*Server) LookupEvent

func (s *Server) LookupEvent(c *gin.Context)

func (*Server) MatchLocation

func (s *Server) MatchLocation(location, roomName, tableNumber string) string

func (*Server) MergeOrgs

func (s *Server) MergeOrgs(c *gin.Context)

func (*Server) OptionalAuth

func (s *Server) OptionalAuth() gin.HandlerFunc

func (*Server) PartyStream

func (s *Server) PartyStream(c *gin.Context)

func (*Server) RegisterRoutes

func (s *Server) RegisterRoutes(group *gin.RouterGroup)

func (*Server) RenameParty

func (s *Server) RenameParty(c *gin.Context)

func (*Server) RenameUser

func (s *Server) RenameUser(c *gin.Context)

func (*Server) RespondTransfer

func (s *Server) RespondTransfer(c *gin.Context)

func (*Server) SearchEvents

func (s *Server) SearchEvents(c *gin.Context)

func (*Server) StarEvent

func (s *Server) StarEvent(c *gin.Context)

func (*Server) SyncTickets

func (s *Server) SyncTickets(c *gin.Context)

func (*Server) ToggleTicketReturn

func (s *Server) ToggleTicketReturn(c *gin.Context)

func (*Server) TransferLeadership

func (s *Server) TransferLeadership(c *gin.Context)

func (*Server) TransferTicket

func (s *Server) TransferTicket(c *gin.Context)

func (*Server) UpdatePartyMemberInfo

func (s *Server) UpdatePartyMemberInfo(c *gin.Context)

func (*Server) UpdateTicketPurchaser

func (s *Server) UpdateTicketPurchaser(c *gin.Context)

func (*Server) UpdateWishlistConstraints

func (s *Server) UpdateWishlistConstraints(c *gin.Context)

func (*Server) ViewOrgs

func (s *Server) ViewOrgs(c *gin.Context)

type StarEventRequest

type StarEventRequest struct {
	EventId   string `json:"eventId"`
	Add       bool   `json:"add"`
	Related   bool   `json:"related"`
	Tier      string `json:"tier"`
	RemoveAll bool   `json:"removeAll"`
}

type StarredEventDetail

type StarredEventDetail struct {
	EventId          string                    `json:"eventId"`
	Title            string                    `json:"title"`
	ShortDescription string                    `json:"shortDescription"`
	CategoryCode     string                    `json:"categoryCode"`
	StartTime        string                    `json:"startTime"`
	EndTime          string                    `json:"endTime"`
	GenconUrl        string                    `json:"genconUrl"`
	PlannerUrl       string                    `json:"plannerUrl"`
	Tier             string                    `json:"tier"`
	GroupTier        string                    `json:"groupTier"`
	IsOverride       bool                      `json:"isOverride"`
	Location         string                    `json:"location"`
	RoomName         string                    `json:"roomName"`
	TableNumber      string                    `json:"tableNumber"`
	MapLink          string                    `json:"mapLink,omitempty"`
	PartyMembers     []postgres.MemberInterest `json:"partyMembers"`
}

type StarredPageData

type StarredPageData struct {
	Email            string                 `json:"email"`
	Year             int                    `json:"year"`
	CalendarEvents   []CalendarEventCluster `json:"calendarEvents"`
	IndividualEvents []StarredEventDetail   `json:"individualEvents"`
	Metadata         CalendarMetadata       `json:"metadata"`
	StarredClusters  []string               `json:"starredClusters"`
	StarredEvents    []string               `json:"starredEvents"`
}

type SyncTicketsRequest

type SyncTicketsRequest struct {
	Source  string                     `json:"source"`
	Tickets []postgres.TicketSyncInput `json:"tickets"`
}

type TransferLeadershipRequest

type TransferLeadershipRequest struct {
	NewLeaderEmail string `json:"newLeaderEmail"`
}

type TransferTicketRequest

type TransferTicketRequest struct {
	ToEmail      string `json:"toEmail" binding:"required"`
	TransferType string `json:"transferType" binding:"required"`
	Notes        string `json:"notes"`
}

type UpdatePartyMemberRequest

type UpdatePartyMemberRequest struct {
	Email       string `json:"email"`
	DisplayName string `json:"displayName"`
	GenconName  string `json:"genconName"`
	GenconId    string `json:"genconId"`
	GenconEmail string `json:"genconEmail"`
}

type UpdateTicketPurchaserRequest

type UpdateTicketPurchaserRequest struct {
	PurchaserEmail string `json:"purchaserEmail" binding:"required"`
}

type User

type User struct {
	Email       string `json:"email"`
	DisplayName string `json:"displayName"`
	GenconName  string `json:"genconName"`
	GenconId    string `json:"genconId"`
	GenconEmail string `json:"genconEmail"`
	IsAdmin     bool   `json:"isAdmin"`
}

type UserEvents

type UserEvents struct {
	Email           string            `json:"email"`
	Year            int               `json:"year"`
	StarredClusters []string          `json:"starredClusters"`
	StarredEvents   []string          `json:"starredEvents"`
	StarredTiers    map[string]string `json:"starredTiers"`
	TicketedEvents  []string          `json:"ticketedEvents"`
}

type WishlistConstraint

type WishlistConstraint struct {
	DayOfWeek          int `json:"dayOfWeek"`
	StartHour          int `json:"startHour"`
	StartMinute        int `json:"startMinute"`
	EndHour            int `json:"endHour"`
	EndMinute          int `json:"endMinute"`
	MinDurationMinutes int `json:"minDurationMinutes"`
}

type WishlistItem

type WishlistItem struct {
	Event        StarredEventDetail `json:"event"`
	Status       string             `json:"status"`
	Reasoning    []string           `json:"reasoning"`
	Score        float64            `json:"score"`
	PartyMembers []string           `json:"partyMembers"`
}

Jump to

Keyboard shortcuts

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