routes

package
v0.0.0-...-091610c Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2024 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ClaimMainQuestDevnet

func ClaimMainQuestDevnet(w http.ResponseWriter, r *http.Request)

func ClaimTodayQuestDevnet

func ClaimTodayQuestDevnet(w http.ResponseWriter, r *http.Request)

func GetAllColors

func GetAllColors(w http.ResponseWriter, r *http.Request)

func GetCompletedDailyQuests

func GetCompletedDailyQuests(w http.ResponseWriter, r *http.Request)

func GetCompletedMainQuests

func GetCompletedMainQuests(w http.ResponseWriter, r *http.Request)

func GetDailyQuestProgress

func GetDailyQuestProgress(w http.ResponseWriter, r *http.Request)

func GetDailyQuests

func GetDailyQuests(w http.ResponseWriter, r *http.Request)

func GetMainQuestProgress

func GetMainQuestProgress(w http.ResponseWriter, r *http.Request)

func GetMainQuests

func GetMainQuests(w http.ResponseWriter, r *http.Request)

func GetMainUserQuests

func GetMainUserQuests(w http.ResponseWriter, r *http.Request)

func GetSingleColor

func GetSingleColor(w http.ResponseWriter, r *http.Request)

func GetTodayQuestProgress

func GetTodayQuestProgress(w http.ResponseWriter, r *http.Request)

func GetTodayStartTime

func GetTodayStartTime(w http.ResponseWriter, r *http.Request)

func GetUserQuestStatus

func GetUserQuestStatus(w http.ResponseWriter, r *http.Request)

func GetVotableColorsWithVoteCount

func GetVotableColorsWithVoteCount(w http.ResponseWriter, r *http.Request)

func IncreaseDayDevnet

func IncreaseDayDevnet(w http.ResponseWriter, r *http.Request)

func InitBaseRoutes

func InitBaseRoutes()

func InitCanvasRoutes

func InitCanvasRoutes()

func InitColors

func InitColors(w http.ResponseWriter, r *http.Request)

func InitColorsRoutes

func InitColorsRoutes()

func InitContractRoutes

func InitContractRoutes()

func InitFactionRoutes

func InitFactionRoutes()

func InitNFTRoutes

func InitNFTRoutes()

func InitNFTStaticRoutes

func InitNFTStaticRoutes()

func InitPixelRoutes

func InitPixelRoutes()

func InitQuests

func InitQuests(w http.ResponseWriter, r *http.Request)

func InitQuestsRoutes

func InitQuestsRoutes()

func InitRoutes

func InitRoutes()

func InitStencilsRoutes

func InitStencilsRoutes()

func InitStencilsStaticRoutes

func InitStencilsStaticRoutes()

func InitTemplateRoutes

func InitTemplateRoutes()

func InitUserRoutes

func InitUserRoutes()

func InitVotableColors

func InitVotableColors(w http.ResponseWriter, r *http.Request)

func InitVotableColorsRoutes

func InitVotableColorsRoutes()

func InitWebsocketRoutes

func InitWebsocketRoutes()

func InitWorldsRoutes

func InitWorldsRoutes()

TODO: check-worlds-name-unique?

func InitWorldsStaticRoutes

func InitWorldsStaticRoutes()

Types

type ClaimParamConfig

type ClaimParamConfig struct {
	Type    string `json:"type"`
	Name    string `json:"name"`
	Example string `json:"example"`
	Input   bool   `json:"input"`
}

type ClaimParams

type ClaimParams struct {
	QuestId   int    `json:"questId"`
	ClaimType string `json:"claimType"`
	Name      string `json:"name"`
	Example   string `json:"example"`
	Input     bool   `json:"input"`
}

type ColorType

type ColorType = string

type DailyQuest

