cos

package
v0.0.0-...-cd72781 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 20, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
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.

View Source
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)

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
const (
	OperType_OPERTYPE_UNKNOWN  OperType = 0
	OperType_OPERTYPE_UPLOAD   OperType = 1
	OperType_OPERTYPE_DOWNLOAD OperType = 2
)

func (OperType) Descriptor

func (OperType) Descriptor() protoreflect.EnumDescriptor

func (OperType) Enum

func (x OperType) Enum() *OperType

func (OperType) EnumDescriptor deprecated

func (OperType) EnumDescriptor() ([]byte, []int)

Deprecated: Use OperType.Descriptor instead.

func (OperType) Number

func (x OperType) Number() protoreflect.EnumNumber

func (OperType) String

func (x OperType) String() string

func (OperType) Type

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) Descriptor() ([]byte, []int)

Deprecated: Use SetReq.ProtoReflect.Descriptor instead.

func (*SetReq) GetISBN

func (x *SetReq) GetISBN() string

func (*SetReq) GetType

func (x *SetReq) GetType() OperType

func (*SetReq) ProtoMessage

func (*SetReq) ProtoMessage()

func (*SetReq) ProtoReflect

func (x *SetReq) ProtoReflect() protoreflect.Message

func (*SetReq) Reset

func (x *SetReq) Reset()

func (*SetReq) String

func (x *SetReq) String() string

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) Descriptor() ([]byte, []int)

Deprecated: Use SetRsp.ProtoReflect.Descriptor instead.

func (*SetRsp) GetDownloadUrl

func (x *SetRsp) GetDownloadUrl() string

func (*SetRsp) ProtoMessage

func (*SetRsp) ProtoMessage()

func (*SetRsp) ProtoReflect

func (x *SetRsp) ProtoReflect() protoreflect.Message

func (*SetRsp) Reset

func (x *SetRsp) Reset()

func (*SetRsp) String

func (x *SetRsp) String() string

type UnimplementedCosSvrServer

type UnimplementedCosSvrServer struct {
}

UnimplementedCosSvrServer must be embedded to have forward compatible implementations.

func (UnimplementedCosSvrServer) GetList

func (UnimplementedCosSvrServer) Set

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL