Documentation
¶
Index ¶
- func BuildAPIRoutes(api_group *gin.RouterGroup, repo EventRepository, ...)
- func GetUserEmail(c *gin.Context) string
- type AddTicketRequest
- type AdminOrganizer
- type AuthService
- type BulkReplaceRequest
- type CalendarEventCluster
- type CalendarMetadata
- type Category
- type CreatePartyRequest
- type ErrorResponse
- type Event
- type EventRef
- type EventRepository
- type EventSample
- type EventSummary
- type EventsSearch
- type FirebaseAuthWrapper
- type GameCacheWrapper
- type GameService
- type GameSystem
- type MergeOrgsRequest
- type MergeSuggestion
- type OrganizerWithSuggestions
- type Party
- type PartyMember
- type PostgresRepository
- func (r *PostgresRepository) AddPartyTicket(partyId int64, year int, ...) (*postgres.PartyTicket, error)
- func (r *PostgresRepository) BulkStarEvents(email string, year int, eventIds []string, overwrite bool, asGroups bool, ...) error
- func (r *PostgresRepository) ClearStarredEvents(email string, year int) error
- func (r *PostgresRepository) DeleteParty(id int64) error
- func (r *PostgresRepository) DeletePartyTicket(partyId int64, ticketId string) error
- func (r *PostgresRepository) GetAllStarredIds(email string) (*postgres.UserStarredEvents, error)
- func (r *PostgresRepository) GetLastUpdate() (time.Time, error)
- func (r *PostgresRepository) GetStarredIds(email string, year int) (*postgres.UserStarredEvents, error)
- func (r *PostgresRepository) GetWishlistCache(email string, year int) ([]postgres.WishlistCacheItem, bool, time.Time, error)
- func (r *PostgresRepository) GetWishlistConstraints(email string) ([]postgres.WishlistConstraint, error)
- func (r *PostgresRepository) InitiateTicketTransfer(partyId int64, ticketId, fromEmail, toEmail, transferType string) (*postgres.TicketTransfer, error)
- func (r *PostgresRepository) IsAdmin(email string) (bool, error)
- func (r *PostgresRepository) JoinParty(partyId int64, email string) error
- func (r *PostgresRepository) LoadAgenda(email string, year int) ([]*postgres.AgendaEntry, error)
- func (r *PostgresRepository) LoadAllOrgs() ([]*postgres.Organizer, error)
- func (r *PostgresRepository) LoadCategorySummary(year int) ([]*postgres.CategorySummary, error)
- func (r *PostgresRepository) LoadEventGroupsForCategory(ctx context.Context, category string, year int) ([]*postgres.EventGroup, error)
- func (r *PostgresRepository) LoadEventOrgMetadata() ([]postgres.EventOrgMetadata, error)
- func (r *PostgresRepository) LoadOrCreateUser(email string) (*postgres.User, error)
- func (r *PostgresRepository) LoadParties(user *postgres.User) ([]*postgres.Party, error)
- func (r *PostgresRepository) LoadParty(id int64) (*postgres.Party, error)
- func (r *PostgresRepository) LoadPartyByCode(code string) (*postgres.Party, error)
- func (r *PostgresRepository) LoadPartyMemberPurchases(partyId int64, year int) (map[string]int, error)
- func (r *PostgresRepository) LoadPartySharedInterests(partyId int64, year int) ([]*postgres.SharedInterestGroup, error)
- func (r *PostgresRepository) LoadPartyTickets(partyId int64, year int) ([]*postgres.PartyTicket, error)
- func (r *PostgresRepository) LoadSimilarEvents(ctx context.Context, eventId string, userEmail string) ([]*events.GenconEvent, error)
- func (r *PostgresRepository) LoadStarredEventClusters(email string, year int, starredEvents []*events.GenconEvent) ([]*postgres.CalendarEventCluster, error)
- func (r *PostgresRepository) LoadStarredEventGroups(email string, year int) ([]*postgres.EventGroup, error)
- func (r *PostgresRepository) LoadStarredEvents(email string, year int) ([]*events.GenconEvent, error)
- func (r *PostgresRepository) MergeOrgs(orgs []int64) error
- func (r *PostgresRepository) NewParty(name string, year int64, founderEmail string) (*postgres.Party, error)
- func (r *PostgresRepository) RemoveMember(partyId int64, email string) error
- func (r *PostgresRepository) RemoveStarredEventGroup(email string, eventId string) (*postgres.UserStarredEvents, error)
- func (r *PostgresRepository) RenameParty(id int64, name string) error
- func (r *PostgresRepository) ResolveNumericEventIds(year int, numericIds []string) (map[string]string, error)
- func (r *PostgresRepository) RespondTicketTransfer(partyId int64, transferId, action, callerEmail string) (*postgres.TicketTransfer, error)
- func (r *PostgresRepository) SaveWishlistCache(email string, year int, items []postgres.WishlistCacheItem, ...) error
- func (r *PostgresRepository) SearchEvents(ctx context.Context, q postgres.SearchQuery) ([]*postgres.EventGroup, error)
- func (r *PostgresRepository) SyncPartyTickets(partyId int64, year int, authEmail string, tickets []postgres.TicketSyncInput) ([]*postgres.PartyTicket, error)
- func (r *PostgresRepository) ToggleTicketReturn(partyId int64, ticketId string) (*postgres.PartyTicket, error)
- func (r *PostgresRepository) UpdateDisplayName(email string, name string) error
- func (r *PostgresRepository) UpdatePartyLeader(id int64, newLeaderEmail string) error
- func (r *PostgresRepository) UpdatePartyMemberInfo(partyId int64, email string, displayName string, genconName string, ...) error
- func (r *PostgresRepository) UpdateStarredEvent(email string, eventId string, tier string, starGroup bool, add bool) (*postgres.UserStarredEvents, error)
- func (r *PostgresRepository) UpdateStarredEventMinimal(email string, eventId string, tier string, starGroup bool, add bool) (*postgres.UserStarredEvents, error)
- func (r *PostgresRepository) UpdateTicketPurchaser(partyId int64, ticketId string, newPurchaserEmail string) (*postgres.PartyTicket, error)
- func (r *PostgresRepository) UpdateUserGenconInfo(email string, displayName string, genconName string, genconId string, ...) error
- func (r *PostgresRepository) UpdateWishlistConstraints(email string, constraints []postgres.WishlistConstraint) error
- type RenamePartyRequest
- type RenameUserRequest
- type RespondTransferRequest
- type Server
- func (s *Server) AddTicket(c *gin.Context)
- func (s *Server) AdminOnly() gin.HandlerFunc
- func (s *Server) AuthMiddleware() gin.HandlerFunc
- func (s *Server) BulkClearStarredEvents(c *gin.Context)
- func (s *Server) BulkReplaceStarredEvents(c *gin.Context)
- func (s *Server) CreateParty(c *gin.Context)
- func (s *Server) DeleteParty(c *gin.Context)
- func (s *Server) DeleteTicket(c *gin.Context)
- func (s *Server) GetAgenda(c *gin.Context)
- func (s *Server) GetCalendarMetadata(c *gin.Context)
- func (s *Server) GetMergeSuggestions(c *gin.Context)
- func (s *Server) GetParties(c *gin.Context)
- func (s *Server) GetParty(c *gin.Context)
- func (s *Server) GetPartyInterests(c *gin.Context)
- func (s *Server) GetStarredCalendarEvents(c *gin.Context)
- func (s *Server) GetStarredEvents(c *gin.Context)
- func (s *Server) GetStarredIndividualEvents(c *gin.Context)
- func (s *Server) GetStarredPageData(c *gin.Context)
- func (s *Server) GetTickets(c *gin.Context)
- func (s *Server) GetUpdateStatus(c *gin.Context)
- func (s *Server) GetUser(c *gin.Context)
- func (s *Server) GetWishlist(c *gin.Context)
- func (s *Server) GetWishlistConstraints(c *gin.Context)
- func (s *Server) JoinParty(c *gin.Context)
- func (s *Server) LeaveParty(c *gin.Context)
- func (s *Server) ListCategories(c *gin.Context)
- func (s *Server) LoadUserEvents(c *gin.Context)
- func (s *Server) LookupEvent(c *gin.Context)
- func (s *Server) MatchLocation(location, roomName, tableNumber string) string
- func (s *Server) MergeOrgs(c *gin.Context)
- func (s *Server) OptionalAuth() gin.HandlerFunc
- func (s *Server) PartyStream(c *gin.Context)
- func (s *Server) RegisterRoutes(group *gin.RouterGroup)
- func (s *Server) RenameParty(c *gin.Context)
- func (s *Server) RenameUser(c *gin.Context)
- func (s *Server) RespondTransfer(c *gin.Context)
- func (s *Server) SearchEvents(c *gin.Context)
- func (s *Server) StarEvent(c *gin.Context)
- func (s *Server) SyncTickets(c *gin.Context)
- func (s *Server) ToggleTicketReturn(c *gin.Context)
- func (s *Server) TransferLeadership(c *gin.Context)
- func (s *Server) TransferTicket(c *gin.Context)
- func (s *Server) UpdatePartyMemberInfo(c *gin.Context)
- func (s *Server) UpdateTicketPurchaser(c *gin.Context)
- func (s *Server) UpdateWishlistConstraints(c *gin.Context)
- func (s *Server) ViewOrgs(c *gin.Context)
- type StarEventRequest
- type StarredEventDetail
- type StarredPageData
- type SyncTicketsRequest
- type TransferLeadershipRequest
- type TransferTicketRequest
- type UpdatePartyMemberRequest
- type UpdateTicketPurchaserRequest
- type User
- type UserEvents
- type WishlistConstraint
- type WishlistItem
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 ¶
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 AuthService ¶
AuthService wraps authentication logic, typically Firebase.
type BulkReplaceRequest ¶
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 CreatePartyRequest ¶
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 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
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 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 ¶
FirebaseAuthWrapper implements AuthService using Firebase.
func (*FirebaseAuthWrapper) VerifyIDToken ¶
type GameCacheWrapper ¶
type GameCacheWrapper struct {
Cache *background.GameCache
}
GameCacheWrapper implements GameService using the background GameCache.
type GameService ¶
GameService wraps game metadata lookup logic.
type GameSystem ¶
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 PartyMember ¶
type PostgresRepository ¶
func (*PostgresRepository) AddPartyTicket ¶
func (r *PostgresRepository) AddPartyTicket(partyId int64, year int, eventId, purchaserEmail, genconRecipientName, holderEmail, ticketType string) (*postgres.PartyTicket, error)
func (*PostgresRepository) BulkStarEvents ¶
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 (*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 (*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) 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 (*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 (r *PostgresRepository) SearchEvents(ctx context.Context, q postgres.SearchQuery) ([]*postgres.EventGroup, error)
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 (*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 (*PostgresRepository) UpdateWishlistConstraints ¶
func (r *PostgresRepository) UpdateWishlistConstraints(email string, constraints []postgres.WishlistConstraint) error
type RenamePartyRequest ¶
type RenamePartyRequest struct {
Name string `json:"name"`
}
type RenameUserRequest ¶
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) AdminOnly ¶
func (s *Server) AdminOnly() gin.HandlerFunc
func (*Server) AuthMiddleware ¶
func (s *Server) AuthMiddleware() gin.HandlerFunc
func (*Server) BulkClearStarredEvents ¶
func (*Server) BulkReplaceStarredEvents ¶
func (*Server) CreateParty ¶
func (*Server) DeleteParty ¶
func (*Server) DeleteTicket ¶
func (*Server) GetCalendarMetadata ¶
func (*Server) GetMergeSuggestions ¶
func (*Server) GetParties ¶
func (*Server) GetPartyInterests ¶
func (*Server) GetStarredCalendarEvents ¶
func (*Server) GetStarredEvents ¶
func (*Server) GetStarredIndividualEvents ¶
func (*Server) GetStarredPageData ¶
func (*Server) GetTickets ¶
func (*Server) GetUpdateStatus ¶
func (*Server) GetWishlist ¶
func (*Server) GetWishlistConstraints ¶
func (*Server) LeaveParty ¶
func (*Server) ListCategories ¶
func (*Server) LoadUserEvents ¶
func (*Server) LookupEvent ¶
func (*Server) MatchLocation ¶
func (*Server) OptionalAuth ¶
func (s *Server) OptionalAuth() gin.HandlerFunc
func (*Server) PartyStream ¶
func (*Server) RegisterRoutes ¶
func (s *Server) RegisterRoutes(group *gin.RouterGroup)
func (*Server) RenameParty ¶
func (*Server) RenameUser ¶
func (*Server) RespondTransfer ¶
func (*Server) SearchEvents ¶
func (*Server) SyncTickets ¶
func (*Server) ToggleTicketReturn ¶
func (*Server) TransferLeadership ¶
func (*Server) TransferTicket ¶
func (*Server) UpdatePartyMemberInfo ¶
func (*Server) UpdateTicketPurchaser ¶
func (*Server) UpdateWishlistConstraints ¶
type StarEventRequest ¶
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 UpdateTicketPurchaserRequest ¶
type UpdateTicketPurchaserRequest struct {
PurchaserEmail string `json:"purchaserEmail" binding:"required"`
}
type UserEvents ¶
type WishlistConstraint ¶
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"`
}
Click to show internal directories.
Click to hide internal directories.