file

package
v0.0.0-...-908d554 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2020 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

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"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*DealFileRequest) Descriptor

func (*DealFileRequest) Descriptor() ([]byte, []int)

func (*DealFileRequest) GetFileName

func (m *DealFileRequest) GetFileName() string

func (*DealFileRequest) GetParam

func (m *DealFileRequest) GetParam() string

func (*DealFileRequest) ProtoMessage

func (*DealFileRequest) ProtoMessage()

func (*DealFileRequest) Reset

func (m *DealFileRequest) Reset()

func (*DealFileRequest) String

func (m *DealFileRequest) String() string

func (*DealFileRequest) XXX_DiscardUnknown

func (m *DealFileRequest) XXX_DiscardUnknown()

func (*DealFileRequest) XXX_Marshal

func (m *DealFileRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*DealFileRequest) XXX_Merge

func (m *DealFileRequest) XXX_Merge(src proto.Message)

func (*DealFileRequest) XXX_Size

func (m *DealFileRequest) XXX_Size() int

func (*DealFileRequest) XXX_Unmarshal

func (m *DealFileRequest) XXX_Unmarshal(b []byte) error

type DealFileRespond

type DealFileRespond struct {
	Md5                  string   `protobuf:"bytes,1,opt,name=md5,proto3" json:"md5,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*DealFileRespond) Descriptor

func (*DealFileRespond) Descriptor() ([]byte, []int)

func (*DealFileRespond) GetMd5

func (m *DealFileRespond) GetMd5() string

func (*DealFileRespond) ProtoMessage

func (*DealFileRespond) ProtoMessage()

func (*DealFileRespond) Reset

func (m *DealFileRespond) Reset()

func (*DealFileRespond) String

func (m *DealFileRespond) String() string

func (*DealFileRespond) XXX_DiscardUnknown

func (m *DealFileRespond) XXX_DiscardUnknown()

func (*DealFileRespond) XXX_Marshal

func (m *DealFileRespond) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*DealFileRespond) XXX_Merge

func (m *DealFileRespond) XXX_Merge(src proto.Message)

func (*DealFileRespond) XXX_Size

func (m *DealFileRespond) XXX_Size() int

func (*DealFileRespond) XXX_Unmarshal

func (m *DealFileRespond) XXX_Unmarshal(b []byte) error

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"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

文件字节内容

func (*FileByte) Descriptor

func (*FileByte) Descriptor() ([]byte, []int)

func (*FileByte) GetByte

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

func (*FileByte) GetLen

func (m *FileByte) GetLen() int64

func (*FileByte) ProtoMessage

func (*FileByte) ProtoMessage()

func (*FileByte) Reset

func (m *FileByte) Reset()

func (*FileByte) String

func (m *FileByte) String() string

func (*FileByte) XXX_DiscardUnknown

func (m *FileByte) XXX_DiscardUnknown()

func (*FileByte) XXX_Marshal

func (m *FileByte) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*FileByte) XXX_Merge

func (m *FileByte) XXX_Merge(src proto.Message)

func (*FileByte) XXX_Size

func (m *FileByte) XXX_Size() int

func (*FileByte) XXX_Unmarshal

func (m *FileByte) XXX_Unmarshal(b []byte) error

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"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

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

func (*FileMsg) Descriptor

func (*FileMsg) Descriptor() ([]byte, []int)

func (*FileMsg) GetFileName

func (m *FileMsg) GetFileName() string

func (*FileMsg) ProtoMessage

func (*FileMsg) ProtoMessage()

func (*FileMsg) Reset

func (m *FileMsg) Reset()

func (*FileMsg) String

func (m *FileMsg) String() string

func (*FileMsg) XXX_DiscardUnknown

func (m *FileMsg) XXX_DiscardUnknown()

func (*FileMsg) XXX_Marshal

func (m *FileMsg) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*FileMsg) XXX_Merge

func (m *FileMsg) XXX_Merge(src proto.Message)

func (*FileMsg) XXX_Size

func (m *FileMsg) XXX_Size() int

func (*FileMsg) XXX_Unmarshal

func (m *FileMsg) XXX_Unmarshal(b []byte) error

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
y or Y : Canonical URL