Documentation ¶
Overview ¶
Package file is a generated protocol buffer package.
It is generated from these files:
github.com/asim/go-file/proto/file.proto
It has these top-level messages:
OpenRequest OpenResponse CloseRequest CloseResponse StatRequest StatResponse ReadRequest ReadResponse GetRequest GetResponse
Package file is a generated protocol buffer package.
It is generated from these files:
github.com/asim/go-file/proto/file.proto
It has these top-level messages:
OpenRequest OpenResponse CloseRequest CloseResponse StatRequest StatResponse ReadRequest ReadResponse GetRequest GetResponse
Index ¶
- func RegisterFileHandler(s server.Server, hdlr FileHandler, opts ...server.HandlerOption)
- func RegisterFileServer(s *grpc.Server, srv FileServer)
- type CloseRequest
- type CloseResponse
- type File
- func (h *File) Close(ctx context.Context, in *CloseRequest, out *CloseResponse) error
- func (h *File) Open(ctx context.Context, in *OpenRequest, out *OpenResponse) error
- func (h *File) Read(ctx context.Context, in *ReadRequest, out *ReadResponse) error
- func (h *File) Stat(ctx context.Context, in *StatRequest, out *StatResponse) error
- type FileClient
- type FileHandler
- type FileServer
- type FileService
- type GetRequest
- type GetResponse
- type OpenRequest
- type OpenResponse
- type ReadRequest
- type ReadResponse
- type StatRequest
- type StatResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterFileHandler ¶
func RegisterFileHandler(s server.Server, hdlr FileHandler, opts ...server.HandlerOption)
func RegisterFileServer ¶
func RegisterFileServer(s *grpc.Server, srv FileServer)
Types ¶
type CloseRequest ¶
type CloseRequest struct {
Id int64 `protobuf:"varint,1,opt,name=id" json:"id,omitempty"`
}
func (*CloseRequest) Descriptor ¶
func (*CloseRequest) Descriptor() ([]byte, []int)
func (*CloseRequest) GetId ¶
func (m *CloseRequest) GetId() int64
func (*CloseRequest) ProtoMessage ¶
func (*CloseRequest) ProtoMessage()
func (*CloseRequest) Reset ¶
func (m *CloseRequest) Reset()
func (*CloseRequest) String ¶
func (m *CloseRequest) String() string
type CloseResponse ¶
type CloseResponse struct { }
func (*CloseResponse) Descriptor ¶
func (*CloseResponse) Descriptor() ([]byte, []int)
func (*CloseResponse) ProtoMessage ¶
func (*CloseResponse) ProtoMessage()
func (*CloseResponse) Reset ¶
func (m *CloseResponse) Reset()
func (*CloseResponse) String ¶
func (m *CloseResponse) String() string
type File ¶
type File struct {
FileHandler
}
func (*File) Close ¶
func (h *File) Close(ctx context.Context, in *CloseRequest, out *CloseResponse) error
func (*File) Open ¶
func (h *File) Open(ctx context.Context, in *OpenRequest, out *OpenResponse) error
func (*File) Read ¶
func (h *File) Read(ctx context.Context, in *ReadRequest, out *ReadResponse) error
func (*File) Stat ¶
func (h *File) Stat(ctx context.Context, in *StatRequest, out *StatResponse) error
type FileClient ¶
type FileClient interface { Open(ctx context.Context, in *OpenRequest, opts ...grpc.CallOption) (*OpenResponse, error) Stat(ctx context.Context, in *StatRequest, opts ...grpc.CallOption) (*StatResponse, error) Read(ctx context.Context, in *ReadRequest, opts ...grpc.CallOption) (*ReadResponse, error) Close(ctx context.Context, in *CloseRequest, opts ...grpc.CallOption) (*CloseResponse, error) }
func NewFileClient ¶
func NewFileClient(cc *grpc.ClientConn) FileClient
type FileHandler ¶
type FileHandler interface { Open(context.Context, *OpenRequest, *OpenResponse) error Stat(context.Context, *StatRequest, *StatResponse) error Read(context.Context, *ReadRequest, *ReadResponse) error Close(context.Context, *CloseRequest, *CloseResponse) error }
type FileServer ¶
type FileServer interface { Open(context.Context, *OpenRequest) (*OpenResponse, error) Stat(context.Context, *StatRequest) (*StatResponse, error) Read(context.Context, *ReadRequest) (*ReadResponse, error) Close(context.Context, *CloseRequest) (*CloseResponse, error) }
type FileService ¶
type FileService interface { Open(ctx context.Context, in *OpenRequest, opts ...client.CallOption) (*OpenResponse, error) Stat(ctx context.Context, in *StatRequest, opts ...client.CallOption) (*StatResponse, error) Read(ctx context.Context, in *ReadRequest, opts ...client.CallOption) (*ReadResponse, error) Close(ctx context.Context, in *CloseRequest, opts ...client.CallOption) (*CloseResponse, error) }
func FileServiceClient ¶
func FileServiceClient(serviceName string, c client.Client) FileService
type GetRequest ¶
type GetRequest struct { Id int64 `protobuf:"varint,1,opt,name=id" json:"id,omitempty"` BlockId int64 `protobuf:"varint,2,opt,name=block_id,json=blockId" json:"block_id,omitempty"` }
func (*GetRequest) Descriptor ¶
func (*GetRequest) Descriptor() ([]byte, []int)
func (*GetRequest) GetBlockId ¶
func (m *GetRequest) GetBlockId() int64
func (*GetRequest) GetId ¶
func (m *GetRequest) GetId() int64
func (*GetRequest) ProtoMessage ¶
func (*GetRequest) ProtoMessage()
func (*GetRequest) Reset ¶
func (m *GetRequest) Reset()
func (*GetRequest) String ¶
func (m *GetRequest) String() string
type GetResponse ¶
type GetResponse struct { BlockId int64 `protobuf:"varint,1,opt,name=block_id,json=blockId" json:"block_id,omitempty"` Size int64 `protobuf:"varint,2,opt,name=size" json:"size,omitempty"` Data []byte `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"` }
func (*GetResponse) Descriptor ¶
func (*GetResponse) Descriptor() ([]byte, []int)
func (*GetResponse) GetBlockId ¶
func (m *GetResponse) GetBlockId() int64
func (*GetResponse) GetData ¶
func (m *GetResponse) GetData() []byte
func (*GetResponse) GetSize ¶
func (m *GetResponse) GetSize() int64
func (*GetResponse) ProtoMessage ¶
func (*GetResponse) ProtoMessage()
func (*GetResponse) Reset ¶
func (m *GetResponse) Reset()
func (*GetResponse) String ¶
func (m *GetResponse) String() string
type OpenRequest ¶
type OpenRequest struct {
Filename string `protobuf:"bytes,1,opt,name=filename" json:"filename,omitempty"`
}
func (*OpenRequest) Descriptor ¶
func (*OpenRequest) Descriptor() ([]byte, []int)
func (*OpenRequest) GetFilename ¶
func (m *OpenRequest) GetFilename() string
func (*OpenRequest) ProtoMessage ¶
func (*OpenRequest) ProtoMessage()
func (*OpenRequest) Reset ¶
func (m *OpenRequest) Reset()
func (*OpenRequest) String ¶
func (m *OpenRequest) String() string
type OpenResponse ¶
type OpenResponse struct { Id int64 `protobuf:"varint,1,opt,name=id" json:"id,omitempty"` Result bool `protobuf:"varint,2,opt,name=result" json:"result,omitempty"` }
func (*OpenResponse) Descriptor ¶
func (*OpenResponse) Descriptor() ([]byte, []int)
func (*OpenResponse) GetId ¶
func (m *OpenResponse) GetId() int64
func (*OpenResponse) GetResult ¶
func (m *OpenResponse) GetResult() bool
func (*OpenResponse) ProtoMessage ¶
func (*OpenResponse) ProtoMessage()
func (*OpenResponse) Reset ¶
func (m *OpenResponse) Reset()
func (*OpenResponse) String ¶
func (m *OpenResponse) String() string
type ReadRequest ¶
type ReadRequest struct { Id int64 `protobuf:"varint,1,opt,name=id" json:"id,omitempty"` Offset int64 `protobuf:"varint,2,opt,name=offset" json:"offset,omitempty"` Size int64 `protobuf:"varint,3,opt,name=size" json:"size,omitempty"` }
func (*ReadRequest) Descriptor ¶
func (*ReadRequest) Descriptor() ([]byte, []int)
func (*ReadRequest) GetId ¶
func (m *ReadRequest) GetId() int64
func (*ReadRequest) GetOffset ¶
func (m *ReadRequest) GetOffset() int64
func (*ReadRequest) GetSize ¶
func (m *ReadRequest) GetSize() int64
func (*ReadRequest) ProtoMessage ¶
func (*ReadRequest) ProtoMessage()
func (*ReadRequest) Reset ¶
func (m *ReadRequest) Reset()
func (*ReadRequest) String ¶
func (m *ReadRequest) String() string
type ReadResponse ¶
type ReadResponse struct { Size int64 `protobuf:"varint,1,opt,name=size" json:"size,omitempty"` Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` Eof bool `protobuf:"varint,3,opt,name=eof" json:"eof,omitempty"` }
func (*ReadResponse) Descriptor ¶
func (*ReadResponse) Descriptor() ([]byte, []int)
func (*ReadResponse) GetData ¶
func (m *ReadResponse) GetData() []byte
func (*ReadResponse) GetEof ¶
func (m *ReadResponse) GetEof() bool
func (*ReadResponse) GetSize ¶
func (m *ReadResponse) GetSize() int64
func (*ReadResponse) ProtoMessage ¶
func (*ReadResponse) ProtoMessage()
func (*ReadResponse) Reset ¶
func (m *ReadResponse) Reset()
func (*ReadResponse) String ¶
func (m *ReadResponse) String() string
type StatRequest ¶
type StatRequest struct {
Filename string `protobuf:"bytes,1,opt,name=filename" json:"filename,omitempty"`
}
func (*StatRequest) Descriptor ¶
func (*StatRequest) Descriptor() ([]byte, []int)
func (*StatRequest) GetFilename ¶
func (m *StatRequest) GetFilename() string
func (*StatRequest) ProtoMessage ¶
func (*StatRequest) ProtoMessage()
func (*StatRequest) Reset ¶
func (m *StatRequest) Reset()
func (*StatRequest) String ¶
func (m *StatRequest) String() string
type StatResponse ¶
type StatResponse struct { Type string `protobuf:"bytes,1,opt,name=type" json:"type,omitempty"` Size int64 `protobuf:"varint,2,opt,name=size" json:"size,omitempty"` LastModified int64 `protobuf:"varint,3,opt,name=last_modified,json=lastModified" json:"last_modified,omitempty"` }
func (*StatResponse) Descriptor ¶
func (*StatResponse) Descriptor() ([]byte, []int)
func (*StatResponse) GetLastModified ¶
func (m *StatResponse) GetLastModified() int64
func (*StatResponse) GetSize ¶
func (m *StatResponse) GetSize() int64
func (*StatResponse) GetType ¶
func (m *StatResponse) GetType() string
func (*StatResponse) ProtoMessage ¶
func (*StatResponse) ProtoMessage()
func (*StatResponse) Reset ¶
func (m *StatResponse) Reset()
func (*StatResponse) String ¶
func (m *StatResponse) String() string
Click to show internal directories.
Click to hide internal directories.