Documentation
¶
Index ¶
- Constants
- Variables
- func ReceiveFile(stream network.Stream, cid string) (io.Reader, error)
- func ReceiveFileHandler(req *Request_Receive, api coreiface.CoreAPI, stream network.Stream, ...)
- func ReceiveMeta(stream network.Stream, cid string) ([]byte, error)
- func ReceiveMetaHandler(req *Request_Meta, api coreiface.CoreAPI, stream network.Stream, ...)
- func RequestHandler(ctx context.Context, api coreiface.CoreAPI, stream network.Stream)
- func SendFile(fileCh <-chan []byte, filemeta *Meta, stream network.Stream, ...) (*string, error)
- func SendFileHandler(req *Request_Send, api coreiface.CoreAPI, stream network.Stream, ...)
- type Chunk
- type File
- type FileMeta
- type IFileMeta
- type Meta
- func (*Meta) Descriptor() ([]byte, []int)deprecated
- func (x *Meta) GetLastModified() int64
- func (x *Meta) GetName() string
- func (x *Meta) GetSize() uint64
- func (x *Meta) GetType() string
- func (*Meta) ProtoMessage()
- func (x *Meta) ProtoReflect() protoreflect.Message
- func (x *Meta) Reset()
- func (x *Meta) String() string
- type Request
- func (*Request) Descriptor() ([]byte, []int)deprecated
- func (x *Request) GetMeta() string
- func (x *Request) GetReceive() *Chunk
- func (x *Request) GetSend() *Meta
- func (m *Request) GetType() isRequest_Type
- func (*Request) ProtoMessage()
- func (x *Request) ProtoReflect() protoreflect.Message
- func (x *Request) Reset()
- func (x *Request) String() string
- type Request_Meta
- type Request_Receive
- type Request_Send
Constants ¶
View Source
const PROTOCOL = "/fx/file/0.1.1"
Variables ¶
View Source
var File_file_proto protoreflect.FileDescriptor
Functions ¶
func ReceiveFileHandler ¶
func ReceiveMetaHandler ¶
func RequestHandler ¶
func SendFileHandler ¶
Types ¶
type Chunk ¶
type Chunk struct {
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
// contains filtered or unexported fields
}
func (*Chunk) Descriptor
deprecated
func (*Chunk) ProtoMessage ¶
func (*Chunk) ProtoMessage()
func (*Chunk) ProtoReflect ¶
func (x *Chunk) ProtoReflect() protoreflect.Message
type File ¶
type File struct {
Meta *Meta `protobuf:"bytes,1,opt,name=meta,proto3" json:"meta,omitempty"`
ContentPath string `protobuf:"bytes,2,opt,name=contentPath,proto3" json:"contentPath,omitempty"`
// contains filtered or unexported fields
}
func (*File) Descriptor
deprecated
func (*File) GetContentPath ¶
func (*File) ProtoMessage ¶
func (*File) ProtoMessage()
func (*File) ProtoReflect ¶
func (x *File) ProtoReflect() protoreflect.Message
type FileMeta ¶
type FileMeta struct {
// contains filtered or unexported fields
}
func (*FileMeta) ToMetaProto ¶
type Meta ¶
type Meta struct {
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
Type string `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"`
Size uint64 `protobuf:"varint,3,opt,name=size,proto3" json:"size,omitempty"`
LastModified int64 `protobuf:"varint,4,opt,name=lastModified,proto3" json:"lastModified,omitempty"`
// contains filtered or unexported fields
}
func (*Meta) Descriptor
deprecated
func (*Meta) GetLastModified ¶
func (*Meta) ProtoMessage ¶
func (*Meta) ProtoMessage()
func (*Meta) ProtoReflect ¶
func (x *Meta) ProtoReflect() protoreflect.Message
type Request ¶
type Request struct {
// Types that are assignable to Type:
// *Request_Meta
// *Request_Receive
// *Request_Send
Type isRequest_Type `protobuf_oneof:"type"`
// contains filtered or unexported fields
}
func (*Request) Descriptor
deprecated
func (*Request) GetReceive ¶
func (*Request) ProtoMessage ¶
func (*Request) ProtoMessage()
func (*Request) ProtoReflect ¶
func (x *Request) ProtoReflect() protoreflect.Message
type Request_Meta ¶
type Request_Meta struct {
Meta string `protobuf:"bytes,1,opt,name=meta,proto3,oneof"`
}
type Request_Receive ¶
type Request_Receive struct {
Receive *Chunk `protobuf:"bytes,2,opt,name=receive,proto3,oneof"`
}
type Request_Send ¶
type Request_Send struct {
Send *Meta `protobuf:"bytes,3,opt,name=send,proto3,oneof"`
}
Click to show internal directories.
Click to hide internal directories.