pbf

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

Documentation

Overview

Package pbf is a generated protocol buffer package.

It is generated from these files:
	msg.proto
	pokedex.proto
	registry.proto
	warden.proto

It has these top-level messages:
	Timestamp
	Response
	Pokemon
	Trainer
	Token
	Cert
	Ticket
	Action
	BattleMessage
	Zone

Package pbf is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Package pbf is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Package pbf is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidLengthMsg = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowMsg   = fmt.Errorf("proto: integer overflow")
)
View Source
var (
	ErrInvalidLengthPokedex = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowPokedex   = fmt.Errorf("proto: integer overflow")
)
View Source
var (
	ErrInvalidLengthRegistry = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowRegistry   = fmt.Errorf("proto: integer overflow")
)
View Source
var (
	ErrInvalidLengthWarden = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowWarden   = fmt.Errorf("proto: integer overflow")
)
View Source
var BattleMessage_Status_name = map[int32]string{
	0: "OK",
	1: "DONE",
	2: "ERROR",
}
View Source
var BattleMessage_Status_value = map[string]int32{
	"OK":    0,
	"DONE":  1,
	"ERROR": 2,
}
View Source
var Pokemon_Type_name = map[int32]string{
	0:  "UNKNOWN",
	1:  "NORMAL",
	2:  "FIGHTING",
	3:  "FLYING",
	4:  "POISON",
	5:  "GROUND",
	6:  "ROCK",
	7:  "BUG",
	8:  "GHOST",
	9:  "STEEL",
	10: "FIRE",
	11: "WATER",
	12: "GRASS",
	13: "ELECTRIC",
	14: "PSYCHIC",
	15: "ICE",
	16: "DRAGON",
	17: "DARK",
	18: "FAIRY",
}
View Source
var Pokemon_Type_value = map[string]int32{
	"UNKNOWN":  0,
	"NORMAL":   1,
	"FIGHTING": 2,
	"FLYING":   3,
	"POISON":   4,
	"GROUND":   5,
	"ROCK":     6,
	"BUG":      7,
	"GHOST":    8,
	"STEEL":    9,
	"FIRE":     10,
	"WATER":    11,
	"GRASS":    12,
	"ELECTRIC": 13,
	"PSYCHIC":  14,
	"ICE":      15,
	"DRAGON":   16,
	"DARK":     17,
	"FAIRY":    18,
}
View Source
var Trainer_Gender_name = map[int32]string{
	0: "BOY",
	1: "GIRL",
}
View Source
var Trainer_Gender_value = map[string]int32{
	"BOY":  0,
	"GIRL": 1,
}
View Source
var Zone_Code_name = map[int32]string{
	0: "KANTO",
	1: "JOHTO",
	2: "HOENN",
	3: "SINNOH",
	4: "UNOVA",
	5: "KALOS",
	6: "ALOLA",
}
View Source
var Zone_Code_value = map[string]int32{
	"KANTO":  0,
	"JOHTO":  1,
	"HOENN":  2,
	"SINNOH": 3,
	"UNOVA":  4,
	"KALOS":  5,
	"ALOLA":  6,
}

Functions

func RegisterPokedexHandler

func RegisterPokedexHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

RegisterPokedexHandler registers the http handlers for service Pokedex to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterPokedexHandlerFromEndpoint

func RegisterPokedexHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterPokedexHandlerFromEndpoint is same as RegisterPokedexHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

func RegisterPokedexServer

func RegisterPokedexServer(s *grpc.Server, srv PokedexServer)

func RegisterRegistryHandler

func RegisterRegistryHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

RegisterRegistryHandler registers the http handlers for service Registry to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterRegistryHandlerFromEndpoint

func RegisterRegistryHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterRegistryHandlerFromEndpoint is same as RegisterRegistryHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

func RegisterRegistryServer

func RegisterRegistryServer(s *grpc.Server, srv RegistryServer)

func RegisterWardenHandler

func RegisterWardenHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

RegisterWardenHandler registers the http handlers for service Warden to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterWardenHandlerFromEndpoint

func RegisterWardenHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterWardenHandlerFromEndpoint is same as RegisterWardenHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

func RegisterWardenServer

func RegisterWardenServer(s *grpc.Server, srv WardenServer)

Types

type Action

