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 ¶
- Variables
- func RegisterPokedexHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterPokedexHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterPokedexServer(s *grpc.Server, srv PokedexServer)
- func RegisterRegistryHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterRegistryHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterRegistryServer(s *grpc.Server, srv RegistryServer)
- func RegisterWardenHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterWardenHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterWardenServer(s *grpc.Server, srv WardenServer)
- type Action
- func (*Action) Descriptor() ([]byte, []int)
- func (this *Action) Equal(that interface{}) bool
- func (m *Action) GetAttack() string
- func (m *Action) GetItem() string
- func (m *Action) GetMove() isAction_Move
- func (m *Action) GetRun() bool
- func (m *Action) GetSwitch() *Pokemon
- func (this *Action) GoString() string
- func (m *Action) Marshal() (data []byte, err error)
- func (m *Action) MarshalTo(data []byte) (int, error)
- func (*Action) ProtoMessage()
- func (m *Action) Reset()
- func (m *Action) Size() (n int)
- func (this *Action) String() string
- func (m *Action) Unmarshal(data []byte) error
- func (*Action) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, ...)
- type Action_Attack
- type Action_Item
- type Action_Run
- type Action_Switch
- type BattleMessage
- func (*BattleMessage) Descriptor() ([]byte, []int)
- func (this *BattleMessage) Equal(that interface{}) bool
- func (this *BattleMessage) GoString() string
- func (m *BattleMessage) Marshal() (data []byte, err error)
- func (m *BattleMessage) MarshalTo(data []byte) (int, error)
- func (*BattleMessage) ProtoMessage()
- func (m *BattleMessage) Reset()
- func (m *BattleMessage) Size() (n int)
- func (this *BattleMessage) String() string
- func (m *BattleMessage) Unmarshal(data []byte) error
- type BattleMessage_Status
- type Cert
- func (*Cert) Descriptor() ([]byte, []int)
- func (this *Cert) Equal(that interface{}) bool
- func (this *Cert) GoString() string
- func (m *Cert) Marshal() (data []byte, err error)
- func (m *Cert) MarshalTo(data []byte) (int, error)
- func (*Cert) ProtoMessage()
- func (m *Cert) Reset()
- func (m *Cert) Size() (n int)
- func (this *Cert) String() string
- func (m *Cert) Unmarshal(data []byte) error
- type PokedexClient
- type PokedexServer
- type Pokemon
- func (*Pokemon) Descriptor() ([]byte, []int)
- func (this *Pokemon) Equal(that interface{}) bool
- func (this *Pokemon) GoString() string
- func (m *Pokemon) Marshal() (data []byte, err error)
- func (m *Pokemon) MarshalTo(data []byte) (int, error)
- func (*Pokemon) ProtoMessage()
- func (m *Pokemon) Reset()
- func (m *Pokemon) Size() (n int)
- func (this *Pokemon) String() string
- func (m *Pokemon) Unmarshal(data []byte) error
- type Pokemon_Collection
- func (*Pokemon_Collection) Descriptor() ([]byte, []int)
- func (this *Pokemon_Collection) Equal(that interface{}) bool
- func (m *Pokemon_Collection) GetPokemon() []*Pokemon
- func (this *Pokemon_Collection) GoString() string
- func (m *Pokemon_Collection) Marshal() (data []byte, err error)
- func (m *Pokemon_Collection) MarshalTo(data []byte) (int, error)
- func (*Pokemon_Collection) ProtoMessage()
- func (m *Pokemon_Collection) Reset()
- func (m *Pokemon_Collection) Size() (n int)
- func (this *Pokemon_Collection) String() string
- func (m *Pokemon_Collection) Unmarshal(data []byte) error
- type Pokemon_Type
- type RegistryClient
- type RegistryServer
- type Response
- func (*Response) Descriptor() ([]byte, []int)
- func (this *Response) Equal(that interface{}) bool
- func (this *Response) GoString() string
- func (m *Response) Marshal() (data []byte, err error)
- func (m *Response) MarshalTo(data []byte) (int, error)
- func (*Response) ProtoMessage()
- func (m *Response) Reset()
- func (m *Response) Size() (n int)
- func (this *Response) String() string
- func (m *Response) Unmarshal(data []byte) error
- type Ticket
- func (*Ticket) Descriptor() ([]byte, []int)
- func (this *Ticket) Equal(that interface{}) bool
- func (m *Ticket) GetExpires() *Ticket_Expiry
- func (m *Ticket) GetTime() *Timestamp
- func (m *Ticket) GetTrainer() *Trainer
- func (m *Ticket) GetZone() *Zone
- func (this *Ticket) GoString() string
- func (m *Ticket) Marshal() (data []byte, err error)
- func (m *Ticket) MarshalTo(data []byte) (int, error)
- func (*Ticket) ProtoMessage()
- func (m *Ticket) Reset()
- func (m *Ticket) Size() (n int)
- func (this *Ticket) String() string
- func (m *Ticket) Unmarshal(data []byte) error
- type Ticket_Expiry
- func (*Ticket_Expiry) Descriptor() ([]byte, []int)
- func (this *Ticket_Expiry) Equal(that interface{}) bool
- func (this *Ticket_Expiry) GoString() string
- func (m *Ticket_Expiry) Marshal() (data []byte, err error)
- func (m *Ticket_Expiry) MarshalTo(data []byte) (int, error)
- func (*Ticket_Expiry) ProtoMessage()
- func (m *Ticket_Expiry) Reset()
- func (m *Ticket_Expiry) Size() (n int)
- func (this *Ticket_Expiry) String() string
- func (m *Ticket_Expiry) Unmarshal(data []byte) error
- type Timestamp
- func (*Timestamp) Descriptor() ([]byte, []int)
- func (this *Timestamp) Equal(that interface{}) bool
- func (this *Timestamp) GoString() string
- func (m *Timestamp) Marshal() (data []byte, err error)
- func (m *Timestamp) MarshalTo(data []byte) (int, error)
- func (*Timestamp) ProtoMessage()
- func (m *Timestamp) Reset()
- func (m *Timestamp) Size() (n int)
- func (this *Timestamp) String() string
- func (m *Timestamp) Unmarshal(data []byte) error
- type Token
- func (*Token) Descriptor() ([]byte, []int)
- func (this *Token) Equal(that interface{}) bool
- func (this *Token) GoString() string
- func (m *Token) Marshal() (data []byte, err error)
- func (m *Token) MarshalTo(data []byte) (int, error)
- func (*Token) ProtoMessage()
- func (m *Token) Reset()
- func (m *Token) Size() (n int)
- func (this *Token) String() string
- func (m *Token) Unmarshal(data []byte) error
- type Trainer
- func (*Trainer) Descriptor() ([]byte, []int)
- func (this *Trainer) Equal(that interface{}) bool
- func (m *Trainer) GetPc() *Pokemon_Collection
- func (m *Trainer) GetStart() *Timestamp
- func (this *Trainer) GoString() string
- func (m *Trainer) Marshal() (data []byte, err error)
- func (m *Trainer) MarshalTo(data []byte) (int, error)
- func (*Trainer) ProtoMessage()
- func (m *Trainer) Reset()
- func (m *Trainer) Size() (n int)
- func (this *Trainer) String() string
- func (m *Trainer) Unmarshal(data []byte) error
- type Trainer_Gender
- type WardenClient
- type WardenServer
- type Warden_EncounterClient
- type Warden_EncounterServer
- type Zone
- func (*Zone) Descriptor() ([]byte, []int)
- func (this *Zone) Equal(that interface{}) bool
- func (this *Zone) GoString() string
- func (m *Zone) Marshal() (data []byte, err error)
- func (m *Zone) MarshalTo(data []byte) (int, error)
- func (*Zone) ProtoMessage()
- func (m *Zone) Reset()
- func (m *Zone) Size() (n int)
- func (this *Zone) String() string
- func (m *Zone) Unmarshal(data []byte) error
- type Zone_Code
Constants ¶
This section is empty.
Variables ¶
var ( ErrInvalidLengthMsg = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowMsg = fmt.Errorf("proto: integer overflow") )
var ( ErrInvalidLengthPokedex = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowPokedex = fmt.Errorf("proto: integer overflow") )
var ( ErrInvalidLengthRegistry = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowRegistry = fmt.Errorf("proto: integer overflow") )
var ( ErrInvalidLengthWarden = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowWarden = fmt.Errorf("proto: integer overflow") )
var BattleMessage_Status_name = map[int32]string{
0: "OK",
1: "DONE",
2: "ERROR",
}
var BattleMessage_Status_value = map[string]int32{
"OK": 0,
"DONE": 1,
"ERROR": 2,
}
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",
}
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,
}
var Trainer_Gender_name = map[int32]string{
0: "BOY",
1: "GIRL",
}
var Trainer_Gender_value = map[string]int32{
"BOY": 0,
"GIRL": 1,
}
var Zone_Code_name = map[int32]string{
0: "KANTO",
1: "JOHTO",
2: "HOENN",
3: "SINNOH",
4: "UNOVA",
5: "KALOS",
6: "ALOLA",
}
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 ¶
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) ProtoMessage ¶
func (*Action) ProtoMessage()
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) 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) 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) 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) 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) 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) ProtoMessage ¶
func (*Cert) ProtoMessage()
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) ProtoMessage ¶
func (*Pokemon) ProtoMessage()
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) ProtoMessage ¶
func (*Response) ProtoMessage()
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) GetExpires ¶
func (m *Ticket) GetExpires() *Ticket_Expiry
func (*Ticket) GetTrainer ¶
func (*Ticket) ProtoMessage ¶
func (*Ticket) ProtoMessage()
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) 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) ProtoMessage ¶
func (*Timestamp) ProtoMessage()
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) ProtoMessage ¶
func (*Token) ProtoMessage()
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) GetPc ¶
func (m *Trainer) GetPc() *Pokemon_Collection
func (*Trainer) ProtoMessage ¶
func (*Trainer) ProtoMessage()
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) ProtoMessage ¶
func (*Zone) ProtoMessage()