commands

package
v0.0.0-...-5edf6af Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateCommands

func CreateCommands() map[string]Command

Types

type CatchCommand

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

func NewCatchCommand

func NewCatchCommand(config *Config) *CatchCommand

func (*CatchCommand) Description

func (c *CatchCommand) Description() string

func (*CatchCommand) Execute

func (c *CatchCommand) Execute(arg any) error

func (*CatchCommand) Name

func (c *CatchCommand) Name() string

type Command

type Command interface {
	Name() string
	Description() string
	Execute(arg any) error
}

type Config

type Config struct {
	Commands map[string]Command
	Pokemons map[string]Pokemon
	Cache    cache.Cache
	// contains filtered or unexported fields
}

type ExitCommand

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

func NewExitCommand

func NewExitCommand(config *Config) *ExitCommand

func (*ExitCommand) Description

func (c *ExitCommand) Description() string

func (*ExitCommand) Execute

func (c *ExitCommand) Execute(arg any) error

func (*ExitCommand) Name

func (c *ExitCommand) Name() string

type ExploreCommand

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

func NewExploreCommand

func NewExploreCommand(config *Config) *ExploreCommand

func (*ExploreCommand) Description

func (c *ExploreCommand) Description() string

func (*ExploreCommand) Execute

func (c *ExploreCommand) Execute(arg any) error

func (*ExploreCommand) Name

func (c *ExploreCommand) Name() string

type HelpCommand

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

func NewHelpCommand

func NewHelpCommand(config *Config) *HelpCommand

func (*HelpCommand) Description

func (c *HelpCommand) Description() string

func (*HelpCommand) Execute

func (c *HelpCommand) Execute(arg any) error

func (*HelpCommand) Name

func (c *HelpCommand) Name() string

type Inspect

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

func NewInspectCommand

func NewInspectCommand(config *Config) *Inspect

func (*Inspect) Description

func (i *Inspect) Description() string

func (*Inspect) Execute

func (i *Inspect) Execute(arg any) error

func (*Inspect) Name

func (i *Inspect) Name() string

type MapCommand

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

func NewMapCommand

func NewMapCommand(config *Config) *MapCommand

func (*MapCommand) Description

func (c *MapCommand) Description() string

func (*MapCommand) Execute

func (c *MapCommand) Execute(arg any) error

func (*MapCommand) Name

func (c *MapCommand) Name() string

type MapbCommand

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

func NewMapbCommand

func NewMapbCommand(config *Config) *MapbCommand

func (*MapbCommand) Description

func (c *MapbCommand) Description() string

func (*MapbCommand) Execute

func (c *MapbCommand) Execute(arg any) error

func (*MapbCommand) Name

func (c *MapbCommand) Name() string

type PokedexCommand

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

func NewPokedexCommand

func NewPokedexCommand(config *Config) *PokedexCommand

func (*PokedexCommand) Description

func (p *PokedexCommand) Description() string

func (*PokedexCommand) Execute

func (p *PokedexCommand) Execute(arg any) error

func (*PokedexCommand) Name

func (p *PokedexCommand) Name() string

type Pokemon

type Pokemon struct {
	Name   string
	Height int
	Weight int
	Types  []string
	Stats  map[string]int
}

func NewPokemon

func NewPokemon(pokemonResult fetch.CatchResult) Pokemon

func (Pokemon) ToString

func (p Pokemon) ToString() string

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

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