type Action struct {
	// Types that are valid to be assigned to Move:
	//	*Action_Attack
	//	*Action_Item
	//	*Action_Switch
	//	*Action_Run
	Move isAction_Move `protobuf_oneof:"move"`
}

func (*Action) Descriptor

func (*Action) Descriptor() ([]byte, []int)

func (*Action) Equal

func (this *Action) Equal(that interface{}) bool

func (*Action) GetAttack

func (m *Action) GetAttack() string

func (*Action) GetItem

func (m *Action) GetItem() string

func (*Action) GetMove

func (m *Action) GetMove() isAction_Move

func (*Action) GetRun

func (m *Action) GetRun() bool

func (*Action) GetSwitch

func (m *Action) GetSwitch() *Pokemon

func (*Action) GoString

func (this *Action) GoString() string

func (*Action) Marshal

func (m *Action) Marshal() (data []byte, err error)

func (*Action) MarshalTo

func (m *Action) MarshalTo(data []byte) (int, error)

func (*Action) ProtoMessage

func (*Action) ProtoMessage()

func (*Action) Reset

func (m *Action) Reset()

func (*Action) Size

func (m *Action) Size() (n int)

func (*Action) String

func (this *Action) String() string

func (*Action) Unmarshal

func (m *Action) Unmarshal(data []byte) error

func (*Action) XXX_OneofFuncs

func (*Action) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{})

XXX_OneofFuncs is for the internal use of the proto package.

type Action_Attack

type Action_Attack struct {
	Attack string `protobuf:"bytes,1,opt,name=attack,proto3,oneof"`
}

func (*Action_Attack) Equal

func (this *Action_Attack) Equal(that interface{}) bool

func (*Action_Attack) GoString

func (this *Action_Attack) GoString() string

func (*Action_Attack) MarshalTo

func (m *Action_Attack) MarshalTo(data []byte) (int, error)

func (*Action_Attack) Size

func (m *Action_Attack) Size() (n int)

func (*Action_Attack) String

func (this *Action_Attack) String() string

type Action_Item

type Action_Item struct {
	Item string `protobuf:"bytes,2,opt,name=item,proto3,oneof"`
}

func (*Action_Item) Equal

func (this *Action_Item) Equal(that interface{}) bool

func (*Action_Item) GoString

func (this *Action_Item) GoString() string

func (*Action_Item) MarshalTo

func (m *Action_Item) MarshalTo(data []byte) (int, error)

func (*Action_Item) Size

func (m *Action_Item) Size() (n int)

func (*Action_Item) String

func (this *Action_Item) String() string

type Action_Run

type Action_Run struct {
	Run bool `protobuf:"varint,4,opt,name=run,proto3,oneof"`
}

func (*Action_Run) Equal

func (this *Action_Run) Equal(that interface{}) bool

func (*Action_Run) GoString

func (this *Action_Run) GoString() string

func (*Action_Run) MarshalTo

func (m *Action_Run) MarshalTo(data []byte) (int, error)

func (*Action_Run) Size

func (m *Action_Run) Size() (n int)

func (*Action_Run) String

func (this *Action_Run) String() string

type Action_Switch

type Action_Switch struct {
	Switch *Pokemon `protobuf:"bytes,3,opt,name=switch,oneof"`
}

func (*Action_Switch) Equal

func (this *Action_Switch) Equal(that interface{}) bool

func (*Action_Switch) GoString

func (this *Action_Switch) GoString() string

func (*Action_Switch) MarshalTo

func (m *Action_Switch) MarshalTo(data []byte) (int, error)

func (*Action_Switch) Size

func (m *Action_Switch) Size() (n int)

func (*Action_Switch) String

func (this *Action_Switch) String() string

type BattleMessage

type BattleMessage struct {
	Msg    string               `protobuf:"bytes,1,opt,name=msg,proto3" json:"msg,omitempty"`
	Status BattleMessage_Status `protobuf:"varint,2,opt,name=status,proto3,enum=buckhx.safari.warden.BattleMessage_Status" json:"status,omitempty"`
}

func (*BattleMessage) Descriptor

func (*BattleMessage) Descriptor() ([]byte, []int)

func (*BattleMessage) Equal

func (this *BattleMessage) Equal(that interface{}) bool

func (*BattleMessage) GoString

func (this *BattleMessage) GoString() string

func (*BattleMessage) Marshal

func (m *BattleMessage) Marshal() (data []byte, err error)

func (*BattleMessage) MarshalTo

