protocol

package
v0.0.0-...-9021772 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2019 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Type_name = map[int32]string{
	0: "Normal",
	1: "Directory",
	2: "Symlink",
}
View Source
var Type_value = map[string]int32{
	"Normal":    0,
	"Directory": 1,
	"Symlink":   2,
}

Functions

func RegisterSyncServiceServer

func RegisterSyncServiceServer(s *grpc.Server, srv SyncServiceServer)

Types

type DownloadRequest

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

func (*DownloadRequest) Descriptor

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

func (*DownloadRequest) GetFilename

func (m *DownloadRequest) GetFilename() string

func (*DownloadRequest) ProtoMessage

func (*DownloadRequest) ProtoMessage()

func (*DownloadRequest) Reset

func (m *DownloadRequest) Reset()

func (*DownloadRequest) String

func (m *DownloadRequest) String() string

func (*DownloadRequest) XXX_DiscardUnknown

func (m *DownloadRequest) XXX_DiscardUnknown()

func (*DownloadRequest) XXX_Marshal

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

func (*DownloadRequest) XXX_Merge

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

func (*DownloadRequest) XXX_Size

func (m *DownloadRequest) XXX_Size() int

func (*DownloadRequest) XXX_Unmarshal

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

type DownloadResponse

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

func (*DownloadResponse) Descriptor

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

func (*DownloadResponse) GetContent

func (m *DownloadResponse) GetContent() []byte

func (*DownloadResponse) ProtoMessage

func (*DownloadResponse) ProtoMessage()

func (*DownloadResponse) Reset

func (m *DownloadResponse) Reset()

func (*DownloadResponse) String

func (m *DownloadResponse) String() string

func (*DownloadResponse) XXX_DiscardUnknown

func (m *DownloadResponse) XXX_DiscardUnknown()

func (*DownloadResponse) XXX_Marshal

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

func (*DownloadResponse) XXX_Merge

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

func (*DownloadResponse) XXX_Size

func (m *DownloadResponse) XXX_Size() int

func (*DownloadResponse) XXX_Unmarshal

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

type File

