input

package
v0.0.0-...-bcdb591 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2021 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Price = ActionType(iota)
	Help
	Set
	Close
)

Variables

View Source
var CraftTypeToName = map[database.CraftType]string{
	database.Alchemy:    "Alchemy",
	database.Armor:      "Armorsmith",
	database.Cooking:    "Cooking",
	database.Tailor:     "Tailoring",
	database.Weapon:     "Weaponsmith",
	database.Handicraft: "Handicraft",
}

Functions

This section is empty.

Types

type ActionType

type ActionType int

type CLI

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

func (*CLI) Start

func (c *CLI) Start(cmdc chan Command, outc chan string)

type Command

type Command struct {
	Action ActionType
	Race   database.Race
	Item   string
	Price  int
	Out    chan string
}

type Discord

type Discord struct {
	Token      string
	Guilds     map[string]*Guild
	SaveNeeded bool
	// contains filtered or unexported fields
}

func NewDiscord

func NewDiscord(token string) *Discord

func NewDiscordFromJson

func NewDiscordFromJson(data []byte) (*Discord, error)

func (*Discord) Save

func (d *Discord) Save() ([]byte, error)

func (*Discord) Start

func (d *Discord) Start(cmdc chan Command, outc chan string)

type Guild

type Guild struct {
	Race           database.Race
	IsRaceSelected bool
	// contains filtered or unexported fields
}

type InputController

type InputController interface {
	Start(cmd chan Command, out chan string)
}

type Processor

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

func NewProcessor

func NewProcessor(db *database.Database) *Processor

func (*Processor) Help

func (p *Processor) Help(cmd Command) string

func (*Processor) Price

func (p *Processor) Price(cmd Command) string

func (*Processor) Set

func (p *Processor) Set(cmd Command) string

func (*Processor) Work

func (p *Processor) Work(inputs []InputController)

Jump to

Keyboard shortcuts

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