func (m *BattleMessage) MarshalTo(data []byte) (int, error)

func (*BattleMessage) ProtoMessage

func (*BattleMessage) ProtoMessage()

func (*BattleMessage) Reset

func (m *BattleMessage) Reset()

func (*BattleMessage) Size

func (m *BattleMessage) Size() (n int)

func (*BattleMessage) String

func (this *BattleMessage) String() string

func (*BattleMessage) Unmarshal

func (m *BattleMessage) Unmarshal(data []byte) error

type BattleMessage_Status

type BattleMessage_Status int32
const (
	OK    BattleMessage_Status = 0
	DONE  BattleMessage_Status = 1
	ERROR BattleMessage_Status = 2
)

func (BattleMessage_Status) EnumDescriptor

func (BattleMessage_Status) EnumDescriptor() ([]byte, []int)

func (BattleMessage_Status) String

func (x BattleMessage_Status) String() string

type Cert

type Cert struct {
	Jwk []byte `protobuf:"bytes,1,opt,name=jwk,proto3" json:"jwk,omitempty"`
}

func (*Cert) Descriptor

func (*Cert) Descriptor() ([]byte, []int)

func (*Cert) Equal

func (this *Cert) Equal(that interface{}) bool

func (*Cert) GoString

func (this *Cert) GoString() string

func (*Cert) Marshal

func (m *Cert) Marshal() (data []byte, err error)

func (*Cert) MarshalTo

func (m *Cert) MarshalTo(data []byte) (int, error)

func (*Cert) ProtoMessage

func (*Cert) ProtoMessage()

func (*Cert) Reset

func (m *Cert) Reset()

func (*Cert) Size

func (m *Cert) Size() (n int)

func (*Cert) String

func (this *Cert) String() string

func (*Cert) Unmarshal

func (m *Cert) Unmarshal(data []byte) error

type PokedexClient

type PokedexClient interface {
	// GetPokemon method retrieves info about the pokemon at the given number
	//
	// Any other supplied attributes will be ignored
	GetPokemon(ctx context.Context, in *Pokemon, opts ...grpc.CallOption) (*Pokemon_Collection, error)
}

func NewPokedexClient

func NewPokedexClient(cc *grpc.ClientConn) PokedexClient

type PokedexServer

type PokedexServer interface {
	// GetPokemon method retrieves info about the pokemon at the given number
	//
	// Any other supplied attributes will be ignored
	GetPokemon(context.Context, *Pokemon) (*Pokemon_Collection, error)
}

type Pokemon

type Pokemon struct {
	// Uid is the unique identifier for this individual pokemon
	Uid string `protobuf:"bytes,1,opt,name=uid,proto3" json:"uid,omitempty"`
	// NickName is the name this pokemon has been given by it's trainer
	NickName string `protobuf:"bytes,2,opt,name=nick_name,json=nickName,proto3" json:"nick_name,omitempty"`
	// Name is the English name of the pokemon
	Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"`
	// Number is the canonical pokemon identifier
	Number int32 `protobuf:"varint,4,opt,name=number,proto3" json:"number,omitempty"`
	// Type is the type of this pokemon
	Type []Pokemon_Type `protobuf:"varint,5,rep,name=type,enum=buckhx.safari.pokedex.Pokemon_Type" json:"type,omitempty"`
	// CatchRate is chance of catching on a scale of 1-255
	CatchRate int32 `protobuf:"varint,6,opt,name=catch_rate,json=catchRate,proto3" json:"catch_rate,omitempty"`
	// Speed is how fast the pokemon is on a scale 1-100
	Speed int32 `protobuf:"varint,7,opt,name=speed,proto3" json:"speed,omitempty"`
}

Pokemon message is info about a pokemon

func (*Pokemon) Descriptor

func (*Pokemon) Descriptor() ([]byte, []int)

func (*Pokemon) Equal

func (this *Pokemon) Equal(that interface{}) bool

func (*Pokemon) GoString

func (this *Pokemon) GoString() string

func (*Pokemon) Marshal

func (m *Pokemon) Marshal() (data []byte, err error)

func (*Pokemon) MarshalTo

func (m *Pokemon) MarshalTo(data []byte) (int, error)

func (*Pokemon) ProtoMessage

func (*Pokemon) ProtoMessage()

func (*Pokemon) Reset

func (m *Pokemon) Reset()

