util

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2024 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	SkillsMap = map[string]struct{}{
		"attack":       {},
		"defence":      {},
		"strength":     {},
		"hitpoints":    {},
		"ranged":       {},
		"prayer":       {},
		"magic":        {},
		"cooking":      {},
		"woodcutting":  {},
		"fletching":    {},
		"fishing":      {},
		"firemaking":   {},
		"crafting":     {},
		"smithing":     {},
		"mining":       {},
		"herblore":     {},
		"agility":      {},
		"thieving":     {},
		"slayer":       {},
		"farming":      {},
		"runecraft":    {},
		"hunter":       {},
		"construction": {},
	}

	MinigamesMap = map[string]struct{}{
		"Bounty Hunter - Hunter":            {},
		"Bounty Hunter - Rogue":             {},
		"Bounty Hunter (Legacy) - Hunter":   {},
		"Bounty Hunter (Legacy) - Rogue":    {},
		"Clue Scrolls (all)":                {},
		"Clue Scrolls (beginner)":           {},
		"Clue Scrolls (easy)":               {},
		"Clue Scrolls (medium)":             {},
		"Clue Scrolls (hard)":               {},
		"Clue Scrolls (elite)":              {},
		"Clue Scrolls (master)":             {},
		"LMS - Rank":                        {},
		"PvP Arena - Rank":                  {},
		"Soul Wars Zeal":                    {},
		"Rifts closed":                      {},
		"Abyssal Sire":                      {},
		"Alchemical Hydra":                  {},
		"Artio":                             {},
		"Barrows Chests":                    {},
		"Bryophyta":                         {},
		"Callisto":                          {},
		"Calvar'ion":                        {},
		"Cerberus":                          {},
		"Chambers of Xeric":                 {},
		"Chambers of Xeric: Challenge Mode": {},
		"Chaos Elemental":                   {},
		"Chaos Fanatic":                     {},
		"Commander Zilyana":                 {},
		"Corporeal Beast":                   {},
		"Crazy Archaeologist":               {},
		"Dagannoth Prime":                   {},
		"Dagannoth Rex":                     {},
		"Dagannoth Supreme":                 {},
		"Deranged Archaeologist":            {},
		"Duke Sucellus":                     {},
		"General Graardor":                  {},
		"Giant Mole":                        {},
		"Grotesque Guardians":               {},
		"Hespori":                           {},
		"Kalphite Queen":                    {},
		"King Black Dragon":                 {},
		"Kraken":                            {},
		"Kree'Arra":                         {},
		"K'ril Tsutsaroth":                  {},
		"Mimic":                             {},
		"Nex":                               {},
		"Nightmare":                         {},
		"Phosani's Nightmare":               {},
		"Obor":                              {},
		"Phantom Muspah":                    {},
		"Sarachnis":                         {},
		"Scorpia":                           {},
		"Skotizo":                           {},
		"Spindel":                           {},
		"Tempoross":                         {},
		"The Gauntlet":                      {},
		"The Corrupted Gauntlet":            {},
		"The Leviathan":                     {},
		"The Whisperer":                     {},
		"Theatre of Blood":                  {},
		"Theatre of Blood: Hard Mode":       {},
		"Thermonuclear Smoke Devil":         {},
		"Tombs of Amascut":                  {},
		"Tombs of Amascut: Expert Mode":     {},
		"TzKal-Zuk":                         {},
		"TzTok-Jad":                         {},
		"Vardorvis":                         {},
		"Venenatis":                         {},
		"Vet'ion":                           {},
		"Vorkath":                           {},
		"Wintertodt":                        {},
		"Zalcano":                           {},
		"Zulrah":                            {},
		"Deadman Points":                    {},
		"League Points":                     {},
		"Colosseum Glory":                   {},
	}
)

Functions

func CaptchaFailed

func CaptchaFailed(c fiber.Ctx) error

func ConvertStringArrayToInterfaceArray

func ConvertStringArrayToInterfaceArray(stringArray []string) []interface{}

ConvertStringArrayToInterfaceArray converts a slice of strings to a slice of interfaces

func DecodeJSONToFloat64Map

func DecodeJSONToFloat64Map(data []byte) map[string]float64

func DecodeJSONToInt64Map

func DecodeJSONToInt64Map(data []byte) map[string]int64

func DecodeJSONToIntMap

func DecodeJSONToIntMap(data []byte) map[string]int

func ErrorResponse

func ErrorResponse(c fiber.Ctx, message string) error

func GenerateNonce

func GenerateNonce() (string, error)

GenerateNonce creates a secure random nonce

func InternalServerError

func InternalServerError(c fiber.Ctx) error

func InvalidCredentials

func InvalidCredentials(c fiber.Ctx) error

func NoPlayersFound

func NoPlayersFound(c fiber.Ctx) error

func StringToIntText

func StringToIntText(text string) (int, error)

func Unauthorized

func Unauthorized(c fiber.Ctx) error

func ValidMinigame

func ValidMinigame(minigame string) bool

func ValidSkill

func ValidSkill(skill string) bool

func ValidateSkills

func ValidateSkills(skills []string) (validSkills []string)

Types

This section is empty.

Jump to

Keyboard shortcuts

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