Documentation ¶
Index ¶
- Constants
- Variables
- func Encrypt(str string) (string, error)
- func Format(n int) string
- func FromSuffixed(value string) (int, error)
- func GetMD5(text string) string
- func GetStats(username string) (map[int]Stat, error)
- func LevelFromXP(skill Skill, xp int) int
- func LoadFont(fontFile string) *truetype.Font
- func ParseUsername(username string) string
- func ServeResultPage(writer http.ResponseWriter, url string)
- func XPForLevel(skill Skill, level int) int
- func XPToLevel(skill Skill, currentXp, targetLevel int) int
- type GoalType
- type ParsedSignatureRequest
- type QueryParameter
- type Signature
- type SignatureRequest
- type Skill
- type Stat
Constants ¶
View Source
const ( LevelMax = 126 InventionLevelMax = 150 InventionId = 26 )
Variables ¶
View Source
var ( SkillNames = []string{ "Attack", "Defence", "Strength", "Constitution", "Ranged", "Prayer", "Magic", "Cooking", "Woodcutting", "Fletching", "Fishing", "Firemaking", "Crafting", "Smithing", "Mining", "Herblore", "Agility", "Thieving", "Slayer", "Farming", "Runecrafting", "Hunter", "Construction", "Summoning", "Dungeoneering", "Divination", "Invention", } ExpThresholds []int Skills = map[int]Skill{} InventionExpThresholds = []int{}/* 150 elements not displayed */ )
todo: shortened names, no params, total level, front page form
View Source
var ( UsernameRegex = regexp.MustCompile("^_?[a-zA-Z0-9-_+]+$") AesKey []byte )
Functions ¶
func FromSuffixed ¶
func LevelFromXP ¶
func ParseUsername ¶
func ServeResultPage ¶
func ServeResultPage(writer http.ResponseWriter, url string)
func XPForLevel ¶
Types ¶
type ParsedSignatureRequest ¶
type ParsedSignatureRequest struct {
// contains filtered or unexported fields
}
func NewSignatureRequest ¶
func NewSignatureRequest() ParsedSignatureRequest
func (ParsedSignatureRequest) AddProperty ¶
func (s ParsedSignatureRequest) AddProperty(name string, value interface{})
func (ParsedSignatureRequest) GetProperty ¶
func (s ParsedSignatureRequest) GetProperty(name string) interface{}
type QueryParameter ¶
func ParseQueryParameters ¶
func ParseQueryParameters(query string) (params []QueryParameter, err error)
Parse query parameters and return them in the right order
type SignatureRequest ¶
type SignatureRequest struct { Req ParsedSignatureRequest Hash string }
Click to show internal directories.
Click to hide internal directories.