func (*Pokemon) Size

func (m *Pokemon) Size() (n int)

func (*Pokemon) String

func (this *Pokemon) String() string

func (*Pokemon) Unmarshal

func (m *Pokemon) Unmarshal(data []byte) error

type Pokemon_Collection

type Pokemon_Collection struct {
	Pokemon []*Pokemon `protobuf:"bytes,1,rep,name=pokemon" json:"pokemon,omitempty"`
}

Pokemon_Collection is self evident

func (*Pokemon_Collection) Descriptor

func (*Pokemon_Collection) Descriptor() ([]byte, []int)

func (*Pokemon_Collection) Equal

func (this *Pokemon_Collection) Equal(that interface{}) bool

func (*Pokemon_Collection) GetPokemon

func (m *Pokemon_Collection) GetPokemon() []*Pokemon

func (*Pokemon_Collection) GoString

func (this *Pokemon_Collection) GoString() string

func (*Pokemon_Collection) Marshal

func (m *Pokemon_Collection) Marshal() (data []byte, err error)

func (*Pokemon_Collection) MarshalTo

func (m *Pokemon_Collection) MarshalTo(data []byte) (int, error)

func (*Pokemon_Collection) ProtoMessage

func (*Pokemon_Collection) ProtoMessage()

func (*Pokemon_Collection) Reset

func (m *Pokemon_Collection) Reset()

func (*Pokemon_Collection) Size

func (m *Pokemon_Collection) Size() (n int)

func (*Pokemon_Collection) String

func (this *Pokemon_Collection) String() string

func (*Pokemon_Collection) Unmarshal

func (m *Pokemon_Collection) Unmarshal(data []byte) error

type Pokemon_Type

type Pokemon_Type int32

Pokemon_Type is the canonical type of a pokemon

const (
	UNKNOWN  Pokemon_Type = 0
	NORMAL   Pokemon_Type = 1
	FIGHTING Pokemon_Type = 2
	FLYING   Pokemon_Type = 3
	POISON   Pokemon_Type = 4
	GROUND   Pokemon_Type = 5
	ROCK     Pokemon_Type = 6
	BUG      Pokemon_Type = 7
	GHOST    Pokemon_Type = 8
	STEEL    Pokemon_Type = 9
	FIRE     Pokemon_Type = 10
	WATER    Pokemon_Type = 11
	GRASS    Pokemon_Type = 12
	ELECTRIC Pokemon_Type = 13
	PSYCHIC  Pokemon_Type = 14
	ICE      Pokemon_Type = 15
	DRAGON   Pokemon_Type = 16
	DARK     Pokemon_Type = 17
	FAIRY    Pokemon_Type = 18
)

func (Pokemon_Type) EnumDescriptor

func (Pokemon_Type) EnumDescriptor() ([]byte, []int)

func (Pokemon_Type) String

func (x Pokemon_Type) String() string

type RegistryClient

type RegistryClient interface {
	// Register makes a creates a new trainer in the safari
	//
	// Trainer name, password, age & gender are required.
	// Any other supplied fields will be ignored
	Register(ctx context.Context, in *Trainer, opts ...grpc.CallOption) (*Trainer, error)
	// Get fetchs a trainer
	//
	// The populated fields will depend on the auth scope of the token
	GetTrainer(ctx context.Context, in *Trainer, opts ...grpc.CallOption) (*Trainer, error)
	// Get fetchs a trainer
	//
	// The populated fields will depend on the auth scope of the token
	UpdateTrainer(ctx context.Context, in *Trainer, opts ...grpc.CallOption) (*Trainer, error)
	// Enter authenticates a user to retrieve a an access token to authorize requests for a safari
	//
	// HTTPS required w/ HTTP basic access authentication via a header
	// Authorization: Basic BASE64({user:pass})
	Enter(ctx context.Context, in *Trainer, opts ...grpc.CallOption) (*Token, error)
	// Access retrieves an access token from a token's key/secret combo
	//
	// HTTPS required. Only key/secret will be honored
	// Authorization: Basic BASE64({key:secret})
	Access(ctx context.Context, in *Token, opts ...grpc.CallOption) (*Token, error)
	// Certificate returns the cert used to verify token signatures
	//
	// The cert is in JWK form as described in https://tools.ietf.org/html/rfc7517
	Certificate(ctx context.Context, in *Trainer, opts ...grpc.CallOption) (*Cert, error)
}

