Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( OperType_name = map[int32]string{ 0: "OPERTYPE_UNKNOWN", 1: "OPERTYPE_UPLOAD", 2: "OPERTYPE_DOWNLOAD", } OperType_value = map[string]int32{ "OPERTYPE_UNKNOWN": 0, "OPERTYPE_UPLOAD": 1, "OPERTYPE_DOWNLOAD": 2, } )
Enum value maps for OperType.
var CosSvr_ServiceDesc = grpc.ServiceDesc{ ServiceName: "cos.cos_svr", HandlerType: (*CosSvrServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "GetList", Handler: _CosSvr_GetList_Handler, }, { MethodName: "Set", Handler: _CosSvr_Set_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "cos.proto", }
CosSvr_ServiceDesc is the grpc.ServiceDesc for CosSvr service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_cos_proto protoreflect.FileDescriptor
Functions ¶
func RegisterCosSvrServer ¶
func RegisterCosSvrServer(s grpc.ServiceRegistrar, srv CosSvrServer)
Types ¶
type CosSvrClient ¶
type CosSvrClient interface { GetList(ctx context.Context, in *GetListReq, opts ...grpc.CallOption) (*GetListRsp, error) Set(ctx context.Context, in *SetReq, opts ...grpc.CallOption) (*SetRsp, error) }
CosSvrClient is the client API for CosSvr 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 NewCosSvrClient ¶
func NewCosSvrClient(cc grpc.ClientConnInterface) CosSvrClient
type CosSvrServer ¶
type CosSvrServer interface { GetList(context.Context, *GetListReq) (*GetListRsp, error) Set(context.Context, *SetReq) (*SetRsp, error) // contains filtered or unexported methods }
CosSvrServer is the server API for CosSvr service. All implementations must embed UnimplementedCosSvrServer for forward compatibility
type GetListReq ¶
type GetListReq struct { Start int32 `protobuf:"varint,1,opt,name=start,proto3" json:"start,omitempty"` Limit int32 `protobuf:"varint,2,opt,name=limit,proto3" json:"limit,omitempty"` // contains filtered or unexported fields }
func (*GetListReq) Descriptor
deprecated
func (*GetListReq) Descriptor() ([]byte, []int)
Deprecated: Use GetListReq.ProtoReflect.Descriptor instead.
func (*GetListReq) GetLimit ¶
func (x *GetListReq) GetLimit() int32
func (*GetListReq) GetStart ¶
func (x *GetListReq) GetStart() int32
func (*GetListReq) ProtoMessage ¶
func (*GetListReq) ProtoMessage()
func (*GetListReq) ProtoReflect ¶
func (x *GetListReq) ProtoReflect() protoreflect.Message
func (*GetListReq) Reset ¶
func (x *GetListReq) Reset()
func (*GetListReq) String ¶
func (x *GetListReq) String() string
type GetListRsp ¶
type GetListRsp struct { IsEnd bool `protobuf:"varint,1,opt,name=is_end,json=isEnd,proto3" json:"is_end,omitempty"` Total int64 `protobuf:"varint,2,opt,name=total,proto3" json:"total,omitempty"` // contains filtered or unexported fields }
func (*GetListRsp) Descriptor
deprecated
func (*GetListRsp) Descriptor() ([]byte, []int)
Deprecated: Use GetListRsp.ProtoReflect.Descriptor instead.
func (*GetListRsp) GetIsEnd ¶
func (x *GetListRsp) GetIsEnd() bool
func (*GetListRsp) GetTotal ¶
func (x *GetListRsp) GetTotal() int64
func (*GetListRsp) ProtoMessage ¶
func (*GetListRsp) ProtoMessage()
func (*GetListRsp) ProtoReflect ¶
func (x *GetListRsp) ProtoReflect() protoreflect.Message
func (*GetListRsp) Reset ¶
func (x *GetListRsp) Reset()
func (*GetListRsp) String ¶
func (x *GetListRsp) String() string
type OperType ¶
type OperType int32
func (OperType) Descriptor ¶
func (OperType) Descriptor() protoreflect.EnumDescriptor
func (OperType) EnumDescriptor
deprecated
func (OperType) Number ¶
func (x OperType) Number() protoreflect.EnumNumber
func (OperType) Type ¶
func (OperType) Type() protoreflect.EnumType
type SetReq ¶
type SetReq struct { ISBN string `protobuf:"bytes,1,opt,name=ISBN,proto3" json:"ISBN,omitempty"` Type OperType `protobuf:"varint,2,opt,name=type,proto3,enum=cos.OperType" json:"type,omitempty"` // contains filtered or unexported fields }
func (*SetReq) Descriptor
deprecated
func (*SetReq) ProtoMessage ¶
func (*SetReq) ProtoMessage()
func (*SetReq) ProtoReflect ¶
func (x *SetReq) ProtoReflect() protoreflect.Message
type SetRsp ¶
type SetRsp struct { DownloadUrl string `protobuf:"bytes,1,opt,name=download_url,json=downloadUrl,proto3" json:"download_url,omitempty"` // contains filtered or unexported fields }
func (*SetRsp) Descriptor
deprecated
func (*SetRsp) GetDownloadUrl ¶
func (*SetRsp) ProtoMessage ¶
func (*SetRsp) ProtoMessage()
func (*SetRsp) ProtoReflect ¶
func (x *SetRsp) ProtoReflect() protoreflect.Message
type UnimplementedCosSvrServer ¶
type UnimplementedCosSvrServer struct { }
UnimplementedCosSvrServer must be embedded to have forward compatible implementations.
func (UnimplementedCosSvrServer) GetList ¶
func (UnimplementedCosSvrServer) GetList(context.Context, *GetListReq) (*GetListRsp, error)
type UnsafeCosSvrServer ¶
type UnsafeCosSvrServer interface {
// contains filtered or unexported methods
}
UnsafeCosSvrServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to CosSvrServer will result in compilation errors.