v1

package
v0.0.0-...-1e8b999 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2023 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type API

type API struct {
	Status string `json:"status"`
	Router *echo.Group
	//Router *mux.Router
	Hunts
}

func (*API) CreateChallenge

func (api *API) CreateChallenge(c echo.Context) error

func (*API) CreateHunt

func (api *API) CreateHunt(c echo.Context) error

func (*API) DeleteChallenge

func (api *API) DeleteChallenge(c echo.Context) error

func (*API) DeleteHunt

func (api *API) DeleteHunt(c echo.Context) error

func (*API) GetHunt

func (api *API) GetHunt(c echo.Context) error

func (*API) GetHuntAdmin

func (api *API) GetHuntAdmin(c echo.Context) error

func (*API) GetHunts

func (api *API) GetHunts(c echo.Context) error

func (*API) HuntImport

func (api *API) HuntImport(c echo.Context) error

func (*API) InitializeRoutes

func (api *API) InitializeRoutes(apiRouter *echo.Group)

func (*API) SubmitAnswer

func (api *API) SubmitAnswer(c echo.Context) error

func (*API) UpdateChallenge

func (api *API) UpdateChallenge(c echo.Context) error

func (*API) UpdateHunt

func (api *API) UpdateHunt(c echo.Context) error

type Answer

type Answer struct {
	Answer   string   `json:"answer"`
	Location Location `json:"location"`
}

type Challenge

type Challenge struct {
	Type                string `json:"type"`
	Question            string `json:"question"`
	ChallengeQuestionId int    `json:"challenge_question_id"`
}

type ChallengeBody

type ChallengeBody struct {
	Type                string   `json:"type"`
	Question            string   `json:"question"`
	Correct             bool     `json:"correct"`
	Location            Location `json:"location"`
	ChallengeQuestionId int      `json:"challenge_question_id"`
}

type ChallengePayload

type ChallengePayload struct {
	Type                string   `json:"type"`
	Question            string   `json:"question"`
	Answer              string   `json:"answer"`
	Location            Location `json:"location"`
	ChallengeQuestionId int      `json:"challenge_question_id"`
}

type Hunt

type Hunt struct {
	Name       string          `json:"name"`
	Location   Location        `json:"location"`
	Challenges []ChallengeBody `json:"challenges"`
	HuntId     int             `json:"hunt_id"`
}

type HuntAdmin

type HuntAdmin struct {
	Name       string             `json:"name"`
	Location   Location           `json:"location"`
	Challenges []ChallengePayload `json:"challenges"`
	HuntId     int                `json:"hunt_id"`
}

type Hunts

type Hunts struct {
	Name  string `json:"name"`
	Hunts []Hunt `json:"hunts"`
}
var CurrentHunts Hunts

type Import

type Import struct {
	Source string `json:"source"`
	Path   string `json:"path"`
	URL    string `json:"URL"`
}

type Location

type Location struct {
	Longitude float64 `json:"longitude"`
	Latitude  float64 `json:"latitude"`
}

type Middleware

type Middleware func(http.HandlerFunc) http.HandlerFunc

Jump to

Keyboard shortcuts

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