config

package
v0.0.28 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2022 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LanguageEnglish    = Language("eng")
	LanguagePortuguese = Language("por")
	LanguageRussian    = Language("rus")
	LanguageThai       = Language("tha")
	LanguageFrench     = Language("fra")
	LanguageGerman     = Language("deu")
	LanguageSpanish    = Language("spa")
	LanguageChinese    = Language("chi_sim")
	LanguageKorean     = Language("kor")
	LanguageJapanese   = Language("jpn")
	LanguageTaiwanese  = Language("chi_tra")
)
View Source
const (
	LeagueStandard = League("std")
	LeagueSoftcore = League("lsc")
	LeagueHardcore = League("lhc")
)

Variables

This section is empty.

Functions

func AddListings

func AddListings(ctx context.Context, listings []types.ParsedListing) error

func ClearListings

func ClearListings(ctx context.Context) error

func GetConfigDir

func GetConfigDir() (string, error)

func InitConfig

func InitConfig() error

func Load

func Load() error

func Save

func Save() error

func SetDisplay

func SetDisplay(ctx context.Context, display int) error

func SetLanguage

func SetLanguage(ctx context.Context, language string) error

func SetLeague

func SetLeague(ctx context.Context, league string) error

func SetListing

func SetListing(ctx context.Context, listing string, level int, count int) error

func SetName

func SetName(ctx context.Context, name string) error

func SetPrice

func SetPrice(ctx context.Context, listing string, price string) error

func SetScaling

func SetScaling(ctx context.Context, scaling float64) error

func SetShortcut

func SetShortcut(ctx context.Context, shortcut []string) error

func SetStream

func SetStream(ctx context.Context, stream bool) error

Types

type Config

type Config struct {
	Version  int                    `json:"version"`
	Scaling  float64                `json:"scaling"`
	Prices   map[string]string      `json:"prices"`
	Listings map[string]map[int]int `json:"listings"`
	Language Language               `json:"language"`
	League   League                 `json:"league"`
	Messages map[string]string      `json:"messages"`
	Name     string                 `json:"name"`
	Stream   bool                   `json:"stream"`
	Display  int                    `json:"display"`
	Shortcut []string               `json:"shortcut"`
}
var Cfg Config

func Get

func Get() Config

type Language

type Language string

type League

type League string

Jump to

Keyboard shortcuts

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