Documentation ¶
Overview ¶
package protogen contains protoc generated code for testable examples.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( House_name = map[int32]string{ 0: "Gryffindor", 1: "Hufflepuff", 2: "Ravenclaw", 3: "Slytherin", } House_value = map[string]int32{ "Gryffindor": 0, "Hufflepuff": 1, "Ravenclaw": 2, "Slytherin": 3, } )
Enum value maps for House.
View Source
var File_grpeakec_proto_docs_sorting_hat_proto protoreflect.FileDescriptor
Functions ¶
func RegisterSortingHatServer ¶
func RegisterSortingHatServer(s *grpc.Server, srv SortingHatServer)
Types ¶
type House ¶
type House int32
House is the house a Wizard is getting sorted into.
func (House) Descriptor ¶
func (House) Descriptor() protoreflect.EnumDescriptor
func (House) EnumDescriptor
deprecated
func (House) Number ¶
func (x House) Number() protoreflect.EnumNumber
func (House) Type ¶
func (House) Type() protoreflect.EnumType
type Pupil ¶
type Pupil struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // contains filtered or unexported fields }
Pupil is the wizard-to-be for sorting.
func (*Pupil) Descriptor
deprecated
func (*Pupil) ProtoMessage ¶
func (*Pupil) ProtoMessage()
func (*Pupil) ProtoReflect ¶
func (x *Pupil) ProtoReflect() protoreflect.Message
type Sorted ¶
type Sorted struct { House House `protobuf:"varint,1,opt,name=house,proto3,enum=sortinghat.House" json:"house,omitempty"` // contains filtered or unexported fields }
Sorted returns the House the pupil has been placed into.
func (*Sorted) Descriptor
deprecated
func (*Sorted) ProtoMessage ¶
func (*Sorted) ProtoMessage()
func (*Sorted) ProtoReflect ¶
func (x *Sorted) ProtoReflect() protoreflect.Message
type SortingHatClient ¶
type SortingHatClient interface { // Sort sorts the pupil into a house. Sort(ctx context.Context, in *Pupil, opts ...grpc.CallOption) (*Sorted, error) }
SortingHatClient is the client API for SortingHat service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewSortingHatClient ¶
func NewSortingHatClient(cc grpc.ClientConnInterface) SortingHatClient
type SortingHatServer ¶
type SortingHatServer interface { // Sort sorts the pupil into a house. Sort(context.Context, *Pupil) (*Sorted, error) }
SortingHatServer is the server API for SortingHat service.
type UnimplementedSortingHatServer ¶
type UnimplementedSortingHatServer struct { }
UnimplementedSortingHatServer can be embedded to have forward compatible implementations.
Click to show internal directories.
Click to hide internal directories.