type DailyQuest struct {
	Name        string        `json:"name"`
	Description string        `json:"description"`
	Reward      int           `json:"reward"`
	DayIndex    int           `json:"dayIndex"`
	QuestId     int           `json:"questId"`
	ClaimParams []ClaimParams `json:"claimParams"`
}

type DailyQuestConfig

type DailyQuestConfig struct {
	Day    int           `json:"day"`
	Quests []QuestConfig `json:"quests"`
}

type DailyUserQuest

type DailyUserQuest struct {
	Name        string        `json:"name"`
	Description string        `json:"description"`
	Reward      int           `json:"reward"`
	DayIndex    int           `json:"dayIndex"`
	QuestId     int           `json:"questId"`
	Completed   bool          `json:"completed"`
	ClaimParams []ClaimParams `json:"claimParams"`
}

type ExtraPixelJson

type ExtraPixelJson struct {
	ExtraPixels []map[string]int `json:"extraPixels"`
	Timestamp   int              `json:"timestamp"`
}

type FactionData

type FactionData struct {
	FactionId int    `json:"factionId"`
	Name      string `json:"name"`
	Leader    string `json:"leader"`
	Members   int    `json:"members"`
	IsMember  bool   `json:"isMember"`
	Joinable  bool   `json:"joinable"`
	Icon      string `json:"icon"`
	Telegram  string `json:"telegram"`
	Twitter   string `json:"twitter"`
	Github    string `json:"github"`
	Site      string `json:"site"`
}

type FactionMemberData

type FactionMemberData struct {
	Username        string `json:"username"`
	UserAddress     string `json:"userAddress"`
	TotalAllocation int    `json:"totalAllocation"`
}

type FactionTemplateData

type FactionTemplateData struct {
	TemplateId int    `json:"templateId"`
	Hash       string `json:"hash"`
	Width      int    `json:"width"`
	Height     int    `json:"height"`
	Position   int    `json:"position"`
}

type FactionUserData

type FactionUserData struct {
	FactionId  int    `json:"factionId"`
	Allocation int    `json:"allocation"`
	Name       string `json:"name"`
	Leader     string `json:"leader"`
	Members    int    `json:"members"`
	Joinable   bool   `json:"joinable"`
	Icon       string `json:"icon"`
	Telegram   string `json:"telegram"`
	Twitter    string `json:"twitter"`
	Github     string `json:"github"`
	Site       string `json:"site"`
}

type FactionsConfig

type FactionsConfig struct {
	Factions      []FactionsConfigItem `json:"factions"`
	ChainFactions []string             `json:"chain_factions"`
}

type FactionsConfigItem

type FactionsConfigItem struct {
	Id        int    `json:"id"`
	Name      string `json:"name"`
	Icon      string `json:"icon"`
	Leader    string `json:"leader"`
	Pool      int    `json:"pool"`
	PerMember bool   `json:"per_member"`
	Joinable  bool   `json:"joinable"`
	Links     struct {
		Telegram string `json:"telegram"`
		Twitter  string `json:"twitter"`
		Github   string `json:"github"`
		Site     string `json:"site"`
	} `json:"links"`
	Members []string `json:"members"`
}

type GameData

type GameData struct {
	Day     int    `json:"day"`
	EndTime int    `json:"endTime"`
	Host    string `json:"host"`
}

type MainQuest

type MainQuest struct {
	QuestId     int           `json:"questId"`
	Name        string        `json:"name"`
	Description string        `json:"description"`
	Reward      int           `json:"reward"`
	ClaimParams []ClaimParams `json:"claimParams"`
}

type MainUserQuest

type MainUserQuest struct {
	QuestId     int           `json:"questId"`
	Name        string        `json:"name"`
	Description string        `json:"description"`
	Reward      int           `json:"reward"`
	Completed   bool          `json:"completed"`
	ClaimParams []ClaimParams `json:"claimParams"`
}

type MembershipPixelsData