type File struct {
	Path                 string   `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"`
	Checksum             string   `protobuf:"bytes,2,opt,name=checksum,proto3" json:"checksum,omitempty"`
	Size                 int64    `protobuf:"varint,3,opt,name=size,proto3" json:"size,omitempty"`
	Type                 Type     `protobuf:"varint,4,opt,name=type,proto3,enum=protocol.Type" json:"type,omitempty"`
	Symlink              string   `protobuf:"bytes,5,opt,name=symlink,proto3" json:"symlink,omitempty"`
	Mode                 uint32   `protobuf:"varint,6,opt,name=mode,proto3" json:"mode,omitempty"`
	Uid                  uint32   `protobuf:"varint,7,opt,name=uid,proto3" json:"uid,omitempty"`
	Gid                  uint32   `protobuf:"varint,8,opt,name=gid,proto3" json:"gid,omitempty"`
	User                 string   `protobuf:"bytes,9,opt,name=user,proto3" json:"user,omitempty"`
	Group                string   `protobuf:"bytes,10,opt,name=group,proto3" json:"group,omitempty"`
	Base                 string   `protobuf:"bytes,11,opt,name=base,proto3" json:"base,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*File) Descriptor

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

func (*File) GetBase

func (m *File) GetBase() string

func (*File) GetChecksum

func (m *File) GetChecksum() string

func (*File) GetGid

func (m *File) GetGid() uint32

func (*File) GetGroup

func (m *File) GetGroup() string

func (*File) GetMode

func (m *File) GetMode() uint32

func (*File) GetPath

func (m *File) GetPath() string

func (*File) GetSize

func (m *File) GetSize() int64
func (m *File) GetSymlink() string

func (*File) GetType

func (m *File) GetType() Type

func (*File) GetUid

func (m *File) GetUid() uint32

func (*File) GetUser

func (m *File) GetUser() string

func (*File) ProtoMessage

func (*File) ProtoMessage()

func (*File) Reset

func (m *File) Reset()

func (*File) String

func (m *File) String() string

func (*File) XXX_DiscardUnknown

func (m *File) XXX_DiscardUnknown()

func (*File) XXX_Marshal

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

func (*File) XXX_Merge

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

func (*File) XXX_Size

func (m *File) XXX_Size() int

func (*File) XXX_Unmarshal

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

type RelayFile

type RelayFile struct {
	Name                 string   `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	LastStatus           string   `protobuf:"bytes,2,opt,name=lastStatus,proto3" json:"lastStatus,omitempty"`
	LastSyncAt           string   `protobuf:"bytes,3,opt,name=lastSyncAt,proto3" json:"lastSyncAt,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*RelayFile) Descriptor

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

func (*RelayFile) GetLastStatus

func (m *RelayFile) GetLastStatus() string

func (*RelayFile) GetLastSyncAt

func (m *RelayFile) GetLastSyncAt() string

func (*RelayFile) GetName

func (m *RelayFile) GetName() string

func (*RelayFile) ProtoMessage

func (*RelayFile) ProtoMessage()

func (*RelayFile) Reset

func (m *RelayFile) Reset()

func (*RelayFile) String

func (m *RelayFile) String() string

func (*RelayFile) XXX_DiscardUnknown

func (m *RelayFile) XXX_DiscardUnknown()

func (*RelayFile) XXX_Marshal

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

func (*RelayFile) XXX_Merge

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

func (*RelayFile) XXX_Size

func (m *RelayFile) XXX_Size() int

func (*RelayFile) XXX_Unmarshal

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

type RelayRequest

type RelayRequest struct {
	Names                []string `protobuf:"bytes,1,rep,name=names,proto3" json:"names,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*RelayRequest) Descriptor

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

func (*RelayRequest) GetNames

func (m *RelayRequest) GetNames() []string

func (*RelayRequest) ProtoMessage

func (*RelayRequest) ProtoMessage()

func (*RelayRequest) Reset

func (m *RelayRequest) Reset()

func (*RelayRequest) String

func (m *RelayRequest) String() string

func (*RelayRequest) XXX_DiscardUnknown

func (m *RelayRequest) XXX_DiscardUnknown()

func (*RelayRequest) XXX_Marshal

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

func (*RelayRequest) XXX_Merge

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

func (*RelayRequest) XXX_Size

func (m *RelayRequest) XXX_Size() int

func (*RelayRequest) XXX_Unmarshal

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

type RelayResponse

type RelayResponse struct {
	Files                []*RelayFile `protobuf:"bytes,1,rep,name=files,proto3" json:"files,omitempty"`
	XXX_NoUnkeyedLiteral struct{}     `json:"-"`
	XXX_unrecognized     []byte       `json:"-"`
	XXX_sizecache        int32        `json:"-"`
}

func (*RelayResponse) Descriptor

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

func (*RelayResponse) GetFiles

func (m *RelayResponse) GetFiles() []*RelayFile

func (*RelayResponse) ProtoMessage

func (*RelayResponse) ProtoMessage()

func (*RelayResponse) Reset

func (m *RelayResponse) Reset()

func (*RelayResponse) String

func (m *RelayResponse) String() string

func (*RelayResponse) XXX_DiscardUnknown

func (m *RelayResponse) XXX_DiscardUnknown()

func (*RelayResponse) XXX_Marshal

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

func (*RelayResponse) XXX_Merge

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

func (*RelayResponse) XXX_Size

func (m *RelayResponse) XXX_Size() int

func (*RelayResponse) XXX_Unmarshal

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

type SyncRequest

type SyncRequest struct {
	Path                 string   `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"`
	Ignores              []string `protobuf:"bytes,2,rep,name=ignores,proto3" json:"ignores,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*SyncRequest) Descriptor

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

func (*SyncRequest) GetIgnores

func (m *SyncRequest) GetIgnores() []string

func (*SyncRequest) GetPath

func (m *SyncRequest) GetPath() string

func (*SyncRequest) ProtoMessage

func (*SyncRequest) ProtoMessage()

func (*SyncRequest) Reset

func (m *SyncRequest) Reset()

func (*SyncRequest) String

func (m *SyncRequest) String() string

func (*SyncRequest) XXX_DiscardUnknown

func (m *SyncRequest) XXX_DiscardUnknown()

func (*SyncRequest) XXX_Marshal

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

func (*SyncRequest) XXX_Merge

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

func (*SyncRequest) XXX_Size

func (m *SyncRequest) XXX_Size() int

func (*SyncRequest) XXX_Unmarshal

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

type SyncResponse

type SyncResponse struct {
	Files                []*File  `protobuf:"bytes,1,rep,name=files,proto3" json:"files,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*SyncResponse) Descriptor

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

func (*SyncResponse) GetFiles

func (m *SyncResponse) GetFiles() []*File

func (*SyncResponse) ProtoMessage

func (*SyncResponse) ProtoMessage()

func (*SyncResponse) Reset

func (m *SyncResponse) Reset()

func (*SyncResponse) String

func (m *SyncResponse) String() string

func (*SyncResponse) XXX_DiscardUnknown

func (m *SyncResponse) XXX_DiscardUnknown()

func (*SyncResponse) XXX_Marshal

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

func (*SyncResponse) XXX_Merge

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

func (*SyncResponse) XXX_Size

func (m *SyncResponse) XXX_Size() int

func (*SyncResponse) XXX_Unmarshal

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

type SyncServiceClient

type SyncServiceClient interface {
	SyncFile(ctx context.Context, in *DownloadRequest, opts ...grpc.CallOption) (SyncService_SyncFileClient, error)
	SyncMeta(ctx context.Context, in *SyncRequest, opts ...grpc.CallOption) (*SyncResponse, error)
	RelayInfo(ctx context.Context, in *RelayRequest, opts ...grpc.CallOption) (*RelayResponse, error)
}

SyncServiceClient is the client API for SyncService service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewSyncServiceClient

func NewSyncServiceClient(cc *grpc.ClientConn) SyncServiceClient

type SyncServiceServer

type SyncServiceServer interface {
	SyncFile(*DownloadRequest, SyncService_SyncFileServer) error
	SyncMeta(context.Context, *SyncRequest) (*SyncResponse, error)
	RelayInfo(context.Context, *RelayRequest) (*RelayResponse, error)
}

SyncServiceServer is the server API for SyncService service.

type SyncService_SyncFileClient

type SyncService_SyncFileClient interface {
	Recv() (*DownloadResponse, error)
	grpc.ClientStream
}

type SyncService_SyncFileServer

type SyncService_SyncFileServer interface {
	Send(*DownloadResponse) error
	grpc.ServerStream
}

type Type

type Type int32
const (
	Type_Normal    Type = 0
	Type_Directory Type = 1
	Type_Symlink   Type = 2
)

func (Type) EnumDescriptor

func (Type) EnumDescriptor() ([]byte, []int)

func (Type) String

func (x Type) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL