Documentation ¶
Index ¶
- Variables
- func RegisterPersonServiceServer(s *grpc.Server, srv PersonServiceServer)
- type GetPersonRequest
- func (*GetPersonRequest) Descriptor() ([]byte, []int)
- func (m *GetPersonRequest) GetPersonId() int32
- func (*GetPersonRequest) ProtoMessage()
- func (m *GetPersonRequest) Reset()
- func (m *GetPersonRequest) String() string
- func (m *GetPersonRequest) XXX_DiscardUnknown()
- func (m *GetPersonRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *GetPersonRequest) XXX_Merge(src proto.Message)
- func (m *GetPersonRequest) XXX_Size() int
- func (m *GetPersonRequest) XXX_Unmarshal(b []byte) error
- type GetPersonResponse
- func (*GetPersonResponse) Descriptor() ([]byte, []int)
- func (m *GetPersonResponse) GetPersons() []*Person
- func (*GetPersonResponse) ProtoMessage()
- func (m *GetPersonResponse) Reset()
- func (m *GetPersonResponse) String() string
- func (m *GetPersonResponse) XXX_DiscardUnknown()
- func (m *GetPersonResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *GetPersonResponse) XXX_Merge(src proto.Message)
- func (m *GetPersonResponse) XXX_Size() int
- func (m *GetPersonResponse) XXX_Unmarshal(b []byte) error
- type Person
- func (*Person) Descriptor() ([]byte, []int)
- func (m *Person) GetId() int32
- func (m *Person) GetName() string
- func (m *Person) GetPhones() []*Phone
- func (*Person) ProtoMessage()
- func (m *Person) Reset()
- func (m *Person) String() string
- func (m *Person) XXX_DiscardUnknown()
- func (m *Person) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Person) XXX_Merge(src proto.Message)
- func (m *Person) XXX_Size() int
- func (m *Person) XXX_Unmarshal(b []byte) error
- type PersonServiceClient
- type PersonServiceServer
- type Phone
- func (*Phone) Descriptor() ([]byte, []int)
- func (m *Phone) GetNumber() string
- func (m *Phone) GetType() PhoneType
- func (*Phone) ProtoMessage()
- func (m *Phone) Reset()
- func (m *Phone) String() string
- func (m *Phone) XXX_DiscardUnknown()
- func (m *Phone) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Phone) XXX_Merge(src proto.Message)
- func (m *Phone) XXX_Size() int
- func (m *Phone) XXX_Unmarshal(b []byte) error
- type PhoneType
- type UnimplementedPersonServiceServer
Constants ¶
This section is empty.
Variables ¶
View Source
var PhoneType_name = map[int32]string{
0: "NONE",
1: "STATIONARY",
2: "CELLULAR",
3: "OTHER",
}
View Source
var PhoneType_value = map[string]int32{
"NONE": 0,
"STATIONARY": 1,
"CELLULAR": 2,
"OTHER": 3,
}
Functions ¶
func RegisterPersonServiceServer ¶
func RegisterPersonServiceServer(s *grpc.Server, srv PersonServiceServer)
Types ¶
type GetPersonRequest ¶
type GetPersonRequest struct { PersonId int32 `protobuf:"varint,1,opt,name=person_id,json=personId,proto3" json:"person_id,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
Requests //=================================================================|
func (*GetPersonRequest) Descriptor ¶
func (*GetPersonRequest) Descriptor() ([]byte, []int)
func (*GetPersonRequest) GetPersonId ¶
func (m *GetPersonRequest) GetPersonId() int32
func (*GetPersonRequest) ProtoMessage ¶
func (*GetPersonRequest) ProtoMessage()
func (*GetPersonRequest) Reset ¶
func (m *GetPersonRequest) Reset()
func (*GetPersonRequest) String ¶
func (m *GetPersonRequest) String() string
func (*GetPersonRequest) XXX_DiscardUnknown ¶
func (m *GetPersonRequest) XXX_DiscardUnknown()
func (*GetPersonRequest) XXX_Marshal ¶
func (m *GetPersonRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*GetPersonRequest) XXX_Merge ¶
func (m *GetPersonRequest) XXX_Merge(src proto.Message)
func (*GetPersonRequest) XXX_Size ¶
func (m *GetPersonRequest) XXX_Size() int
func (*GetPersonRequest) XXX_Unmarshal ¶
func (m *GetPersonRequest) XXX_Unmarshal(b []byte) error
type GetPersonResponse ¶
type GetPersonResponse struct { Persons []*Person `protobuf:"bytes,1,rep,name=persons,proto3" json:"persons,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
Responses //================================================================|
func (*GetPersonResponse) Descriptor ¶
func (*GetPersonResponse) Descriptor() ([]byte, []int)
func (*GetPersonResponse) GetPersons ¶
func (m *GetPersonResponse) GetPersons() []*Person
func (*GetPersonResponse) ProtoMessage ¶
func (*GetPersonResponse) ProtoMessage()
func (*GetPersonResponse) Reset ¶
func (m *GetPersonResponse) Reset()
func (*GetPersonResponse) String ¶
func (m *GetPersonResponse) String() string
func (*GetPersonResponse) XXX_DiscardUnknown ¶
func (m *GetPersonResponse) XXX_DiscardUnknown()
func (*GetPersonResponse) XXX_Marshal ¶
func (m *GetPersonResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*GetPersonResponse) XXX_Merge ¶
func (m *GetPersonResponse) XXX_Merge(src proto.Message)
func (*GetPersonResponse) XXX_Size ¶
func (m *GetPersonResponse) XXX_Size() int
func (*GetPersonResponse) XXX_Unmarshal ¶
func (m *GetPersonResponse) XXX_Unmarshal(b []byte) error
type Person ¶
type Person struct { Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` Phones []*Phone `protobuf:"bytes,3,rep,name=phones,proto3" json:"phones,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Person) Descriptor ¶
func (*Person) ProtoMessage ¶
func (*Person) ProtoMessage()
func (*Person) XXX_DiscardUnknown ¶
func (m *Person) XXX_DiscardUnknown()
func (*Person) XXX_Marshal ¶
func (*Person) XXX_Unmarshal ¶
type PersonServiceClient ¶
type PersonServiceClient interface {
GetPerson(ctx context.Context, in *GetPersonRequest, opts ...grpc.CallOption) (*GetPersonResponse, error)
}
PersonServiceClient is the client API for PersonService service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewPersonServiceClient ¶
func NewPersonServiceClient(cc *grpc.ClientConn) PersonServiceClient
type PersonServiceServer ¶
type PersonServiceServer interface {
GetPerson(context.Context, *GetPersonRequest) (*GetPersonResponse, error)
}
PersonServiceServer is the server API for PersonService service.
type Phone ¶
type Phone struct { Number string `protobuf:"bytes,1,opt,name=number,proto3" json:"number,omitempty"` Type PhoneType `protobuf:"varint,2,opt,name=type,proto3,enum=personService.PhoneType" json:"type,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Phone) Descriptor ¶
func (*Phone) ProtoMessage ¶
func (*Phone) ProtoMessage()
func (*Phone) XXX_DiscardUnknown ¶
func (m *Phone) XXX_DiscardUnknown()
func (*Phone) XXX_Marshal ¶
func (*Phone) XXX_Unmarshal ¶
type PhoneType ¶
type PhoneType int32
Classes, Types //===========================================================|
func (PhoneType) EnumDescriptor ¶
type UnimplementedPersonServiceServer ¶
type UnimplementedPersonServiceServer struct { }
UnimplementedPersonServiceServer can be embedded to have forward compatible implementations.
func (*UnimplementedPersonServiceServer) GetPerson ¶
func (*UnimplementedPersonServiceServer) GetPerson(ctx context.Context, req *GetPersonRequest) (*GetPersonResponse, error)
Click to show internal directories.
Click to hide internal directories.