yao/tai/volume/pb/volume.pb.go
Max 43d4ace13c Add Tai SDK tests and update Makefile for Tai integration
- Introduce new Tai SDK tests in the GitHub workflows, requiring a Tai container with Docker socket mount for execution.
- Update the Makefile to include a dedicated target for running Tai SDK tests, enhancing test coverage for the Tai integration.
- Modify the Go module dependencies to include the pierrec/lz4 package, ensuring compatibility with the new tests.
- Adjust test folder selection logic in the Makefile to exclude additional directories, streamlining the testing process.
2026-03-03 20:49:34 +08:00

1219 lines
35 KiB
Go

// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.36.11
// protoc v4.25.0
// source: volume/pb/volume.proto
package pb
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
unsafe "unsafe"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
type FileChunk_ChunkType int32
const (
FileChunk_FULL FileChunk_ChunkType = 0
FileChunk_DELTA FileChunk_ChunkType = 1 // reserved for future rsync delta
FileChunk_DELETE FileChunk_ChunkType = 2
FileChunk_MKDIR FileChunk_ChunkType = 3
)
// Enum value maps for FileChunk_ChunkType.
var (
FileChunk_ChunkType_name = map[int32]string{
0: "FULL",
1: "DELTA",
2: "DELETE",
3: "MKDIR",
}
FileChunk_ChunkType_value = map[string]int32{
"FULL": 0,
"DELTA": 1,
"DELETE": 2,
"MKDIR": 3,
}
)
func (x FileChunk_ChunkType) Enum() *FileChunk_ChunkType {
p := new(FileChunk_ChunkType)
*p = x
return p
}
func (x FileChunk_ChunkType) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (FileChunk_ChunkType) Descriptor() protoreflect.EnumDescriptor {
return file_volume_pb_volume_proto_enumTypes[0].Descriptor()
}
func (FileChunk_ChunkType) Type() protoreflect.EnumType {
return &file_volume_pb_volume_proto_enumTypes[0]
}
func (x FileChunk_ChunkType) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use FileChunk_ChunkType.Descriptor instead.
func (FileChunk_ChunkType) EnumDescriptor() ([]byte, []int) {
return file_volume_pb_volume_proto_rawDescGZIP(), []int{4, 0}
}
type FileInfo struct {
state protoimpl.MessageState `protogen:"open.v1"`
Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"`
Size int64 `protobuf:"varint,2,opt,name=size,proto3" json:"size,omitempty"`
Mtime int64 `protobuf:"varint,3,opt,name=mtime,proto3" json:"mtime,omitempty"` // unix timestamp (nanoseconds)
Mode uint32 `protobuf:"varint,4,opt,name=mode,proto3" json:"mode,omitempty"`
IsDir bool `protobuf:"varint,5,opt,name=is_dir,json=isDir,proto3" json:"is_dir,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *FileInfo) Reset() {
*x = FileInfo{}
mi := &file_volume_pb_volume_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *FileInfo) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*FileInfo) ProtoMessage() {}
func (x *FileInfo) ProtoReflect() protoreflect.Message {
mi := &file_volume_pb_volume_proto_msgTypes[0]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use FileInfo.ProtoReflect.Descriptor instead.
func (*FileInfo) Descriptor() ([]byte, []int) {
return file_volume_pb_volume_proto_rawDescGZIP(), []int{0}
}
func (x *FileInfo) GetPath() string {
if x != nil {
return x.Path
}
return ""
}
func (x *FileInfo) GetSize() int64 {
if x != nil {
return x.Size
}
return 0
}
func (x *FileInfo) GetMtime() int64 {
if x != nil {
return x.Mtime
}
return 0
}
func (x *FileInfo) GetMode() uint32 {
if x != nil {
return x.Mode
}
return 0
}
func (x *FileInfo) GetIsDir() bool {
if x != nil {
return x.IsDir
}
return false
}
type SyncManifest struct {
state protoimpl.MessageState `protogen:"open.v1"`
SessionId string `protobuf:"bytes,1,opt,name=session_id,json=sessionId,proto3" json:"session_id,omitempty"`
Files []*FileInfo `protobuf:"bytes,2,rep,name=files,proto3" json:"files,omitempty"`
ForceFull bool `protobuf:"varint,3,opt,name=force_full,json=forceFull,proto3" json:"force_full,omitempty"` // skip snapshot cache, diff against actual disk
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *SyncManifest) Reset() {
*x = SyncManifest{}
mi := &file_volume_pb_volume_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *SyncManifest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*SyncManifest) ProtoMessage() {}
func (x *SyncManifest) ProtoReflect() protoreflect.Message {
mi := &file_volume_pb_volume_proto_msgTypes[1]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use SyncManifest.ProtoReflect.Descriptor instead.
func (*SyncManifest) Descriptor() ([]byte, []int) {
return file_volume_pb_volume_proto_rawDescGZIP(), []int{1}
}
func (x *SyncManifest) GetSessionId() string {
if x != nil {
return x.SessionId
}
return ""
}
func (x *SyncManifest) GetFiles() []*FileInfo {
if x != nil {
return x.Files
}
return nil
}
func (x *SyncManifest) GetForceFull() bool {
if x != nil {
return x.ForceFull
}
return false
}
type SyncMessage struct {
state protoimpl.MessageState `protogen:"open.v1"`
// Types that are valid to be assigned to Payload:
//
// *SyncMessage_Manifest
// *SyncMessage_Diff
// *SyncMessage_Chunk
// *SyncMessage_Result
Payload isSyncMessage_Payload `protobuf_oneof:"payload"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *SyncMessage) Reset() {
*x = SyncMessage{}
mi := &file_volume_pb_volume_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *SyncMessage) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*SyncMessage) ProtoMessage() {}
func (x *SyncMessage) ProtoReflect() protoreflect.Message {
mi := &file_volume_pb_volume_proto_msgTypes[2]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use SyncMessage.ProtoReflect.Descriptor instead.
func (*SyncMessage) Descriptor() ([]byte, []int) {
return file_volume_pb_volume_proto_rawDescGZIP(), []int{2}
}
func (x *SyncMessage) GetPayload() isSyncMessage_Payload {
if x != nil {
return x.Payload
}
return nil
}
func (x *SyncMessage) GetManifest() *SyncManifest {
if x != nil {
if x, ok := x.Payload.(*SyncMessage_Manifest); ok {
return x.Manifest
}
}
return nil
}
func (x *SyncMessage) GetDiff() *SyncDiff {
if x != nil {
if x, ok := x.Payload.(*SyncMessage_Diff); ok {
return x.Diff
}
}
return nil
}
func (x *SyncMessage) GetChunk() *FileChunk {
if x != nil {
if x, ok := x.Payload.(*SyncMessage_Chunk); ok {
return x.Chunk
}
}
return nil
}
func (x *SyncMessage) GetResult() *SyncResult {
if x != nil {
if x, ok := x.Payload.(*SyncMessage_Result); ok {
return x.Result
}
}
return nil
}
type isSyncMessage_Payload interface {
isSyncMessage_Payload()
}
type SyncMessage_Manifest struct {
Manifest *SyncManifest `protobuf:"bytes,1,opt,name=manifest,proto3,oneof"`
}
type SyncMessage_Diff struct {
Diff *SyncDiff `protobuf:"bytes,2,opt,name=diff,proto3,oneof"`
}
type SyncMessage_Chunk struct {
Chunk *FileChunk `protobuf:"bytes,3,opt,name=chunk,proto3,oneof"`
}
type SyncMessage_Result struct {
Result *SyncResult `protobuf:"bytes,4,opt,name=result,proto3,oneof"`
}
func (*SyncMessage_Manifest) isSyncMessage_Payload() {}
func (*SyncMessage_Diff) isSyncMessage_Payload() {}
func (*SyncMessage_Chunk) isSyncMessage_Payload() {}
func (*SyncMessage_Result) isSyncMessage_Payload() {}
type SyncDiff struct {
state protoimpl.MessageState `protogen:"open.v1"`
NeedFiles []string `protobuf:"bytes,1,rep,name=need_files,json=needFiles,proto3" json:"need_files,omitempty"` // paths needing full transfer
DeleteFiles []string `protobuf:"bytes,2,rep,name=delete_files,json=deleteFiles,proto3" json:"delete_files,omitempty"` // paths Tai should delete
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *SyncDiff) Reset() {
*x = SyncDiff{}
mi := &file_volume_pb_volume_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *SyncDiff) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*SyncDiff) ProtoMessage() {}
func (x *SyncDiff) ProtoReflect() protoreflect.Message {
mi := &file_volume_pb_volume_proto_msgTypes[3]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use SyncDiff.ProtoReflect.Descriptor instead.
func (*SyncDiff) Descriptor() ([]byte, []int) {
return file_volume_pb_volume_proto_rawDescGZIP(), []int{3}
}
func (x *SyncDiff) GetNeedFiles() []string {
if x != nil {
return x.NeedFiles
}
return nil
}
func (x *SyncDiff) GetDeleteFiles() []string {
if x != nil {
return x.DeleteFiles
}
return nil
}
type FileChunk struct {
state protoimpl.MessageState `protogen:"open.v1"`
Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"`
Type FileChunk_ChunkType `protobuf:"varint,2,opt,name=type,proto3,enum=volume.FileChunk_ChunkType" json:"type,omitempty"`
Data []byte `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"` // lz4 compressed (V1: always FULL)
Mode uint32 `protobuf:"varint,4,opt,name=mode,proto3" json:"mode,omitempty"` // file mode (first chunk only)
Mtime int64 `protobuf:"varint,5,opt,name=mtime,proto3" json:"mtime,omitempty"` // modification time (first chunk only)
Eof bool `protobuf:"varint,6,opt,name=eof,proto3" json:"eof,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *FileChunk) Reset() {
*x = FileChunk{}
mi := &file_volume_pb_volume_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *FileChunk) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*FileChunk) ProtoMessage() {}
func (x *FileChunk) ProtoReflect() protoreflect.Message {
mi := &file_volume_pb_volume_proto_msgTypes[4]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use FileChunk.ProtoReflect.Descriptor instead.
func (*FileChunk) Descriptor() ([]byte, []int) {
return file_volume_pb_volume_proto_rawDescGZIP(), []int{4}
}
func (x *FileChunk) GetPath() string {
if x != nil {
return x.Path
}
return ""
}
func (x *FileChunk) GetType() FileChunk_ChunkType {
if x != nil {
return x.Type
}
return FileChunk_FULL
}
func (x *FileChunk) GetData() []byte {
if x != nil {
return x.Data
}
return nil
}
func (x *FileChunk) GetMode() uint32 {
if x != nil {
return x.Mode
}
return 0
}
func (x *FileChunk) GetMtime() int64 {
if x != nil {
return x.Mtime
}
return 0
}
func (x *FileChunk) GetEof() bool {
if x != nil {
return x.Eof
}
return false
}
type SyncResult struct {
state protoimpl.MessageState `protogen:"open.v1"`
FilesSynced int32 `protobuf:"varint,1,opt,name=files_synced,json=filesSynced,proto3" json:"files_synced,omitempty"`
BytesTransferred int64 `protobuf:"varint,2,opt,name=bytes_transferred,json=bytesTransferred,proto3" json:"bytes_transferred,omitempty"`
DurationMs int64 `protobuf:"varint,3,opt,name=duration_ms,json=durationMs,proto3" json:"duration_ms,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *SyncResult) Reset() {
*x = SyncResult{}
mi := &file_volume_pb_volume_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *SyncResult) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*SyncResult) ProtoMessage() {}
func (x *SyncResult) ProtoReflect() protoreflect.Message {
mi := &file_volume_pb_volume_proto_msgTypes[5]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use SyncResult.ProtoReflect.Descriptor instead.
func (*SyncResult) Descriptor() ([]byte, []int) {
return file_volume_pb_volume_proto_rawDescGZIP(), []int{5}
}
func (x *SyncResult) GetFilesSynced() int32 {
if x != nil {
return x.FilesSynced
}
return 0
}
func (x *SyncResult) GetBytesTransferred() int64 {
if x != nil {
return x.BytesTransferred
}
return 0
}
func (x *SyncResult) GetDurationMs() int64 {
if x != nil {
return x.DurationMs
}
return 0
}
type FSRequest struct {
state protoimpl.MessageState `protogen:"open.v1"`
SessionId string `protobuf:"bytes,1,opt,name=session_id,json=sessionId,proto3" json:"session_id,omitempty"`
Path string `protobuf:"bytes,2,opt,name=path,proto3" json:"path,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *FSRequest) Reset() {
*x = FSRequest{}
mi := &file_volume_pb_volume_proto_msgTypes[6]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *FSRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*FSRequest) ProtoMessage() {}
func (x *FSRequest) ProtoReflect() protoreflect.Message {
mi := &file_volume_pb_volume_proto_msgTypes[6]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use FSRequest.ProtoReflect.Descriptor instead.
func (*FSRequest) Descriptor() ([]byte, []int) {
return file_volume_pb_volume_proto_rawDescGZIP(), []int{6}
}
func (x *FSRequest) GetSessionId() string {
if x != nil {
return x.SessionId
}
return ""
}
func (x *FSRequest) GetPath() string {
if x != nil {
return x.Path
}
return ""
}
type FSOpResponse struct {
state protoimpl.MessageState `protogen:"open.v1"`
Ok bool `protobuf:"varint,1,opt,name=ok,proto3" json:"ok,omitempty"`
Error string `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *FSOpResponse) Reset() {
*x = FSOpResponse{}
mi := &file_volume_pb_volume_proto_msgTypes[7]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *FSOpResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*FSOpResponse) ProtoMessage() {}
func (x *FSOpResponse) ProtoReflect() protoreflect.Message {
mi := &file_volume_pb_volume_proto_msgTypes[7]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use FSOpResponse.ProtoReflect.Descriptor instead.
func (*FSOpResponse) Descriptor() ([]byte, []int) {
return file_volume_pb_volume_proto_rawDescGZIP(), []int{7}
}
func (x *FSOpResponse) GetOk() bool {
if x != nil {
return x.Ok
}
return false
}
func (x *FSOpResponse) GetError() string {
if x != nil {
return x.Error
}
return ""
}
type FSReadRequest struct {
state protoimpl.MessageState `protogen:"open.v1"`
SessionId string `protobuf:"bytes,1,opt,name=session_id,json=sessionId,proto3" json:"session_id,omitempty"`
Path string `protobuf:"bytes,2,opt,name=path,proto3" json:"path,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *FSReadRequest) Reset() {
*x = FSReadRequest{}
mi := &file_volume_pb_volume_proto_msgTypes[8]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *FSReadRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*FSReadRequest) ProtoMessage() {}
func (x *FSReadRequest) ProtoReflect() protoreflect.Message {
mi := &file_volume_pb_volume_proto_msgTypes[8]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use FSReadRequest.ProtoReflect.Descriptor instead.
func (*FSReadRequest) Descriptor() ([]byte, []int) {
return file_volume_pb_volume_proto_rawDescGZIP(), []int{8}
}
func (x *FSReadRequest) GetSessionId() string {
if x != nil {
return x.SessionId
}
return ""
}
func (x *FSReadRequest) GetPath() string {
if x != nil {
return x.Path
}
return ""
}
type FSDataChunk struct {
state protoimpl.MessageState `protogen:"open.v1"`
Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` // up to 64KB per message
Mode uint32 `protobuf:"varint,2,opt,name=mode,proto3" json:"mode,omitempty"` // first chunk only
Size int64 `protobuf:"varint,3,opt,name=size,proto3" json:"size,omitempty"` // total file size (first chunk only)
Mtime int64 `protobuf:"varint,4,opt,name=mtime,proto3" json:"mtime,omitempty"` // modification time (first chunk only)
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *FSDataChunk) Reset() {
*x = FSDataChunk{}
mi := &file_volume_pb_volume_proto_msgTypes[9]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *FSDataChunk) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*FSDataChunk) ProtoMessage() {}
func (x *FSDataChunk) ProtoReflect() protoreflect.Message {
mi := &file_volume_pb_volume_proto_msgTypes[9]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use FSDataChunk.ProtoReflect.Descriptor instead.
func (*FSDataChunk) Descriptor() ([]byte, []int) {
return file_volume_pb_volume_proto_rawDescGZIP(), []int{9}
}
func (x *FSDataChunk) GetData() []byte {
if x != nil {
return x.Data
}
return nil
}
func (x *FSDataChunk) GetMode() uint32 {
if x != nil {
return x.Mode
}
return 0
}
func (x *FSDataChunk) GetSize() int64 {
if x != nil {
return x.Size
}
return 0
}
func (x *FSDataChunk) GetMtime() int64 {
if x != nil {
return x.Mtime
}
return 0
}
type FSWriteChunk struct {
state protoimpl.MessageState `protogen:"open.v1"`
SessionId string `protobuf:"bytes,1,opt,name=session_id,json=sessionId,proto3" json:"session_id,omitempty"` // first chunk only
Path string `protobuf:"bytes,2,opt,name=path,proto3" json:"path,omitempty"` // first chunk only
Data []byte `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"`
Mode uint32 `protobuf:"varint,4,opt,name=mode,proto3" json:"mode,omitempty"` // first chunk only, 0 = keep existing
CreateDirs bool `protobuf:"varint,5,opt,name=create_dirs,json=createDirs,proto3" json:"create_dirs,omitempty"` // auto-create parent directories (first chunk only)
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *FSWriteChunk) Reset() {
*x = FSWriteChunk{}
mi := &file_volume_pb_volume_proto_msgTypes[10]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *FSWriteChunk) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*FSWriteChunk) ProtoMessage() {}
func (x *FSWriteChunk) ProtoReflect() protoreflect.Message {
mi := &file_volume_pb_volume_proto_msgTypes[10]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use FSWriteChunk.ProtoReflect.Descriptor instead.
func (*FSWriteChunk) Descriptor() ([]byte, []int) {
return file_volume_pb_volume_proto_rawDescGZIP(), []int{10}
}
func (x *FSWriteChunk) GetSessionId() string {
if x != nil {
return x.SessionId
}
return ""
}
func (x *FSWriteChunk) GetPath() string {
if x != nil {
return x.Path
}
return ""
}
func (x *FSWriteChunk) GetData() []byte {
if x != nil {
return x.Data
}
return nil
}
func (x *FSWriteChunk) GetMode() uint32 {
if x != nil {
return x.Mode
}
return 0
}
func (x *FSWriteChunk) GetCreateDirs() bool {
if x != nil {
return x.CreateDirs
}
return false
}
type FSWriteResponse struct {
state protoimpl.MessageState `protogen:"open.v1"`
Size int64 `protobuf:"varint,1,opt,name=size,proto3" json:"size,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *FSWriteResponse) Reset() {
*x = FSWriteResponse{}
mi := &file_volume_pb_volume_proto_msgTypes[11]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *FSWriteResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*FSWriteResponse) ProtoMessage() {}
func (x *FSWriteResponse) ProtoReflect() protoreflect.Message {
mi := &file_volume_pb_volume_proto_msgTypes[11]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use FSWriteResponse.ProtoReflect.Descriptor instead.
func (*FSWriteResponse) Descriptor() ([]byte, []int) {
return file_volume_pb_volume_proto_rawDescGZIP(), []int{11}
}
func (x *FSWriteResponse) GetSize() int64 {
if x != nil {
return x.Size
}
return 0
}
type FSListResponse struct {
state protoimpl.MessageState `protogen:"open.v1"`
Entries []*FileInfo `protobuf:"bytes,1,rep,name=entries,proto3" json:"entries,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *FSListResponse) Reset() {
*x = FSListResponse{}
mi := &file_volume_pb_volume_proto_msgTypes[12]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *FSListResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*FSListResponse) ProtoMessage() {}
func (x *FSListResponse) ProtoReflect() protoreflect.Message {
mi := &file_volume_pb_volume_proto_msgTypes[12]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use FSListResponse.ProtoReflect.Descriptor instead.
func (*FSListResponse) Descriptor() ([]byte, []int) {
return file_volume_pb_volume_proto_rawDescGZIP(), []int{12}
}
func (x *FSListResponse) GetEntries() []*FileInfo {
if x != nil {
return x.Entries
}
return nil
}
type FSRemoveRequest struct {
state protoimpl.MessageState `protogen:"open.v1"`
SessionId string `protobuf:"bytes,1,opt,name=session_id,json=sessionId,proto3" json:"session_id,omitempty"`
Path string `protobuf:"bytes,2,opt,name=path,proto3" json:"path,omitempty"`
Recursive bool `protobuf:"varint,3,opt,name=recursive,proto3" json:"recursive,omitempty"` // true = RemoveAll, false = Remove
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *FSRemoveRequest) Reset() {
*x = FSRemoveRequest{}
mi := &file_volume_pb_volume_proto_msgTypes[13]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *FSRemoveRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*FSRemoveRequest) ProtoMessage() {}
func (x *FSRemoveRequest) ProtoReflect() protoreflect.Message {
mi := &file_volume_pb_volume_proto_msgTypes[13]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use FSRemoveRequest.ProtoReflect.Descriptor instead.
func (*FSRemoveRequest) Descriptor() ([]byte, []int) {
return file_volume_pb_volume_proto_rawDescGZIP(), []int{13}
}
func (x *FSRemoveRequest) GetSessionId() string {
if x != nil {
return x.SessionId
}
return ""
}
func (x *FSRemoveRequest) GetPath() string {
if x != nil {
return x.Path
}
return ""
}
func (x *FSRemoveRequest) GetRecursive() bool {
if x != nil {
return x.Recursive
}
return false
}
type FSRenameRequest struct {
state protoimpl.MessageState `protogen:"open.v1"`
SessionId string `protobuf:"bytes,1,opt,name=session_id,json=sessionId,proto3" json:"session_id,omitempty"`
OldPath string `protobuf:"bytes,2,opt,name=old_path,json=oldPath,proto3" json:"old_path,omitempty"`
NewPath string `protobuf:"bytes,3,opt,name=new_path,json=newPath,proto3" json:"new_path,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *FSRenameRequest) Reset() {
*x = FSRenameRequest{}
mi := &file_volume_pb_volume_proto_msgTypes[14]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *FSRenameRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*FSRenameRequest) ProtoMessage() {}
func (x *FSRenameRequest) ProtoReflect() protoreflect.Message {
mi := &file_volume_pb_volume_proto_msgTypes[14]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use FSRenameRequest.ProtoReflect.Descriptor instead.
func (*FSRenameRequest) Descriptor() ([]byte, []int) {
return file_volume_pb_volume_proto_rawDescGZIP(), []int{14}
}
func (x *FSRenameRequest) GetSessionId() string {
if x != nil {
return x.SessionId
}
return ""
}
func (x *FSRenameRequest) GetOldPath() string {
if x != nil {
return x.OldPath
}
return ""
}
func (x *FSRenameRequest) GetNewPath() string {
if x != nil {
return x.NewPath
}
return ""
}
var File_volume_pb_volume_proto protoreflect.FileDescriptor
const file_volume_pb_volume_proto_rawDesc = "" +
"\n" +
"\x16volume/pb/volume.proto\x12\x06volume\"s\n" +
"\bFileInfo\x12\x12\n" +
"\x04path\x18\x01 \x01(\tR\x04path\x12\x12\n" +
"\x04size\x18\x02 \x01(\x03R\x04size\x12\x14\n" +
"\x05mtime\x18\x03 \x01(\x03R\x05mtime\x12\x12\n" +
"\x04mode\x18\x04 \x01(\rR\x04mode\x12\x15\n" +
"\x06is_dir\x18\x05 \x01(\bR\x05isDir\"t\n" +
"\fSyncManifest\x12\x1d\n" +
"\n" +
"session_id\x18\x01 \x01(\tR\tsessionId\x12&\n" +
"\x05files\x18\x02 \x03(\v2\x10.volume.FileInfoR\x05files\x12\x1d\n" +
"\n" +
"force_full\x18\x03 \x01(\bR\tforceFull\"\xcd\x01\n" +
"\vSyncMessage\x122\n" +
"\bmanifest\x18\x01 \x01(\v2\x14.volume.SyncManifestH\x00R\bmanifest\x12&\n" +
"\x04diff\x18\x02 \x01(\v2\x10.volume.SyncDiffH\x00R\x04diff\x12)\n" +
"\x05chunk\x18\x03 \x01(\v2\x11.volume.FileChunkH\x00R\x05chunk\x12,\n" +
"\x06result\x18\x04 \x01(\v2\x12.volume.SyncResultH\x00R\x06resultB\t\n" +
"\apayload\"L\n" +
"\bSyncDiff\x12\x1d\n" +
"\n" +
"need_files\x18\x01 \x03(\tR\tneedFiles\x12!\n" +
"\fdelete_files\x18\x02 \x03(\tR\vdeleteFiles\"\xd9\x01\n" +
"\tFileChunk\x12\x12\n" +
"\x04path\x18\x01 \x01(\tR\x04path\x12/\n" +
"\x04type\x18\x02 \x01(\x0e2\x1b.volume.FileChunk.ChunkTypeR\x04type\x12\x12\n" +
"\x04data\x18\x03 \x01(\fR\x04data\x12\x12\n" +
"\x04mode\x18\x04 \x01(\rR\x04mode\x12\x14\n" +
"\x05mtime\x18\x05 \x01(\x03R\x05mtime\x12\x10\n" +
"\x03eof\x18\x06 \x01(\bR\x03eof\"7\n" +
"\tChunkType\x12\b\n" +
"\x04FULL\x10\x00\x12\t\n" +
"\x05DELTA\x10\x01\x12\n" +
"\n" +
"\x06DELETE\x10\x02\x12\t\n" +
"\x05MKDIR\x10\x03\"}\n" +
"\n" +
"SyncResult\x12!\n" +
"\ffiles_synced\x18\x01 \x01(\x05R\vfilesSynced\x12+\n" +
"\x11bytes_transferred\x18\x02 \x01(\x03R\x10bytesTransferred\x12\x1f\n" +
"\vduration_ms\x18\x03 \x01(\x03R\n" +
"durationMs\">\n" +
"\tFSRequest\x12\x1d\n" +
"\n" +
"session_id\x18\x01 \x01(\tR\tsessionId\x12\x12\n" +
"\x04path\x18\x02 \x01(\tR\x04path\"4\n" +
"\fFSOpResponse\x12\x0e\n" +
"\x02ok\x18\x01 \x01(\bR\x02ok\x12\x14\n" +
"\x05error\x18\x02 \x01(\tR\x05error\"B\n" +
"\rFSReadRequest\x12\x1d\n" +
"\n" +
"session_id\x18\x01 \x01(\tR\tsessionId\x12\x12\n" +
"\x04path\x18\x02 \x01(\tR\x04path\"_\n" +
"\vFSDataChunk\x12\x12\n" +
"\x04data\x18\x01 \x01(\fR\x04data\x12\x12\n" +
"\x04mode\x18\x02 \x01(\rR\x04mode\x12\x12\n" +
"\x04size\x18\x03 \x01(\x03R\x04size\x12\x14\n" +
"\x05mtime\x18\x04 \x01(\x03R\x05mtime\"\x8a\x01\n" +
"\fFSWriteChunk\x12\x1d\n" +
"\n" +
"session_id\x18\x01 \x01(\tR\tsessionId\x12\x12\n" +
"\x04path\x18\x02 \x01(\tR\x04path\x12\x12\n" +
"\x04data\x18\x03 \x01(\fR\x04data\x12\x12\n" +
"\x04mode\x18\x04 \x01(\rR\x04mode\x12\x1f\n" +
"\vcreate_dirs\x18\x05 \x01(\bR\n" +
"createDirs\"%\n" +
"\x0fFSWriteResponse\x12\x12\n" +
"\x04size\x18\x01 \x01(\x03R\x04size\"<\n" +
"\x0eFSListResponse\x12*\n" +
"\aentries\x18\x01 \x03(\v2\x10.volume.FileInfoR\aentries\"b\n" +
"\x0fFSRemoveRequest\x12\x1d\n" +
"\n" +
"session_id\x18\x01 \x01(\tR\tsessionId\x12\x12\n" +
"\x04path\x18\x02 \x01(\tR\x04path\x12\x1c\n" +
"\trecursive\x18\x03 \x01(\bR\trecursive\"f\n" +
"\x0fFSRenameRequest\x12\x1d\n" +
"\n" +
"session_id\x18\x01 \x01(\tR\tsessionId\x12\x19\n" +
"\bold_path\x18\x02 \x01(\tR\aoldPath\x12\x19\n" +
"\bnew_path\x18\x03 \x01(\tR\anewPath2\xfd\x03\n" +
"\x06Volume\x128\n" +
"\bSyncPush\x12\x13.volume.SyncMessage\x1a\x13.volume.SyncMessage(\x010\x01\x127\n" +
"\bSyncPull\x12\x14.volume.SyncManifest\x1a\x13.volume.SyncMessage0\x01\x128\n" +
"\bReadFile\x12\x15.volume.FSReadRequest\x1a\x13.volume.FSDataChunk0\x01\x12<\n" +
"\tWriteFile\x12\x14.volume.FSWriteChunk\x1a\x17.volume.FSWriteResponse(\x01\x12+\n" +
"\x04Stat\x12\x11.volume.FSRequest\x1a\x10.volume.FileInfo\x124\n" +
"\aListDir\x12\x11.volume.FSRequest\x1a\x16.volume.FSListResponse\x127\n" +
"\x06Remove\x12\x17.volume.FSRemoveRequest\x1a\x14.volume.FSOpResponse\x127\n" +
"\x06Rename\x12\x17.volume.FSRenameRequest\x1a\x14.volume.FSOpResponse\x123\n" +
"\bMkdirAll\x12\x11.volume.FSRequest\x1a\x14.volume.FSOpResponseB!Z\x1fgithub.com/yaoapp/tai/volume/pbb\x06proto3"
var (
file_volume_pb_volume_proto_rawDescOnce sync.Once
file_volume_pb_volume_proto_rawDescData []byte
)
func file_volume_pb_volume_proto_rawDescGZIP() []byte {
file_volume_pb_volume_proto_rawDescOnce.Do(func() {
file_volume_pb_volume_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_volume_pb_volume_proto_rawDesc), len(file_volume_pb_volume_proto_rawDesc)))
})
return file_volume_pb_volume_proto_rawDescData
}
var file_volume_pb_volume_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
var file_volume_pb_volume_proto_msgTypes = make([]protoimpl.MessageInfo, 15)
var file_volume_pb_volume_proto_goTypes = []any{
(FileChunk_ChunkType)(0), // 0: volume.FileChunk.ChunkType
(*FileInfo)(nil), // 1: volume.FileInfo
(*SyncManifest)(nil), // 2: volume.SyncManifest
(*SyncMessage)(nil), // 3: volume.SyncMessage
(*SyncDiff)(nil), // 4: volume.SyncDiff
(*FileChunk)(nil), // 5: volume.FileChunk
(*SyncResult)(nil), // 6: volume.SyncResult
(*FSRequest)(nil), // 7: volume.FSRequest
(*FSOpResponse)(nil), // 8: volume.FSOpResponse
(*FSReadRequest)(nil), // 9: volume.FSReadRequest
(*FSDataChunk)(nil), // 10: volume.FSDataChunk
(*FSWriteChunk)(nil), // 11: volume.FSWriteChunk
(*FSWriteResponse)(nil), // 12: volume.FSWriteResponse
(*FSListResponse)(nil), // 13: volume.FSListResponse
(*FSRemoveRequest)(nil), // 14: volume.FSRemoveRequest
(*FSRenameRequest)(nil), // 15: volume.FSRenameRequest
}
var file_volume_pb_volume_proto_depIdxs = []int32{
1, // 0: volume.SyncManifest.files:type_name -> volume.FileInfo
2, // 1: volume.SyncMessage.manifest:type_name -> volume.SyncManifest
4, // 2: volume.SyncMessage.diff:type_name -> volume.SyncDiff
5, // 3: volume.SyncMessage.chunk:type_name -> volume.FileChunk
6, // 4: volume.SyncMessage.result:type_name -> volume.SyncResult
0, // 5: volume.FileChunk.type:type_name -> volume.FileChunk.ChunkType
1, // 6: volume.FSListResponse.entries:type_name -> volume.FileInfo
3, // 7: volume.Volume.SyncPush:input_type -> volume.SyncMessage
2, // 8: volume.Volume.SyncPull:input_type -> volume.SyncManifest
9, // 9: volume.Volume.ReadFile:input_type -> volume.FSReadRequest
11, // 10: volume.Volume.WriteFile:input_type -> volume.FSWriteChunk
7, // 11: volume.Volume.Stat:input_type -> volume.FSRequest
7, // 12: volume.Volume.ListDir:input_type -> volume.FSRequest
14, // 13: volume.Volume.Remove:input_type -> volume.FSRemoveRequest
15, // 14: volume.Volume.Rename:input_type -> volume.FSRenameRequest
7, // 15: volume.Volume.MkdirAll:input_type -> volume.FSRequest
3, // 16: volume.Volume.SyncPush:output_type -> volume.SyncMessage
3, // 17: volume.Volume.SyncPull:output_type -> volume.SyncMessage
10, // 18: volume.Volume.ReadFile:output_type -> volume.FSDataChunk
12, // 19: volume.Volume.WriteFile:output_type -> volume.FSWriteResponse
1, // 20: volume.Volume.Stat:output_type -> volume.FileInfo
13, // 21: volume.Volume.ListDir:output_type -> volume.FSListResponse
8, // 22: volume.Volume.Remove:output_type -> volume.FSOpResponse
8, // 23: volume.Volume.Rename:output_type -> volume.FSOpResponse
8, // 24: volume.Volume.MkdirAll:output_type -> volume.FSOpResponse
16, // [16:25] is the sub-list for method output_type
7, // [7:16] is the sub-list for method input_type
7, // [7:7] is the sub-list for extension type_name
7, // [7:7] is the sub-list for extension extendee
0, // [0:7] is the sub-list for field type_name
}
func init() { file_volume_pb_volume_proto_init() }
func file_volume_pb_volume_proto_init() {
if File_volume_pb_volume_proto != nil {
return
}
file_volume_pb_volume_proto_msgTypes[2].OneofWrappers = []any{
(*SyncMessage_Manifest)(nil),
(*SyncMessage_Diff)(nil),
(*SyncMessage_Chunk)(nil),
(*SyncMessage_Result)(nil),
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: unsafe.Slice(unsafe.StringData(file_volume_pb_volume_proto_rawDesc), len(file_volume_pb_volume_proto_rawDesc)),
NumEnums: 1,
NumMessages: 15,
NumExtensions: 0,
NumServices: 1,
},
GoTypes: file_volume_pb_volume_proto_goTypes,
DependencyIndexes: file_volume_pb_volume_proto_depIdxs,
EnumInfos: file_volume_pb_volume_proto_enumTypes,
MessageInfos: file_volume_pb_volume_proto_msgTypes,
}.Build()
File_volume_pb_volume_proto = out.File
file_volume_pb_volume_proto_goTypes = nil
file_volume_pb_volume_proto_depIdxs = nil
}