func NewRegistryClient

func NewRegistryClient(cc *grpc.ClientConn) RegistryClient

type RegistryServer

type RegistryServer interface {
	// Register makes a creates a new trainer in the safari
	//
	// Trainer name, password, age & gender are required.
	// Any other supplied fields will be ignored
	Register(context.Context, *Trainer) (*Trainer, error)
	// Get fetchs a trainer
	//
	// The populated fields will depend on the auth scope of the token
	GetTrainer(context.Context, *Trainer) (*Trainer, error)
	// Get fetchs a trainer
	//
	// The populated fields will depend on the auth scope of the token
	UpdateTrainer(context.Context, *Trainer) (*Trainer, error)
	// Enter authenticates a user to retrieve a an access token to authorize requests for a safari
	//
	// HTTPS required w/ HTTP basic access authentication via a header
	// Authorization: Basic BASE64({user:pass})
	Enter(context.Context, *Trainer) (*Token, error)
	// Access retrieves an access token from a token's key/secret combo
	//
	// HTTPS required. Only key/secret will be honored
	// Authorization: Basic BASE64({key:secret})
	Access(context.Context, *Token) (*Token, error)
	// Certificate returns the cert used to verify token signatures
	//
	// The cert is in JWK form as described in https://tools.ietf.org/html/rfc7517
	Certificate(context.Context, *Trainer) (*Cert, error)
}

type Response

type Response struct {
	Ok   bool   `protobuf:"varint,1,opt,name=ok,proto3" json:"ok,omitempty"`
	Msg  string `protobuf:"bytes,2,opt,name=msg,proto3" json:"msg,omitempty"`
	Code int32  `protobuf:"varint,3,opt,name=code,proto3" json:"code,omitempty"`
}

func (*Response) Descriptor

func (*Response) Descriptor() ([]byte, []int)

func (*Response) Equal

func (this *Response) Equal(that interface{}) bool

func (*Response) GoString

func (this *Response) GoString() string

func (*Response) Marshal

func (m *Response) Marshal() (data []byte, err error)

func (*Response) MarshalTo

func (m *Response) MarshalTo(data []byte) (int, error)

func (*Response) ProtoMessage

func (*Response) ProtoMessage()

func (*Response) Reset

func (m *Response) Reset()

func (*Response) Size

func (m *Response) Size() (n int)

func (*Response) String

func (this *Response) String() string

func (*Response) Unmarshal

func (m *Response) Unmarshal(data []byte) error

type Ticket

type Ticket struct {
	Uid     string         `protobuf:"bytes,1,opt,name=uid,proto3" json:"uid,omitempty"`
	Trainer *Trainer       `protobuf:"bytes,2,opt,name=trainer" json:"trainer,omitempty"`
	Zone    *Zone          `protobuf:"bytes,3,opt,name=zone" json:"zone,omitempty"`
	Time    *Timestamp     `protobuf:"bytes,4,opt,name=time" json:"time,omitempty"`
	Expires *Ticket_Expiry `protobuf:"bytes,5,opt,name=expires" json:"expires,omitempty"`
}

func (*Ticket) Descriptor

func (*Ticket) Descriptor() ([]byte, []int)

func (*Ticket) Equal

func (this *Ticket) Equal(that interface{}) bool

func (*Ticket) GetExpires

func (m *Ticket) GetExpires() *Ticket_Expiry

func (*Ticket) GetTime

func (m *Ticket) GetTime() *Timestamp

func (*Ticket) GetTrainer

func (m *Ticket) GetTrainer() *Trainer

func (*Ticket) GetZone

func (m *Ticket) GetZone() *Zone

func (*Ticket) GoString

func (this *Ticket) GoString() string

func (*Ticket) Marshal

func (m *Ticket) Marshal() (data []byte, err error)

func (*Ticket) MarshalTo

func (m *Ticket) MarshalTo(data []byte) (int, error)

func (*Ticket) ProtoMessage

func (*Ticket) ProtoMessage()

func (*Ticket) Reset

func (m *Ticket) Reset()

func (*Ticket) Size

func (m *Ticket) Size() (n int)

func (*Ticket) String

func (this *Ticket) String() string

func (*Ticket) Unmarshal

func (m *Ticket) Unmarshal(data []byte) error

type Ticket_Expiry

