Documentation ¶
Index ¶
- Variables
- func RegisterService_2Server(s grpc.ServiceRegistrar, srv Service_2Server)
- type GetAllRequest
- func (*GetAllRequest) Descriptor() ([]byte, []int)deprecated
- func (x *GetAllRequest) GetLimit() int32
- func (x *GetAllRequest) GetOffset() int32
- func (x *GetAllRequest) GetSearch() string
- func (*GetAllRequest) ProtoMessage()
- func (x *GetAllRequest) ProtoReflect() protoreflect.Message
- func (x *GetAllRequest) Reset()
- func (x *GetAllRequest) String() string
- type GetAllResponse
- func (*GetAllResponse) Descriptor() ([]byte, []int)deprecated
- func (x *GetAllResponse) GetCount() int32
- func (x *GetAllResponse) GetPosts() []*Post
- func (*GetAllResponse) ProtoMessage()
- func (x *GetAllResponse) ProtoReflect() protoreflect.Message
- func (x *GetAllResponse) Reset()
- func (x *GetAllResponse) String() string
- type Id
- type Post
- func (*Post) Descriptor() ([]byte, []int)deprecated
- func (x *Post) GetBody() string
- func (x *Post) GetId() int32
- func (x *Post) GetTitle() string
- func (x *Post) GetUserId() int32
- func (*Post) ProtoMessage()
- func (x *Post) ProtoReflect() protoreflect.Message
- func (x *Post) Reset()
- func (x *Post) String() string
- type Service_2Client
- type Service_2Server
- type UnimplementedService_2Server
- func (UnimplementedService_2Server) Delete(context.Context, *Id) (*Id, error)
- func (UnimplementedService_2Server) GetAll(context.Context, *GetAllRequest) (*GetAllResponse, error)
- func (UnimplementedService_2Server) GetById(context.Context, *Id) (*Post, error)
- func (UnimplementedService_2Server) Update(context.Context, *Post) (*Post, error)
- type UnsafeService_2Server
Constants ¶
This section is empty.
Variables ¶
var File_service_2_proto protoreflect.FileDescriptor
var Service_2_ServiceDesc = grpc.ServiceDesc{ ServiceName: "service_2.Service_2", HandlerType: (*Service_2Server)(nil), Methods: []grpc.MethodDesc{ { MethodName: "GetAll", Handler: _Service_2_GetAll_Handler, }, { MethodName: "GetById", Handler: _Service_2_GetById_Handler, }, { MethodName: "Update", Handler: _Service_2_Update_Handler, }, { MethodName: "Delete", Handler: _Service_2_Delete_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "service_2.proto", }
Service_2_ServiceDesc is the grpc.ServiceDesc for Service_2 service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterService_2Server ¶
func RegisterService_2Server(s grpc.ServiceRegistrar, srv Service_2Server)
Types ¶
type GetAllRequest ¶
type GetAllRequest struct { Limit int32 `protobuf:"varint,1,opt,name=limit,proto3" json:"limit,omitempty"` Offset int32 `protobuf:"varint,2,opt,name=offset,proto3" json:"offset,omitempty"` Search string `protobuf:"bytes,3,opt,name=search,proto3" json:"search,omitempty"` // contains filtered or unexported fields }
func (*GetAllRequest) Descriptor
deprecated
func (*GetAllRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetAllRequest.ProtoReflect.Descriptor instead.
func (*GetAllRequest) GetLimit ¶
func (x *GetAllRequest) GetLimit() int32
func (*GetAllRequest) GetOffset ¶
func (x *GetAllRequest) GetOffset() int32
func (*GetAllRequest) GetSearch ¶
func (x *GetAllRequest) GetSearch() string
func (*GetAllRequest) ProtoMessage ¶
func (*GetAllRequest) ProtoMessage()
func (*GetAllRequest) ProtoReflect ¶
func (x *GetAllRequest) ProtoReflect() protoreflect.Message
func (*GetAllRequest) Reset ¶
func (x *GetAllRequest) Reset()
func (*GetAllRequest) String ¶
func (x *GetAllRequest) String() string
type GetAllResponse ¶
type GetAllResponse struct { Posts []*Post `protobuf:"bytes,1,rep,name=posts,proto3" json:"posts,omitempty"` Count int32 `protobuf:"varint,2,opt,name=count,proto3" json:"count,omitempty"` // contains filtered or unexported fields }
func (*GetAllResponse) Descriptor
deprecated
func (*GetAllResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetAllResponse.ProtoReflect.Descriptor instead.
func (*GetAllResponse) GetCount ¶
func (x *GetAllResponse) GetCount() int32
func (*GetAllResponse) GetPosts ¶
func (x *GetAllResponse) GetPosts() []*Post
func (*GetAllResponse) ProtoMessage ¶
func (*GetAllResponse) ProtoMessage()
func (*GetAllResponse) ProtoReflect ¶
func (x *GetAllResponse) ProtoReflect() protoreflect.Message
func (*GetAllResponse) Reset ¶
func (x *GetAllResponse) Reset()
func (*GetAllResponse) String ¶
func (x *GetAllResponse) String() string
type Id ¶
type Id struct { Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
func (*Id) Descriptor
deprecated
func (*Id) ProtoMessage ¶
func (*Id) ProtoMessage()
func (*Id) ProtoReflect ¶
func (x *Id) ProtoReflect() protoreflect.Message
type Post ¶
type Post struct { Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` UserId int32 `protobuf:"varint,2,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` Title string `protobuf:"bytes,3,opt,name=title,proto3" json:"title,omitempty"` Body string `protobuf:"bytes,4,opt,name=body,proto3" json:"body,omitempty"` // contains filtered or unexported fields }
func (*Post) Descriptor
deprecated
func (*Post) ProtoMessage ¶
func (*Post) ProtoMessage()
func (*Post) ProtoReflect ¶
func (x *Post) ProtoReflect() protoreflect.Message
type Service_2Client ¶
type Service_2Client interface { GetAll(ctx context.Context, in *GetAllRequest, opts ...grpc.CallOption) (*GetAllResponse, error) GetById(ctx context.Context, in *Id, opts ...grpc.CallOption) (*Post, error) Update(ctx context.Context, in *Post, opts ...grpc.CallOption) (*Post, error) Delete(ctx context.Context, in *Id, opts ...grpc.CallOption) (*Id, error) }
Service_2Client is the client API for Service_2 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 NewService_2Client ¶
func NewService_2Client(cc grpc.ClientConnInterface) Service_2Client
type Service_2Server ¶
type Service_2Server interface { GetAll(context.Context, *GetAllRequest) (*GetAllResponse, error) GetById(context.Context, *Id) (*Post, error) Update(context.Context, *Post) (*Post, error) Delete(context.Context, *Id) (*Id, error) // contains filtered or unexported methods }
Service_2Server is the server API for Service_2 service. All implementations must embed UnimplementedService_2Server for forward compatibility
type UnimplementedService_2Server ¶
type UnimplementedService_2Server struct { }
UnimplementedService_2Server must be embedded to have forward compatible implementations.
func (UnimplementedService_2Server) GetAll ¶
func (UnimplementedService_2Server) GetAll(context.Context, *GetAllRequest) (*GetAllResponse, error)
type UnsafeService_2Server ¶
type UnsafeService_2Server interface {
// contains filtered or unexported methods
}
UnsafeService_2Server may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to Service_2Server will result in compilation errors.