type MembershipPixelsData struct {
	FactionId      int        `json:"factionId"`
	Allocation     int        `json:"allocation"`
	LastPlacedTime *time.Time `json:"lastPlacedTime"`
	MemberPixels   int        `json:"memberPixels"`
}

type NFTData

type NFTData struct {
	TokenID     int    `json:"tokenId"`
	Position    int    `json:"position"`
	Width       int    `json:"width"`
	Height      int    `json:"height"`
	Name        string `json:"name"`
	ImageHash   string `json:"imageHash"`
	BlockNumber int    `json:"blockNumber"`
	DayIndex    int    `json:"dayIndex"`
	Minter      string `json:"minter"`
	Owner       string `json:"owner"`
	Likes       int    `json:"likes"`
	Liked       bool   `json:"liked"`
}

type NFTLikesRequest

type NFTLikesRequest struct {
	NFTKey      int    `json:"nftkey"`
	UserAddress string `json:"useraddress"`
}

type PixelInfo

type PixelInfo struct {
	Address string `json:"address"`
	Name    string `json:"username"`
}

type QuestConfig

type QuestConfig struct {
	Name           string              `json:"name"`
	Description    string              `json:"description"`
	Reward         int                 `json:"reward"`
	ContractConfig QuestContractConfig `json:"questContract"`
}

type QuestContractConfig

type QuestContractConfig struct {
	Type        string             `json:"type"`
	InitParams  []string           `json:"initParams"`
	StoreParams []int              `json:"storeParams"`
	ClaimParams []ClaimParamConfig `json:"claimParams"`
}

type QuestProgress

type QuestProgress struct {
	QuestId  int   `json:"questId"`
	Progress int   `json:"progress"`
	Needed   int   `json:"needed"`
	Calldata []int `json:"calldata"`
}

type QuestStatus

type QuestStatus struct {
	Progress int `json:"progress"`
	Needed   int `json:"needed"`
}

type QuestTypes

type QuestTypes struct {
	QuestId   int    `json:"questId"`
	QuestType string `json:"questType"`
}

type QuestsConfig

type QuestsConfig struct {
	DailyQuests struct {
		DailyQuestsCount int                `json:"dailyQuestsCount"`
		Quests           []DailyQuestConfig `json:"dailyQuests"`
	} `json:"daily"`
	MainQuests struct {
		Quests []QuestConfig `json:"mainQuests"`
	} `json:"main"`
}

type StencilData

type StencilData struct {
	StencilId int    `json:"stencilId"`
	WorldId   int    `json:"worldId"`
	Name      string `json:"name"`
	Hash      string `json:"hash"`
	Width     int    `json:"width"`
	Height    int    `json:"height"`
	Position  int    `json:"position"`
	Favorites int    `json:"favorites"`
	Favorited bool   `json:"favorited"`
}

type TemplateData

type TemplateData struct {
	Key         int    `json:"key"`
	Name        string `json:"name"`
	Hash        string `json:"hash"`
	Width       int    `json:"width"`
	Height      int    `json:"height"`
	Position    int    `json:"position"`
	Reward      int    `json:"reward"`
	RewardToken string `json:"rewardToken"`
}

type UserRewardsData

type UserRewardsData struct {
	Address string `json:"address"`
	Amount  int    `json:"amount"`
	Type    string `json:"type"`
}

type VotableColor

type VotableColor struct {
	Key   int    `json:"key"`
	Hex   string `json:"hex"`
	Votes int    `json:"votes"`
}

type WorldData

type WorldData struct {
	WorldId           int        `json:"worldId"`
	Host              string     `json:"host"`
	Name              string     `json:"name"`
	Width             int        `json:"width"`
	Height            int        `json:"height"`
	TimeBetweenPixels int        `json:"timeBetweenPixels"`
	StartTime         *time.Time `json:"startTime"`
	EndTime           *time.Time `json:"endTime"`
	Favorites         int        `json:"favorites"`
	Favorited         bool       `json:"favorited"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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