pokedex

package
v0.0.0-...-8bebc79 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2016 License: MIT Imports: 18 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Mux

func Mux(addr string) (http.Handler, error)

func NewService

func NewService(opts Opts) (s srv.Service, err error)

Types

type Client

type Client struct {
	pbf.PokedexClient
	*grpc.ClientConn
	// contains filtered or unexported fields
}

func Dial

func Dial(addr, tok string) (*Client, error)

type Opts

type Opts struct {
	srv.Opts
	Registry string
	Data     string
}

func (Opts) LoadData

func (o Opts) LoadData() (pdx *Pokedex, err error)

func (Opts) RegistryClient

func (o Opts) RegistryClient() (reg *registry.Client, err error)

type Pokedex

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

func FromCsv

func FromCsv(path string) (pdx *Pokedex, err error)

func (*Pokedex) ByNumber

func (p *Pokedex) ByNumber(num int) *pbf.Pokemon

type Service

type Service struct {
	*Pokedex
	// contains filtered or unexported fields
}

func (*Service) GetPokemon

func (s *Service) GetPokemon(ctx context.Context, req *pbf.Pokemon) (*pbf.Pokemon_Collection, error)

GetPokemon fetchs the pokemon by number if the trainer has them in their PC Professors know all about pokemon and can see details about every pokemon

func (*Service) Listen

func (s *Service) Listen() error

func (*Service) Name

func (s *Service) Name() string

func (*Service) Version

func (s *Service) Version() string

Jump to

Keyboard shortcuts

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