elemcraft

package
v0.0.0-...-531763a Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2023 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const MinVotes = 3

Variables

This section is empty.

Functions

func RecipeToString

func RecipeToString(recipe [][]int) string

func StartElemCraft

func StartElemCraft()

func StripRecipe

func StripRecipe(recipe [][]int) [][]int

Types

type ElemCraft

type ElemCraft struct {
	// contains filtered or unexported fields
}

func (*ElemCraft) Combo

func (e *ElemCraft) Combo(c echo.Context) error

func (*ElemCraft) Existing

func (e *ElemCraft) Existing(c echo.Context) error

func (*ElemCraft) GetElement

func (e *ElemCraft) GetElement(c echo.Context) error

func (*ElemCraft) Handlers

func (e *ElemCraft) Handlers()

func (*ElemCraft) Suggest

func (e *ElemCraft) Suggest(c echo.Context) error

func (*ElemCraft) Vote

func (e *ElemCraft) Vote(c echo.Context, id string, user *models.User) error

type Element

type Element struct {
	ID          int    `json:"id"`
	Name        string `json:"name"`
	Color       int    `json:"color"`
	Description string `json:"description"`
	Creator     string `json:"creator"`
	Created     int    `json:"created"`
}

type ExistingSuggestion

type ExistingSuggestion struct {
	Name        string  `json:"name"`
	Color       float64 `json:"color"`
	Description string  `json:"description"`
}

type SuggestionRequest

type SuggestionRequest struct {
	Recipe      [][]int `json:"recipe"`
	Name        string  `json:"name"`
	Color       int     `json:"color"`
	Description string  `json:"description"`
}

Jump to

Keyboard shortcuts

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