Documentation ¶
Index ¶
- Constants
- func SetChangeIDHeader(c echo.Context, id int64)
- func Start(ctx context.Context, prod bool, ably *ably.Realtime, discord *discord.Client, ...)
- type AuthenticateParams
- type AuthenticateResponse
- type DiscoveryParams
- type IDParams
- type PuzzleParams
- type RoundParams
- type Server
- func (s *Server) Authenticate(c echo.Context) error
- func (s *Server) AuthenticationMiddleware(next echo.HandlerFunc) echo.HandlerFunc
- func (s *Server) CreatePuzzle(c echo.Context) error
- func (s *Server) CreateRound(c echo.Context) error
- func (s *Server) DeletePuzzle(c echo.Context) error
- func (s *Server) DeleteRound(c echo.Context) error
- func (s *Server) ErrorHandler(err error, c echo.Context)
- func (s *Server) GetDiscovery(c echo.Context) error
- func (s *Server) GetPuzzle(c echo.Context) error
- func (s *Server) GetRound(c echo.Context) error
- func (s *Server) ListHome(c echo.Context) error
- func (s *Server) ListPuzzles(c echo.Context) error
- func (s *Server) ListRounds(c echo.Context) error
- func (s *Server) RequestAblyToken(c echo.Context) error
- func (s *Server) SentryMiddleware(next echo.HandlerFunc) echo.HandlerFunc
- func (s *Server) TestDiscovery(c echo.Context) error
- func (s *Server) UpdateDiscovery(c echo.Context) error
- func (s *Server) UpdatePuzzle(c echo.Context) error
- func (s *Server) UpdateRound(c echo.Context) error
Constants ¶
View Source
const ( SessionDuration = 4 * 24 * time.Hour OAuth2TokenURL = "https://discord.com/api/v10/oauth2/token" DevRedirectURI = "http://localhost:3000/login" ProdRedirectURI = "https://www.emojihunt.org/login" CookieName = "session" )
Variables ¶
This section is empty.
Functions ¶
func SetChangeIDHeader ¶
func SetChangeIDHeader(c echo.Context, id int64)
Types ¶
type AuthenticateParams ¶
type AuthenticateParams struct {
Code string `form:"code"`
}
type AuthenticateResponse ¶
type AuthenticateResponse struct {
Username string `json:"username"`
}
type DiscoveryParams ¶
type DiscoveryParams struct { PuzzlesURL string `form:"puzzles_url"` CookieName string `form:"cookie_name"` CookieValue string `form:"cookie_value"` GroupMode bool `form:"group_mode"` GroupSelector string `form:"group_selector"` RoundNameSelector string `form:"round_name_selector"` PuzzleListSelector string `form:"puzzle_list_selector"` PuzzleItemSelector string `form:"puzzle_item_selector"` WebsocketURL string `form:"websocket_url"` WebsocketToken string `form:"websocket_token"` }
type PuzzleParams ¶
type PuzzleParams struct { ID int64 `param:"id"` Name string `form:"name"` Answer string `form:"answer"` Round int64 `form:"round"` Status status.Status `form:"status"` Note string `form:"note"` Location string `form:"location"` PuzzleURL string `form:"puzzle_url"` SpreadsheetID string `form:"spreadsheet_id"` DiscordChannel string `form:"discord_channel"` Meta bool `form:"meta"` VoiceRoom string `form:"voice_room"` Reminder time.Time `form:"reminder"` }
type RoundParams ¶
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
func (*Server) Authenticate ¶
func (*Server) AuthenticationMiddleware ¶
func (s *Server) AuthenticationMiddleware(next echo.HandlerFunc) echo.HandlerFunc
func (*Server) CreatePuzzle ¶
func (*Server) CreateRound ¶
func (*Server) DeletePuzzle ¶
func (*Server) DeleteRound ¶
func (*Server) ErrorHandler ¶
func (*Server) GetDiscovery ¶
func (*Server) ListPuzzles ¶
func (*Server) ListRounds ¶
func (*Server) RequestAblyToken ¶
func (*Server) SentryMiddleware ¶
func (s *Server) SentryMiddleware(next echo.HandlerFunc) echo.HandlerFunc
func (*Server) TestDiscovery ¶
func (*Server) UpdateDiscovery ¶
func (*Server) UpdatePuzzle ¶
func (*Server) UpdateRound ¶
Click to show internal directories.
Click to hide internal directories.