type Ticket_Expiry struct {
	Encounters int32 `protobuf:"varint,1,opt,name=encounters,proto3" json:"encounters,omitempty"`
	Time       int64 `protobuf:"varint,2,opt,name=time,proto3" json:"time,omitempty"`
}

func (*Ticket_Expiry) Descriptor

func (*Ticket_Expiry) Descriptor() ([]byte, []int)

func (*Ticket_Expiry) Equal

func (this *Ticket_Expiry) Equal(that interface{}) bool

func (*Ticket_Expiry) GoString

func (this *Ticket_Expiry) GoString() string

func (*Ticket_Expiry) Marshal

func (m *Ticket_Expiry) Marshal() (data []byte, err error)

func (*Ticket_Expiry) MarshalTo

func (m *Ticket_Expiry) MarshalTo(data []byte) (int, error)

func (*Ticket_Expiry) ProtoMessage

func (*Ticket_Expiry) ProtoMessage()

func (*Ticket_Expiry) Reset

func (m *Ticket_Expiry) Reset()

func (*Ticket_Expiry) Size

func (m *Ticket_Expiry) Size() (n int)

func (*Ticket_Expiry) String

func (this *Ticket_Expiry) String() string

func (*Ticket_Expiry) Unmarshal

func (m *Ticket_Expiry) Unmarshal(data []byte) error

type Timestamp

type Timestamp struct {
	Unix int64 `protobuf:"varint,1,opt,name=unix,proto3" json:"unix,omitempty"`
}

func (*Timestamp) Descriptor

func (*Timestamp) Descriptor() ([]byte, []int)

func (*Timestamp) Equal

func (this *Timestamp) Equal(that interface{}) bool

func (*Timestamp) GoString

func (this *Timestamp) GoString() string

func (*Timestamp) Marshal

func (m *Timestamp) Marshal() (data []byte, err error)

func (*Timestamp) MarshalTo

func (m *Timestamp) MarshalTo(data []byte) (int, error)

func (*Timestamp) ProtoMessage

func (*Timestamp) ProtoMessage()

func (*Timestamp) Reset

func (m *Timestamp) Reset()

func (*Timestamp) Size

func (m *Timestamp) Size() (n int)

func (*Timestamp) String

func (this *Timestamp) String() string

func (*Timestamp) Unmarshal

func (m *Timestamp) Unmarshal(data []byte) error

type Token

type Token struct {
	Access string   `protobuf:"bytes,1,opt,name=access,proto3" json:"access,omitempty"`
	Key    string   `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"`
	Secret string   `protobuf:"bytes,3,opt,name=secret,proto3" json:"secret,omitempty"`
	Scope  []string `protobuf:"bytes,4,rep,name=scope" json:"scope,omitempty"`
}

func (*Token) Descriptor

func (*Token) Descriptor() ([]byte, []int)

func (*Token) Equal

func (this *Token) Equal(that interface{}) bool

func (*Token) GoString

func (this *Token) GoString() string

func (*Token) Marshal

func (m *Token) Marshal() (data []byte, err error)

func (*Token) MarshalTo

func (m *Token) MarshalTo(data []byte) (int, error)

func (*Token) ProtoMessage

func (*Token) ProtoMessage()

func (*Token) Reset

func (m *Token) Reset()

func (*Token) Size

func (m *Token) Size() (n int)

func (*Token) String

func (this *Token) String() string

func (*Token) Unmarshal

func (m *Token) Unmarshal(data []byte) error

type Trainer

