Documentation
¶
Index ¶
- Variables
- func RegisterPeopleServer(s grpc.ServiceRegistrar, srv PeopleServer)
- type Biking
- type Coding
- type CreateRequest
- func (*CreateRequest) Descriptor() ([]byte, []int)deprecated
- func (x *CreateRequest) GetEmployment() Person_Employment
- func (x *CreateRequest) GetFirstName() string
- func (x *CreateRequest) GetHobby() *Hobby
- func (x *CreateRequest) GetId() string
- func (x *CreateRequest) GetLastName() string
- func (*CreateRequest) ProtoMessage()
- func (x *CreateRequest) ProtoReflect() protoreflect.Message
- func (x *CreateRequest) Reset()
- func (x *CreateRequest) String() string
- type CreateResponse
- type DeleteRequest
- type DeleteResponse
- type GetRequest
- type GetResponse
- type Hobby
- func (*Hobby) Descriptor() ([]byte, []int)deprecated
- func (x *Hobby) GetBiking() *Biking
- func (x *Hobby) GetCoding() *Coding
- func (x *Hobby) GetReading() *Reading
- func (m *Hobby) GetType() isHobby_Type
- func (*Hobby) ProtoMessage()
- func (x *Hobby) ProtoReflect() protoreflect.Message
- func (x *Hobby) Reset()
- func (x *Hobby) String() string
- type Hobby_Biking
- type Hobby_Coding
- type Hobby_Reading
- type ListRequest
- type ListResponse
- type PeopleClient
- type PeopleServer
- type Person
- func (*Person) Descriptor() ([]byte, []int)deprecated
- func (x *Person) GetCreatedAt() *timestamppb.Timestamp
- func (x *Person) GetEmployment() Person_Employment
- func (x *Person) GetFirstName() string
- func (x *Person) GetHobby() *Hobby
- func (x *Person) GetId() string
- func (x *Person) GetLastName() string
- func (x *Person) GetUpdatedAt() *timestamppb.Timestamp
- func (*Person) ProtoMessage()
- func (x *Person) ProtoReflect() protoreflect.Message
- func (x *Person) Reset()
- func (x *Person) String() string
- type Person_Employment
- func (Person_Employment) Descriptor() protoreflect.EnumDescriptor
- func (x Person_Employment) Enum() *Person_Employment
- func (Person_Employment) EnumDescriptor() ([]byte, []int)deprecated
- func (x Person_Employment) Number() protoreflect.EnumNumber
- func (x Person_Employment) String() string
- func (Person_Employment) Type() protoreflect.EnumType
- type Reading
- type UnimplementedPeopleServer
- func (UnimplementedPeopleServer) Create(context.Context, *CreateRequest) (*CreateResponse, error)
- func (UnimplementedPeopleServer) Delete(context.Context, *DeleteRequest) (*DeleteResponse, error)
- func (UnimplementedPeopleServer) Get(context.Context, *GetRequest) (*GetResponse, error)
- func (UnimplementedPeopleServer) List(context.Context, *ListRequest) (*ListResponse, error)
- func (UnimplementedPeopleServer) Ping(context.Context, *emptypb.Empty) (*emptypb.Empty, error)
- type UnsafePeopleServer
Constants ¶
This section is empty.
Variables ¶
var ( Person_Employment_name = map[int32]string{ 0: "UNSET", 1: "EMPLOYED", 2: "UNEMPLOYED", } Person_Employment_value = map[string]int32{ "UNSET": 0, "EMPLOYED": 1, "UNEMPLOYED": 2, } )
Enum value maps for Person_Employment.
var File_v1_service_proto protoreflect.FileDescriptor
var People_ServiceDesc = grpc.ServiceDesc{ ServiceName: "example.v1.People", HandlerType: (*PeopleServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Create", Handler: _People_Create_Handler, }, { MethodName: "Get", Handler: _People_Get_Handler, }, { MethodName: "Delete", Handler: _People_Delete_Handler, }, { MethodName: "List", Handler: _People_List_Handler, }, { MethodName: "Ping", Handler: _People_Ping_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "v1/service.proto", }
People_ServiceDesc is the grpc.ServiceDesc for People service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterPeopleServer ¶
func RegisterPeopleServer(s grpc.ServiceRegistrar, srv PeopleServer)
Types ¶
type Biking ¶
type Biking struct { Style string `protobuf:"bytes,1,opt,name=style,proto3" json:"style,omitempty"` // contains filtered or unexported fields }
func (*Biking) Descriptor
deprecated
func (*Biking) ProtoMessage ¶
func (*Biking) ProtoMessage()
func (*Biking) ProtoReflect ¶
func (x *Biking) ProtoReflect() protoreflect.Message
type Coding ¶
type Coding struct { Language string `protobuf:"bytes,1,opt,name=language,proto3" json:"language,omitempty"` // contains filtered or unexported fields }
func (*Coding) Descriptor
deprecated
func (*Coding) GetLanguage ¶
func (*Coding) ProtoMessage ¶
func (*Coding) ProtoMessage()
func (*Coding) ProtoReflect ¶
func (x *Coding) ProtoReflect() protoreflect.Message
type CreateRequest ¶
type CreateRequest struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` FirstName string `protobuf:"bytes,2,opt,name=first_name,json=firstName,proto3" json:"first_name,omitempty"` LastName string `protobuf:"bytes,3,opt,name=last_name,json=lastName,proto3" json:"last_name,omitempty"` Employment Person_Employment `protobuf:"varint,4,opt,name=employment,proto3,enum=example.v1.Person_Employment" json:"employment,omitempty"` Hobby *Hobby `protobuf:"bytes,5,opt,name=hobby,proto3" json:"hobby,omitempty"` // contains filtered or unexported fields }
func (*CreateRequest) Descriptor
deprecated
func (*CreateRequest) Descriptor() ([]byte, []int)
Deprecated: Use CreateRequest.ProtoReflect.Descriptor instead.
func (*CreateRequest) GetEmployment ¶
func (x *CreateRequest) GetEmployment() Person_Employment
func (*CreateRequest) GetFirstName ¶
func (x *CreateRequest) GetFirstName() string
func (*CreateRequest) GetHobby ¶
func (x *CreateRequest) GetHobby() *Hobby
func (*CreateRequest) GetId ¶
func (x *CreateRequest) GetId() string
func (*CreateRequest) GetLastName ¶
func (x *CreateRequest) GetLastName() string
func (*CreateRequest) ProtoMessage ¶
func (*CreateRequest) ProtoMessage()
func (*CreateRequest) ProtoReflect ¶
func (x *CreateRequest) ProtoReflect() protoreflect.Message
func (*CreateRequest) Reset ¶
func (x *CreateRequest) Reset()
func (*CreateRequest) String ¶
func (x *CreateRequest) String() string
type CreateResponse ¶
type CreateResponse struct { Person *Person `protobuf:"bytes,1,opt,name=person,proto3" json:"person,omitempty"` // contains filtered or unexported fields }
func (*CreateResponse) Descriptor
deprecated
func (*CreateResponse) Descriptor() ([]byte, []int)
Deprecated: Use CreateResponse.ProtoReflect.Descriptor instead.
func (*CreateResponse) GetPerson ¶
func (x *CreateResponse) GetPerson() *Person
func (*CreateResponse) ProtoMessage ¶
func (*CreateResponse) ProtoMessage()
func (*CreateResponse) ProtoReflect ¶
func (x *CreateResponse) ProtoReflect() protoreflect.Message
func (*CreateResponse) Reset ¶
func (x *CreateResponse) Reset()
func (*CreateResponse) String ¶
func (x *CreateResponse) String() string
type DeleteRequest ¶
type DeleteRequest struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
func (*DeleteRequest) Descriptor
deprecated
func (*DeleteRequest) Descriptor() ([]byte, []int)
Deprecated: Use DeleteRequest.ProtoReflect.Descriptor instead.
func (*DeleteRequest) GetId ¶
func (x *DeleteRequest) GetId() string
func (*DeleteRequest) ProtoMessage ¶
func (*DeleteRequest) ProtoMessage()
func (*DeleteRequest) ProtoReflect ¶
func (x *DeleteRequest) ProtoReflect() protoreflect.Message
func (*DeleteRequest) Reset ¶
func (x *DeleteRequest) Reset()
func (*DeleteRequest) String ¶
func (x *DeleteRequest) String() string
type DeleteResponse ¶
type DeleteResponse struct {
// contains filtered or unexported fields
}
func (*DeleteResponse) Descriptor
deprecated
func (*DeleteResponse) Descriptor() ([]byte, []int)
Deprecated: Use DeleteResponse.ProtoReflect.Descriptor instead.
func (*DeleteResponse) ProtoMessage ¶
func (*DeleteResponse) ProtoMessage()
func (*DeleteResponse) ProtoReflect ¶
func (x *DeleteResponse) ProtoReflect() protoreflect.Message
func (*DeleteResponse) Reset ¶
func (x *DeleteResponse) Reset()
func (*DeleteResponse) String ¶
func (x *DeleteResponse) String() string
type GetRequest ¶
type GetRequest struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
func (*GetRequest) Descriptor
deprecated
func (*GetRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetRequest.ProtoReflect.Descriptor instead.
func (*GetRequest) GetId ¶
func (x *GetRequest) GetId() string
func (*GetRequest) ProtoMessage ¶
func (*GetRequest) ProtoMessage()
func (*GetRequest) ProtoReflect ¶
func (x *GetRequest) ProtoReflect() protoreflect.Message
func (*GetRequest) Reset ¶
func (x *GetRequest) Reset()
func (*GetRequest) String ¶
func (x *GetRequest) String() string
type GetResponse ¶
type GetResponse struct { Person *Person `protobuf:"bytes,1,opt,name=person,proto3" json:"person,omitempty"` // contains filtered or unexported fields }
func (*GetResponse) Descriptor
deprecated
func (*GetResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetResponse.ProtoReflect.Descriptor instead.
func (*GetResponse) GetPerson ¶
func (x *GetResponse) GetPerson() *Person
func (*GetResponse) ProtoMessage ¶
func (*GetResponse) ProtoMessage()
func (*GetResponse) ProtoReflect ¶
func (x *GetResponse) ProtoReflect() protoreflect.Message
func (*GetResponse) Reset ¶
func (x *GetResponse) Reset()
func (*GetResponse) String ¶
func (x *GetResponse) String() string
type Hobby ¶
type Hobby struct { // Types that are assignable to Type: // *Hobby_Coding // *Hobby_Reading // *Hobby_Biking Type isHobby_Type `protobuf_oneof:"type"` // contains filtered or unexported fields }
func (*Hobby) Descriptor
deprecated
func (*Hobby) GetReading ¶
func (*Hobby) ProtoMessage ¶
func (*Hobby) ProtoMessage()
func (*Hobby) ProtoReflect ¶
func (x *Hobby) ProtoReflect() protoreflect.Message
type Hobby_Biking ¶
type Hobby_Biking struct {
Biking *Biking `protobuf:"bytes,3,opt,name=biking,proto3,oneof"`
}
type Hobby_Coding ¶
type Hobby_Coding struct {
Coding *Coding `protobuf:"bytes,1,opt,name=coding,proto3,oneof"`
}
type Hobby_Reading ¶
type Hobby_Reading struct {
Reading *Reading `protobuf:"bytes,2,opt,name=reading,proto3,oneof"`
}
type ListRequest ¶
type ListRequest struct {
// contains filtered or unexported fields
}
func (*ListRequest) Descriptor
deprecated
func (*ListRequest) Descriptor() ([]byte, []int)
Deprecated: Use ListRequest.ProtoReflect.Descriptor instead.
func (*ListRequest) ProtoMessage ¶
func (*ListRequest) ProtoMessage()
func (*ListRequest) ProtoReflect ¶
func (x *ListRequest) ProtoReflect() protoreflect.Message
func (*ListRequest) Reset ¶
func (x *ListRequest) Reset()
func (*ListRequest) String ¶
func (x *ListRequest) String() string
type ListResponse ¶
type ListResponse struct { People []*Person `protobuf:"bytes,1,rep,name=people,proto3" json:"people,omitempty"` // contains filtered or unexported fields }
func (*ListResponse) Descriptor
deprecated
func (*ListResponse) Descriptor() ([]byte, []int)
Deprecated: Use ListResponse.ProtoReflect.Descriptor instead.
func (*ListResponse) GetPeople ¶
func (x *ListResponse) GetPeople() []*Person
func (*ListResponse) ProtoMessage ¶
func (*ListResponse) ProtoMessage()
func (*ListResponse) ProtoReflect ¶
func (x *ListResponse) ProtoReflect() protoreflect.Message
func (*ListResponse) Reset ¶
func (x *ListResponse) Reset()
func (*ListResponse) String ¶
func (x *ListResponse) String() string
type PeopleClient ¶
type PeopleClient interface { Create(ctx context.Context, in *CreateRequest, opts ...grpc.CallOption) (*CreateResponse, error) Get(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*GetResponse, error) Delete(ctx context.Context, in *DeleteRequest, opts ...grpc.CallOption) (*DeleteResponse, error) List(ctx context.Context, in *ListRequest, opts ...grpc.CallOption) (*ListResponse, error) Ping(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error) }
PeopleClient is the client API for People service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
func NewPeopleClient ¶
func NewPeopleClient(cc grpc.ClientConnInterface) PeopleClient
type PeopleServer ¶
type PeopleServer interface { Create(context.Context, *CreateRequest) (*CreateResponse, error) Get(context.Context, *GetRequest) (*GetResponse, error) Delete(context.Context, *DeleteRequest) (*DeleteResponse, error) List(context.Context, *ListRequest) (*ListResponse, error) Ping(context.Context, *emptypb.Empty) (*emptypb.Empty, error) // contains filtered or unexported methods }
PeopleServer is the server API for People service. All implementations must embed UnimplementedPeopleServer for forward compatibility
type Person ¶
type Person struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` FirstName string `protobuf:"bytes,2,opt,name=first_name,json=firstName,proto3" json:"first_name,omitempty"` LastName string `protobuf:"bytes,3,opt,name=last_name,json=lastName,proto3" json:"last_name,omitempty"` Employment Person_Employment `protobuf:"varint,4,opt,name=employment,proto3,enum=example.v1.Person_Employment" json:"employment,omitempty"` CreatedAt *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` Hobby *Hobby `protobuf:"bytes,7,opt,name=hobby,proto3" json:"hobby,omitempty"` // contains filtered or unexported fields }
func (*Person) Descriptor
deprecated
func (*Person) GetCreatedAt ¶
func (x *Person) GetCreatedAt() *timestamppb.Timestamp
func (*Person) GetEmployment ¶
func (x *Person) GetEmployment() Person_Employment
func (*Person) GetFirstName ¶
func (*Person) GetLastName ¶
func (*Person) GetUpdatedAt ¶
func (x *Person) GetUpdatedAt() *timestamppb.Timestamp
func (*Person) ProtoMessage ¶
func (*Person) ProtoMessage()
func (*Person) ProtoReflect ¶
func (x *Person) ProtoReflect() protoreflect.Message
type Person_Employment ¶
type Person_Employment int32
const ( Person_UNSET Person_Employment = 0 Person_EMPLOYED Person_Employment = 1 Person_UNEMPLOYED Person_Employment = 2 )
func (Person_Employment) Descriptor ¶
func (Person_Employment) Descriptor() protoreflect.EnumDescriptor
func (Person_Employment) Enum ¶
func (x Person_Employment) Enum() *Person_Employment
func (Person_Employment) EnumDescriptor
deprecated
func (Person_Employment) EnumDescriptor() ([]byte, []int)
Deprecated: Use Person_Employment.Descriptor instead.
func (Person_Employment) Number ¶
func (x Person_Employment) Number() protoreflect.EnumNumber
func (Person_Employment) String ¶
func (x Person_Employment) String() string
func (Person_Employment) Type ¶
func (Person_Employment) Type() protoreflect.EnumType
type Reading ¶
type Reading struct { Genre string `protobuf:"bytes,1,opt,name=genre,proto3" json:"genre,omitempty"` // contains filtered or unexported fields }
func (*Reading) Descriptor
deprecated
func (*Reading) ProtoMessage ¶
func (*Reading) ProtoMessage()
func (*Reading) ProtoReflect ¶
func (x *Reading) ProtoReflect() protoreflect.Message
type UnimplementedPeopleServer ¶
type UnimplementedPeopleServer struct { }
UnimplementedPeopleServer must be embedded to have forward compatible implementations.
func (UnimplementedPeopleServer) Create ¶
func (UnimplementedPeopleServer) Create(context.Context, *CreateRequest) (*CreateResponse, error)
func (UnimplementedPeopleServer) Delete ¶
func (UnimplementedPeopleServer) Delete(context.Context, *DeleteRequest) (*DeleteResponse, error)
func (UnimplementedPeopleServer) Get ¶
func (UnimplementedPeopleServer) Get(context.Context, *GetRequest) (*GetResponse, error)
func (UnimplementedPeopleServer) List ¶
func (UnimplementedPeopleServer) List(context.Context, *ListRequest) (*ListResponse, error)
type UnsafePeopleServer ¶
type UnsafePeopleServer interface {
// contains filtered or unexported methods
}
UnsafePeopleServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to PeopleServer will result in compilation errors.