item

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: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

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

Functions

func WithClientTimeout

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

Types

type Client

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

func NewClient

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

type Service

type Service interface {
	GetItemByName(name string) (godex.Item, 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