pokemon

package
v0.0.0-...-3f4e590 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2019 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrUnknownError    = errors.New("Something is wrong")
	ErrPokemonNotFound = errors.New("Pokedex pokemon cannot be found")
)

Functions

func WithClientTimeout

func WithClientTimeout(timeout time.Duration) func(client *client)

Types

type Client

type Client interface {
	FindOneByName(name string) (godex.Pokemon, error)
}

func NewClient

func NewClient(baseURL string, options ...func(*client)) Client

type Service

type Service interface {
	GetPokemonByName(name string) (godex.Pokemon, error)
}

func NewService

func NewService(config ServiceConfig) Service

type ServiceConfig

type ServiceConfig struct {
	APIBaseURL string
}

Jump to

Keyboard shortcuts

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