commands

package
v2.0.3+incompatible Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2018 License: MIT Imports: 9 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrCharacterExists = errors.New("character already exists")

ErrCharacterExists is the error returned when a character already exists

View Source
var ErrCharacterNameRequired = errors.New("character name required")

ErrCharacterNameRequired is the error returned when a character name is missing

View Source
var ErrItemNameRequired = errors.New("item name required")

ErrItemNameRequired is the error returned when an item name is required

View Source
var ErrPositiveValueRequired = errors.New("positive value required")

ErrPositiveValueRequired is the error returned when a positive value is required

View Source
var ErrSkillNameRequired = errors.New("skill name required")

ErrSkillNameRequired is the error returned when a skill name is required

Functions

func CharCommandHandler

func CharCommandHandler(deps dependencies, preCommand string) (*cmdhandler.CommandHandler, error)

CharCommandHandler creates a command handler for !char commands

func CommandHandler

func CommandHandler(deps dependencies, versionStr string, opts Options) (*cmdhandler.CommandHandler, error)

CommandHandler creates a new command handler for !char, !need, !got, and !list

func ConfigCommandHandler

func ConfigCommandHandler(deps configDependencies, versionStr, preCommand string) (*cmdhandler.CommandHandler, error)

ConfigCommandHandler creates a handler for !config-hw commands

func ConfigHandler

func ConfigHandler(deps configDependencies, versionStr string, opts Options) (*cmdhandler.CommandHandler, error)

ConfigHandler creates a new command handler for !config-hw

func GotCommandHandler

func GotCommandHandler(deps dependencies, preCommand string) (*cmdhandler.CommandHandler, error)

GotCommandHandler creates a new command handler for !got commands

func ListCommandHandler

func ListCommandHandler(deps dependencies, preCommand string) (*cmdhandler.CommandHandler, error)

ListCommandHandler creates a command handler for !list commands

func NeedCommandHandler

func NeedCommandHandler(deps dependencies, preCommand string) (*cmdhandler.CommandHandler, error)

NeedCommandHandler creates a new command handler for !need commands

Types

type Options

type Options struct {
	CmdIndicator string
}

Options enables setting the command indicator string for a CommandHandler

Jump to

Keyboard shortcuts

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