config

package
v0.0.0-...-2bffabc Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2021 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ShiftStateActive  = "active"
	ShiftStateDormant = "dormant"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AutoBlackjack

type AutoBlackjack struct {
	Enable            bool                         `yaml:"enable"`
	Priority          bool                         `yaml:"priority"`
	Amount            int                          `yaml:"amount"`
	PauseBelowBalance int                          `yaml:"pause_below_balance"`
	LogicTable        map[string]map[string]string `yaml:"logic_table"`
}

type AutoBuy

type AutoBuy struct {
	FishingPole  bool `yaml:"fishing_pole"`
	HuntingRifle bool `yaml:"hunting_rifle"`
	Laptop       bool `yaml:"laptop"`
}

type AutoGift

type AutoGift struct {
	Enable   bool     `yaml:"enable"`
	Interval int      `yaml:"interval"`
	Items    []string `yaml:"items"`
}

type AutoSell

type AutoSell struct {
	Enable   bool     `yaml:"enable"`
	Interval int      `yaml:"interval"`
	Items    []string `yaml:"items"`
}

type AutoShare

type AutoShare struct {
	Enable         bool `yaml:"enable"`
	Fund           bool `yaml:"fund"`
	MaximumBalance int  `yaml:"maximum_balance"`
	MinimumBalance int  `yaml:"minimum_balance"`
}

type AutoTidepod

type AutoTidepod struct {
	Enable              bool `yaml:"enable"`
	Interval            int  `yaml:"interval"`
	BuyLifesaverOnDeath bool `yaml:"buy_lifesaver_on_death"`
}

type BalanceCheck

type BalanceCheck struct {
	Enable   bool `yaml:"enable"`
	Interval int  `yaml:"interval"`
}

type Cluster

type Cluster struct {
	Master    Instance   `yaml:"master"`
	Instances []Instance `yaml:"instances"`
}

type Commands

type Commands struct {
	Beg      bool `yaml:"beg"`
	Postmeme bool `yaml:"postmeme"`
	Search   bool `yaml:"search"`
	Highlow  bool `yaml:"highlow"`
	Fish     bool `yaml:"fish"`
	Hunt     bool `yaml:"hunt"`
}

type Compat

type Compat struct {
	PostmemeOpts         []string `yaml:"postmeme"`
	AllowedSearches      []string `yaml:"allowed_searches"`
	SearchCancel         []string `yaml:"search_cancel"`
	Cooldown             Cooldown `yaml:"cooldown"`
	AwaitResponseTimeout int      `yaml:"await_response_timeout"`
}

type Config

type Config struct {
	Clusters           map[string]Cluster `yaml:"clusters"`
	Shifts             []Shift            `yaml:"shifts"`
	Features           Features           `yaml:"features"`
	Compat             Compat             `yaml:"compatibility"`
	SuspicionAvoidance SuspicionAvoidance `yaml:"suspicion_avoidance"`
}

func Load

func Load(path string) (Config, error)

Load loads the config from the expected path.

func (Config) Validate

func (c Config) Validate() error

type Cooldown

type Cooldown struct {
	Beg       int `yaml:"beg"`
	Fish      int `yaml:"fish"`
	Hunt      int `yaml:"hunt"`
	Postmeme  int `yaml:"postmeme"`
	Search    int `yaml:"search"`
	Highlow   int `yaml:"highlow"`
	Blackjack int `yaml:"blackjack"`
	Sell      int `yaml:"sell"`
	Gift      int `yaml:"gift"`
	Share     int `yaml:"share"`
}

type CustomCommand

type CustomCommand struct {
	Value             string `yaml:"value"`
	Interval          int    `yaml:"interval"`
	Amount            int    `yaml:"amount"`
	PauseBelowBalance int    `yaml:"pause_below_balance"`
}

type Duration

type Duration struct {
	Base      int `yaml:"base"`      // A base duration in seconds.
	Variation int `yaml:"variation"` // A random value in seconds from [0,n) added to the base.
}

Duration is not related to a time.Duration. It is a structure used in a Shift type.

type Features

type Features struct {
	Commands           Commands        `yaml:"commands"`
	CustomCommands     []CustomCommand `yaml:"custom_commands"`
	AutoBuy            AutoBuy         `yaml:"auto_buy"`
	AutoSell           AutoSell        `yaml:"auto_sell"`
	AutoGift           AutoGift        `yaml:"auto_gift"`
	AutoBlackjack      AutoBlackjack   `yaml:"auto_blackjack"`
	AutoShare          AutoShare       `yaml:"auto_share"`
	AutoTidepod        AutoTidepod     `yaml:"auto_tidepod"`
	BalanceCheck       BalanceCheck    `yaml:"balance_check"`
	LogToFile          bool            `yaml:"log_to_file"`
	VerboseLogToStdout bool            `yaml:"verbose_log_to_stdout"`
	Debug              bool            `yaml:"debug"`
}

type Instance

type Instance struct {
	Token              string             `yaml:"token"`
	ChannelID          string             `yaml:"channel_id"`
	Features           Features           `yaml:"-"`
	SuspicionAvoidance SuspicionAvoidance `yaml:"-"`
	Shifts             []Shift            `yaml:"-"`
}

type MessageDelay

type MessageDelay struct {
	Base      int `yaml:"base"`      // A base duration in milliseconds.
	Variation int `yaml:"variation"` // A random value in milliseconds from [0,n) added to the base.
}

type Shift

type Shift struct {
	State    string   `yaml:"state"`
	Duration Duration `yaml:"duration"`
}

Shift indicates an application state (active or dormant) for a duration.

type SuspicionAvoidance

type SuspicionAvoidance struct {
	Typing       Typing       `yaml:"typing"`
	MessageDelay MessageDelay `yaml:"message_delay"`
}

type Typing

type Typing struct {
	Base      int `yaml:"base"`      // A base duration in milliseconds.
	Speed     int `yaml:"speed"`     // Speed in keystrokes per minute.
	Variation int `yaml:"variation"` // A random value in milliseconds from [0,n) added to the base.
}

Jump to

Keyboard shortcuts

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