type Trainer struct {
	Uid      string              `protobuf:"bytes,1,opt,name=uid,proto3" json:"uid,omitempty"`
	Name     string              `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	Password string              `protobuf:"bytes,3,opt,name=password,proto3" json:"password,omitempty"`
	Age      int32               `protobuf:"varint,4,opt,name=age,proto3" json:"age,omitempty"`
	Gender   Trainer_Gender      `protobuf:"varint,5,opt,name=gender,proto3,enum=buckhx.safari.registry.Trainer_Gender" json:"gender,omitempty"`
	Start    *Timestamp          `protobuf:"bytes,6,opt,name=start" json:"start,omitempty"`
	Pc       *Pokemon_Collection `protobuf:"bytes,7,opt,name=pc" json:"pc,omitempty"`
	Scope    []string            `protobuf:"bytes,8,rep,name=scope" json:"scope,omitempty"`
}

func (*Trainer) Descriptor

func (*Trainer) Descriptor() ([]byte, []int)

func (*Trainer) Equal

func (this *Trainer) Equal(that interface{}) bool

func (*Trainer) GetPc

func (m *Trainer) GetPc() *Pokemon_Collection

func (*Trainer) GetStart

func (m *Trainer) GetStart() *Timestamp

func (*Trainer) GoString

func (this *Trainer) GoString() string

func (*Trainer) Marshal

func (m *Trainer) Marshal() (data []byte, err error)

func (*Trainer) MarshalTo

func (m *Trainer) MarshalTo(data []byte) (int, error)

func (*Trainer) ProtoMessage

func (*Trainer) ProtoMessage()

func (*Trainer) Reset

func (m *Trainer) Reset()

func (*Trainer) Size

func (m *Trainer) Size() (n int)

func (*Trainer) String

func (this *Trainer) String() string

func (*Trainer) Unmarshal

func (m *Trainer) Unmarshal(data []byte) error

type Trainer_Gender

type Trainer_Gender int32
const (
	BOY  Trainer_Gender = 0
	GIRL Trainer_Gender = 1
)

func (Trainer_Gender) EnumDescriptor

func (Trainer_Gender) EnumDescriptor() ([]byte, []int)

func (Trainer_Gender) String

func (x Trainer_Gender) String() string

type WardenClient

type WardenClient interface {
	// Encounter might add a pokemon to the event
	//
	// A pokemon will be added to the event and timestmap set if one is encountered
	Enter(ctx context.Context, in *Ticket, opts ...grpc.CallOption) (*Ticket, error)
	// Catch will attempt to catch the pokemon
	//
	// If caught, this pokemon will be deposited into the Trainer's PC
	Encounter(ctx context.Context, opts ...grpc.CallOption) (Warden_EncounterClient, error)
}

func NewWardenClient

func NewWardenClient(cc *grpc.ClientConn) WardenClient

type WardenServer

type WardenServer interface {
	// Encounter might add a pokemon to the event
	//
	// A pokemon will be added to the event and timestmap set if one is encountered
	Enter(context.Context, *Ticket) (*Ticket, error)
	// Catch will attempt to catch the pokemon
	//
	// If caught, this pokemon will be deposited into the Trainer's PC
	Encounter(Warden_EncounterServer) error
}

type Warden_EncounterClient

type Warden_EncounterClient interface {
	Send(*Action) error
	Recv() (*BattleMessage, error)
	grpc.ClientStream
}

type Warden_EncounterServer

type Warden_EncounterServer interface {
	Send(*BattleMessage) error
	Recv() (*Action, error)
	grpc.ServerStream
}

type Zone

type Zone struct {
	Region  Zone_Code `protobuf:"varint,1,opt,name=region,proto3,enum=buckhx.safari.warden.Zone_Code" json:"region,omitempty"`
	OptCode int32     `protobuf:"varint,15,opt,name=opt_code,json=optCode,proto3" json:"opt_code,omitempty"`
}

func (*Zone) Descriptor

func (*Zone) Descriptor() ([]byte, []int)

func (*Zone) Equal

func (this *Zone) Equal(that interface{}) bool

func (*Zone) GoString

func (this *Zone) GoString() string

func (*Zone) Marshal

func (m *Zone) Marshal() (data []byte, err error)

func (*Zone) MarshalTo

func (m *Zone) MarshalTo(data []byte) (int, error)

func (*Zone) ProtoMessage

func (*Zone) ProtoMessage()

func (*Zone) Reset

func (m *Zone) Reset()

func (*Zone) Size

func (m *Zone) Size() (n int)

func (*Zone) String

func (this *Zone) String() string

func (*Zone) Unmarshal

func (m *Zone) Unmarshal(data []byte) error

type Zone_Code

type Zone_Code int32
const (
	KANTO  Zone_Code = 0
	JOHTO  Zone_Code = 1
	HOENN  Zone_Code = 2
	SINNOH Zone_Code = 3
	UNOVA  Zone_Code = 4
	KALOS  Zone_Code = 5
	ALOLA  Zone_Code = 6
)

func (Zone_Code) EnumDescriptor

func (Zone_Code) EnumDescriptor() ([]byte, []int)

func (Zone_Code) String

func (x Zone_Code) String() string

Jump to

Keyboard shortcuts

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