Documentation ¶
Index ¶
- Variables
- func RegisterCatsServer(s grpc.ServiceRegistrar, srv CatsServer)
- type BatchGetCatRequest
- func (*BatchGetCatRequest) Descriptor() ([]byte, []int)deprecated
- func (x *BatchGetCatRequest) GetIds() []string
- func (*BatchGetCatRequest) ProtoMessage()
- func (x *BatchGetCatRequest) ProtoReflect() protoreflect.Message
- func (x *BatchGetCatRequest) Reset()
- func (x *BatchGetCatRequest) String() string
- type BatchGetCatResponse
- func (*BatchGetCatResponse) Descriptor() ([]byte, []int)deprecated
- func (x *BatchGetCatResponse) GetCats() []*cat.Cat
- func (*BatchGetCatResponse) ProtoMessage()
- func (x *BatchGetCatResponse) ProtoReflect() protoreflect.Message
- func (x *BatchGetCatResponse) Reset()
- func (x *BatchGetCatResponse) String() string
- type BatchGetCatResponseCodec
- type CatsClient
- type CatsServer
- type CreateCatRequest
- type DeleteCatRequest
- type GetCatRequest
- type ListCatsRequest
- func (*ListCatsRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ListCatsRequest) GetPageSize() int32
- func (x *ListCatsRequest) GetPageToken() string
- func (x *ListCatsRequest) GetSkip() int32
- func (*ListCatsRequest) ProtoMessage()
- func (x *ListCatsRequest) ProtoReflect() protoreflect.Message
- func (x *ListCatsRequest) Reset()
- func (x *ListCatsRequest) String() string
- type ListCatsResponse
- func (*ListCatsResponse) Descriptor() ([]byte, []int)deprecated
- func (x *ListCatsResponse) GetCats() []*cat.Cat
- func (x *ListCatsResponse) GetNextPageToken() string
- func (x *ListCatsResponse) GetTotalCount() int32
- func (*ListCatsResponse) ProtoMessage()
- func (x *ListCatsResponse) ProtoReflect() protoreflect.Message
- func (x *ListCatsResponse) Reset()
- func (x *ListCatsResponse) String() string
- type ListCatsResponseCodec
- type UnimplementedCatsServer
- func (UnimplementedCatsServer) BatchGetCat(context.Context, *BatchGetCatRequest) (*BatchGetCatResponse, error)
- func (UnimplementedCatsServer) CreateCat(context.Context, *CreateCatRequest) (*cat.Cat, error)
- func (UnimplementedCatsServer) DeleteCat(context.Context, *DeleteCatRequest) (*core.Null, error)
- func (UnimplementedCatsServer) GetCat(context.Context, *GetCatRequest) (*cat.Cat, error)
- func (UnimplementedCatsServer) ListCats(context.Context, *ListCatsRequest) (*ListCatsResponse, error)
- func (UnimplementedCatsServer) UpdateCat(context.Context, *UpdateCatRequest) (*cat.Cat, error)
- type UnsafeCatsServer
- type UpdateCatRequest
Constants ¶
This section is empty.
Variables ¶
var Cats_ServiceDesc = grpc.ServiceDesc{ ServiceName: "cat.v1.Cats", HandlerType: (*CatsServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "create_cat", Handler: _Cats_CreateCat_Handler, }, { MethodName: "update_cat", Handler: _Cats_UpdateCat_Handler, }, { MethodName: "get_cat", Handler: _Cats_GetCat_Handler, }, { MethodName: "list_cats", Handler: _Cats_ListCats_Handler, }, { MethodName: "batch_get_cat", Handler: _Cats_BatchGetCat_Handler, }, { MethodName: "delete_cat", Handler: _Cats_DeleteCat_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "cat/v1/cats.proto", }
Cats_ServiceDesc is the grpc.ServiceDesc for Cats service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_cat_v1_cats_proto protoreflect.FileDescriptor
Functions ¶
func RegisterCatsServer ¶
func RegisterCatsServer(s grpc.ServiceRegistrar, srv CatsServer)
Types ¶
type BatchGetCatRequest ¶
type BatchGetCatRequest struct { Ids []string `protobuf:"bytes,1,rep,name=ids,proto3" json:"ids,omitempty"` // contains filtered or unexported fields }
func (*BatchGetCatRequest) Descriptor
deprecated
func (*BatchGetCatRequest) Descriptor() ([]byte, []int)
Deprecated: Use BatchGetCatRequest.ProtoReflect.Descriptor instead.
func (*BatchGetCatRequest) GetIds ¶
func (x *BatchGetCatRequest) GetIds() []string
func (*BatchGetCatRequest) ProtoMessage ¶
func (*BatchGetCatRequest) ProtoMessage()
func (*BatchGetCatRequest) ProtoReflect ¶
func (x *BatchGetCatRequest) ProtoReflect() protoreflect.Message
func (*BatchGetCatRequest) Reset ¶
func (x *BatchGetCatRequest) Reset()
func (*BatchGetCatRequest) String ¶
func (x *BatchGetCatRequest) String() string
type BatchGetCatResponse ¶
type BatchGetCatResponse struct { Cats []*cat.Cat `protobuf:"bytes,1,rep,name=cats,proto3" json:"cats,omitempty"` // contains filtered or unexported fields }
func (*BatchGetCatResponse) Descriptor
deprecated
func (*BatchGetCatResponse) Descriptor() ([]byte, []int)
Deprecated: Use BatchGetCatResponse.ProtoReflect.Descriptor instead.
func (*BatchGetCatResponse) GetCats ¶
func (x *BatchGetCatResponse) GetCats() []*cat.Cat
func (*BatchGetCatResponse) ProtoMessage ¶
func (*BatchGetCatResponse) ProtoMessage()
func (*BatchGetCatResponse) ProtoReflect ¶
func (x *BatchGetCatResponse) ProtoReflect() protoreflect.Message
func (*BatchGetCatResponse) Reset ¶
func (x *BatchGetCatResponse) Reset()
func (*BatchGetCatResponse) String ¶
func (x *BatchGetCatResponse) String() string
type BatchGetCatResponseCodec ¶
type BatchGetCatResponseCodec struct { }
func (*BatchGetCatResponseCodec) Decode ¶
func (codec *BatchGetCatResponseCodec) Decode(ptr unsafe.Pointer, iter *jsoniter.Iterator)
type CatsClient ¶
type CatsClient interface { CreateCat(ctx context.Context, in *CreateCatRequest, opts ...grpc.CallOption) (*cat.Cat, error) UpdateCat(ctx context.Context, in *UpdateCatRequest, opts ...grpc.CallOption) (*cat.Cat, error) GetCat(ctx context.Context, in *GetCatRequest, opts ...grpc.CallOption) (*cat.Cat, error) ListCats(ctx context.Context, in *ListCatsRequest, opts ...grpc.CallOption) (*ListCatsResponse, error) BatchGetCat(ctx context.Context, in *BatchGetCatRequest, opts ...grpc.CallOption) (*BatchGetCatResponse, error) DeleteCat(ctx context.Context, in *DeleteCatRequest, opts ...grpc.CallOption) (*core.Null, error) }
CatsClient is the client API for Cats 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 NewCatsClient ¶
func NewCatsClient(cc grpc.ClientConnInterface) CatsClient
type CatsServer ¶
type CatsServer interface { CreateCat(context.Context, *CreateCatRequest) (*cat.Cat, error) UpdateCat(context.Context, *UpdateCatRequest) (*cat.Cat, error) GetCat(context.Context, *GetCatRequest) (*cat.Cat, error) ListCats(context.Context, *ListCatsRequest) (*ListCatsResponse, error) BatchGetCat(context.Context, *BatchGetCatRequest) (*BatchGetCatResponse, error) DeleteCat(context.Context, *DeleteCatRequest) (*core.Null, error) // contains filtered or unexported methods }
CatsServer is the server API for Cats service. All implementations must embed UnimplementedCatsServer for forward compatibility
type CreateCatRequest ¶
type CreateCatRequest struct { Cat *cat.Cat `protobuf:"bytes,1,opt,name=cat,proto3" json:"cat,omitempty"` // contains filtered or unexported fields }
func (*CreateCatRequest) Descriptor
deprecated
func (*CreateCatRequest) Descriptor() ([]byte, []int)
Deprecated: Use CreateCatRequest.ProtoReflect.Descriptor instead.
func (*CreateCatRequest) GetCat ¶
func (x *CreateCatRequest) GetCat() *cat.Cat
func (*CreateCatRequest) ProtoMessage ¶
func (*CreateCatRequest) ProtoMessage()
func (*CreateCatRequest) ProtoReflect ¶
func (x *CreateCatRequest) ProtoReflect() protoreflect.Message
func (*CreateCatRequest) Reset ¶
func (x *CreateCatRequest) Reset()
func (*CreateCatRequest) String ¶
func (x *CreateCatRequest) String() string
type DeleteCatRequest ¶
type DeleteCatRequest struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
func (*DeleteCatRequest) Descriptor
deprecated
func (*DeleteCatRequest) Descriptor() ([]byte, []int)
Deprecated: Use DeleteCatRequest.ProtoReflect.Descriptor instead.
func (*DeleteCatRequest) GetId ¶
func (x *DeleteCatRequest) GetId() string
func (*DeleteCatRequest) ProtoMessage ¶
func (*DeleteCatRequest) ProtoMessage()
func (*DeleteCatRequest) ProtoReflect ¶
func (x *DeleteCatRequest) ProtoReflect() protoreflect.Message
func (*DeleteCatRequest) Reset ¶
func (x *DeleteCatRequest) Reset()
func (*DeleteCatRequest) String ¶
func (x *DeleteCatRequest) String() string
type GetCatRequest ¶
type GetCatRequest struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
func (*GetCatRequest) Descriptor
deprecated
func (*GetCatRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetCatRequest.ProtoReflect.Descriptor instead.
func (*GetCatRequest) GetId ¶
func (x *GetCatRequest) GetId() string
func (*GetCatRequest) ProtoMessage ¶
func (*GetCatRequest) ProtoMessage()
func (*GetCatRequest) ProtoReflect ¶
func (x *GetCatRequest) ProtoReflect() protoreflect.Message
func (*GetCatRequest) Reset ¶
func (x *GetCatRequest) Reset()
func (*GetCatRequest) String ¶
func (x *GetCatRequest) String() string
type ListCatsRequest ¶
type ListCatsRequest struct { PageSize int32 `protobuf:"varint,2000,opt,name=page_size,json=pageSize,proto3" json:"pageSize,omitempty"` PageToken string `protobuf:"bytes,2001,opt,name=page_token,json=pageToken,proto3" json:"pageToken,omitempty"` Skip int32 `protobuf:"varint,2002,opt,name=skip,proto3" json:"skip,omitempty"` // contains filtered or unexported fields }
func (*ListCatsRequest) Descriptor
deprecated
func (*ListCatsRequest) Descriptor() ([]byte, []int)
Deprecated: Use ListCatsRequest.ProtoReflect.Descriptor instead.
func (*ListCatsRequest) GetPageSize ¶
func (x *ListCatsRequest) GetPageSize() int32
func (*ListCatsRequest) GetPageToken ¶
func (x *ListCatsRequest) GetPageToken() string
func (*ListCatsRequest) GetSkip ¶
func (x *ListCatsRequest) GetSkip() int32
func (*ListCatsRequest) ProtoMessage ¶
func (*ListCatsRequest) ProtoMessage()
func (*ListCatsRequest) ProtoReflect ¶
func (x *ListCatsRequest) ProtoReflect() protoreflect.Message
func (*ListCatsRequest) Reset ¶
func (x *ListCatsRequest) Reset()
func (*ListCatsRequest) String ¶
func (x *ListCatsRequest) String() string
type ListCatsResponse ¶
type ListCatsResponse struct { Cats []*cat.Cat `protobuf:"bytes,1,rep,name=cats,proto3" json:"cats,omitempty"` TotalCount int32 `protobuf:"varint,2000,opt,name=total_count,json=totalCount,proto3" json:"totalCount,omitempty"` NextPageToken string `protobuf:"bytes,2001,opt,name=next_page_token,json=nextPageToken,proto3" json:"nextPageToken,omitempty"` // contains filtered or unexported fields }
func (*ListCatsResponse) Descriptor
deprecated
func (*ListCatsResponse) Descriptor() ([]byte, []int)
Deprecated: Use ListCatsResponse.ProtoReflect.Descriptor instead.
func (*ListCatsResponse) GetCats ¶
func (x *ListCatsResponse) GetCats() []*cat.Cat
func (*ListCatsResponse) GetNextPageToken ¶
func (x *ListCatsResponse) GetNextPageToken() string
func (*ListCatsResponse) GetTotalCount ¶
func (x *ListCatsResponse) GetTotalCount() int32
func (*ListCatsResponse) ProtoMessage ¶
func (*ListCatsResponse) ProtoMessage()
func (*ListCatsResponse) ProtoReflect ¶
func (x *ListCatsResponse) ProtoReflect() protoreflect.Message
func (*ListCatsResponse) Reset ¶
func (x *ListCatsResponse) Reset()
func (*ListCatsResponse) String ¶
func (x *ListCatsResponse) String() string
type ListCatsResponseCodec ¶
type ListCatsResponseCodec struct { }
func (*ListCatsResponseCodec) Decode ¶
func (codec *ListCatsResponseCodec) Decode(ptr unsafe.Pointer, iter *jsoniter.Iterator)
type UnimplementedCatsServer ¶
type UnimplementedCatsServer struct { }
UnimplementedCatsServer must be embedded to have forward compatible implementations.
func (UnimplementedCatsServer) BatchGetCat ¶
func (UnimplementedCatsServer) BatchGetCat(context.Context, *BatchGetCatRequest) (*BatchGetCatResponse, error)
func (UnimplementedCatsServer) CreateCat ¶
func (UnimplementedCatsServer) CreateCat(context.Context, *CreateCatRequest) (*cat.Cat, error)
func (UnimplementedCatsServer) DeleteCat ¶
func (UnimplementedCatsServer) DeleteCat(context.Context, *DeleteCatRequest) (*core.Null, error)
func (UnimplementedCatsServer) GetCat ¶
func (UnimplementedCatsServer) GetCat(context.Context, *GetCatRequest) (*cat.Cat, error)
func (UnimplementedCatsServer) ListCats ¶
func (UnimplementedCatsServer) ListCats(context.Context, *ListCatsRequest) (*ListCatsResponse, error)
func (UnimplementedCatsServer) UpdateCat ¶
func (UnimplementedCatsServer) UpdateCat(context.Context, *UpdateCatRequest) (*cat.Cat, error)
type UnsafeCatsServer ¶
type UnsafeCatsServer interface {
// contains filtered or unexported methods
}
UnsafeCatsServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to CatsServer will result in compilation errors.
type UpdateCatRequest ¶
type UpdateCatRequest struct { Cat *cat.Cat `protobuf:"bytes,1,opt,name=cat,proto3" json:"cat,omitempty"` // contains filtered or unexported fields }
func (*UpdateCatRequest) Descriptor
deprecated
func (*UpdateCatRequest) Descriptor() ([]byte, []int)
Deprecated: Use UpdateCatRequest.ProtoReflect.Descriptor instead.
func (*UpdateCatRequest) GetCat ¶
func (x *UpdateCatRequest) GetCat() *cat.Cat
func (*UpdateCatRequest) ProtoMessage ¶
func (*UpdateCatRequest) ProtoMessage()
func (*UpdateCatRequest) ProtoReflect ¶
func (x *UpdateCatRequest) ProtoReflect() protoreflect.Message
func (*UpdateCatRequest) Reset ¶
func (x *UpdateCatRequest) Reset()
func (*UpdateCatRequest) String ¶
func (x *UpdateCatRequest) String() string