file

package
Version: v0.0.0-...-bf09db0 Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2021 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

func NewFileEndpoints

func NewFileEndpoints() []*api.Endpoint

func RegisterFileHandler

func RegisterFileHandler(s server.Server, hdlr FileHandler, opts ...server.HandlerOption) error

Types

type DealFileRequest

type DealFileRequest struct {
	FileName string `protobuf:"bytes,1,opt,name=file_name,json=fileName,proto3" json:"file_name,omitempty"`
	Param    string `protobuf:"bytes,2,opt,name=param,proto3" json:"param,omitempty"`
	// contains filtered or unexported fields
}

func (*DealFileRequest) Descriptor deprecated

This method has been deprecated.
func (*DealFileRequest) Descriptor() ([]byte, []int)

Deprecated: Use DealFileRequest.ProtoReflect.Descriptor instead.

func (*DealFileRequest) GetFileName

func (x *DealFileRequest) GetFileName() string

func (*DealFileRequest) GetParam

func (x *DealFileRequest) GetParam() string

func (*DealFileRequest) ProtoMessage

func (*DealFileRequest) ProtoMessage()

func (*DealFileRequest) ProtoReflect

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

func (*DealFileRequest) Reset

func (x *DealFileRequest) Reset()

func (*DealFileRequest) String

func (x *DealFileRequest) String() string

type DealFileRespond

type DealFileRespond struct {
	Md5 string `protobuf:"bytes,1,opt,name=md5,proto3" json:"md5,omitempty"`
	// contains filtered or unexported fields
}

func (*DealFileRespond) Descriptor deprecated

This method has been deprecated.
func (*DealFileRespond) Descriptor() ([]byte, []int)

Deprecated: Use DealFileRespond.ProtoReflect.Descriptor instead.

func (*DealFileRespond) GetMd5

func (x *DealFileRespond) GetMd5() string

func (*DealFileRespond) ProtoMessage

func (*DealFileRespond) ProtoMessage()

func (*DealFileRespond) ProtoReflect

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

func (*DealFileRespond) Reset

func (x *DealFileRespond) Reset()

func (*DealFileRespond) String

func (x *DealFileRespond) String() string

type FileByte

type FileByte struct {
	Byte []byte `protobuf:"bytes,1,opt,name=byte,proto3" json:"byte,omitempty"`
	Len  int64  `protobuf:"varint,2,opt,name=len,proto3" json:"len,omitempty"`
	// contains filtered or unexported fields
}

文件字节内容

func (*FileByte) Descriptor deprecated

This method has been deprecated.
func (*FileByte) Descriptor() ([]byte, []int)

Deprecated: Use FileByte.ProtoReflect.Descriptor instead.

func (*FileByte) GetByte

func (x *FileByte) GetByte() []byte

func (*FileByte) GetLen

func (x *FileByte) GetLen() int64

func (*FileByte) ProtoMessage

func (*FileByte) ProtoMessage()

func (*FileByte) ProtoReflect

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

func (*FileByte) Reset

func (x *FileByte) Reset()

func (*FileByte) String

func (x *FileByte) String() string

type FileHandler

type FileHandler interface {
	// 定义一个客户端流式调用
	File(context.Context, File_FileStream) error
	DealFile(context.Context, *DealFileRequest, *DealFileRespond) error
}

type FileMsg

type FileMsg struct {
	FileName string `protobuf:"bytes,1,opt,name=file_name,json=fileName,proto3" json:"file_name,omitempty"`
	// contains filtered or unexported fields
}

文件传输完成后返回文件信息

func (*FileMsg) Descriptor deprecated

This method has been deprecated.
func (*FileMsg) Descriptor() ([]byte, []int)

Deprecated: Use FileMsg.ProtoReflect.Descriptor instead.

func (*FileMsg) GetFileName

func (x *FileMsg) GetFileName() string

func (*FileMsg) ProtoMessage

func (*FileMsg) ProtoMessage()

func (*FileMsg) ProtoReflect

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

func (*FileMsg) Reset

func (x *FileMsg) Reset()

func (*FileMsg) String

func (x *FileMsg) String() string

type FileService

type FileService interface {
	// 定义一个客户端流式调用
	File(ctx context.Context, opts ...client.CallOption) (File_FileService, error)
	DealFile(ctx context.Context, in *DealFileRequest, opts ...client.CallOption) (*DealFileRespond, error)
}

func NewFileService

func NewFileService(name string, c client.Client) FileService

type File_FileService

type File_FileService interface {
	Context() context.Context
	SendMsg(interface{}) error
	RecvMsg(interface{}) error
	Close() error
	Send(*FileByte) error
}

type File_FileStream

type File_FileStream interface {
	Context() context.Context
	SendMsg(interface{}) error
	RecvMsg(interface{}) error
	Close() error
	Recv() (*FileByte, error)
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL