Documentation
¶
Overview ¶
Package api is a generated protocol buffer package.
It is generated from these files:
api.proto
It has these top-level messages:
EmptyResponse EmptyReq UserResponse User TxInfoResponse TxInfo CreateTokenReq TokenResponse Token VerifyTokenReq MetadataResponse Metadata PathReq MoveReq TxChunk WriteSummaryResponse WriteSummary TxEnd DataChunkResponse DataChunk RevisionResponse Revision RevisionReq RecycleEntryResponse RecycleEntry RecycleEntryReq LinkPermissions NewLinkReq UpdateLinkReq PublicLinkResponse ShareRecipient ACLReq PublicLink TokenReq ShareIDReq FolderShareResponse FolderShare ReceivedShareResponse NewFolderShareReq UpdateFolderShareReq UnshareFolderReq ListFolderSharesReq ReceivedShareReq
Index ¶
- Variables
- func ContextGetAccessToken(ctx context.Context) (string, bool)
- func ContextSetAccessToken(ctx context.Context, token string) context.Context
- func ContextSetUser(ctx context.Context, u *User) context.Context
- func IsErrorCode(err error, code ErrorCode) bool
- func RegisterAuthServer(s *grpc.Server, srv AuthServer)
- func RegisterPreviewServer(s *grpc.Server, srv PreviewServer)
- func RegisterShareServer(s *grpc.Server, srv ShareServer)
- func RegisterStorageServer(s *grpc.Server, srv StorageServer)
- type ACLReq
- type AppError
- type AuthClient
- type AuthManager
- type AuthServer
- type CreateTokenReq
- type DataChunk
- type DataChunkResponse
- type EmptyReq
- type EmptyResponse
- type ErrorCode
- type FolderShare
- func (*FolderShare) Descriptor() ([]byte, []int)
- func (m *FolderShare) GetCtime() uint64
- func (m *FolderShare) GetId() string
- func (m *FolderShare) GetMtime() uint64
- func (m *FolderShare) GetOwnerId() string
- func (m *FolderShare) GetPath() string
- func (m *FolderShare) GetReadOnly() bool
- func (m *FolderShare) GetRecipient() *ShareRecipient
- func (m *FolderShare) GetTarget() string
- func (*FolderShare) ProtoMessage()
- func (m *FolderShare) Reset()
- func (m *FolderShare) String() string
- type FolderShareResponse
- type LinkPermissions
- type ListFolderSharesReq
- type Metadata
- func (*Metadata) Descriptor() ([]byte, []int)
- func (m *Metadata) GetChecksum() string
- func (m *Metadata) GetDerefPath() string
- func (m *Metadata) GetEosFile() string
- func (m *Metadata) GetEosInstance() string
- func (m *Metadata) GetEtag() string
- func (m *Metadata) GetId() string
- func (m *Metadata) GetIsDir() bool
- func (m *Metadata) GetIsReadOnly() bool
- func (m *Metadata) GetMigId() string
- func (m *Metadata) GetMigPath() string
- func (m *Metadata) GetMtime() uint64
- func (m *Metadata) GetPath() string
- func (m *Metadata) GetShareTarget() string
- func (m *Metadata) GetSize() uint64
- func (m *Metadata) GetSys() []byte
- func (*Metadata) ProtoMessage()
- func (m *Metadata) Reset()
- func (m *Metadata) String() string
- type MetadataResponse
- type Mount
- type MountOptions
- type MountTable
- type MountTableEntry
- type MoveReq
- type NewFolderShareReq
- func (*NewFolderShareReq) Descriptor() ([]byte, []int)
- func (m *NewFolderShareReq) GetPath() string
- func (m *NewFolderShareReq) GetReadOnly() bool
- func (m *NewFolderShareReq) GetRecipient() *ShareRecipient
- func (*NewFolderShareReq) ProtoMessage()
- func (m *NewFolderShareReq) Reset()
- func (m *NewFolderShareReq) String() string
- type NewLinkReq
- func (*NewLinkReq) Descriptor() ([]byte, []int)
- func (m *NewLinkReq) GetExpires() uint64
- func (m *NewLinkReq) GetPassword() string
- func (m *NewLinkReq) GetPath() string
- func (m *NewLinkReq) GetReadOnly() bool
- func (*NewLinkReq) ProtoMessage()
- func (m *NewLinkReq) Reset()
- func (m *NewLinkReq) String() string
- type PathReq
- type PreviewClient
- type PreviewServer
- type Preview_ReadPreviewClient
- type Preview_ReadPreviewServer
- type PublicLink
- func (*PublicLink) Descriptor() ([]byte, []int)
- func (m *PublicLink) GetExpires() uint64
- func (m *PublicLink) GetId() string
- func (m *PublicLink) GetItemType() PublicLink_ItemType
- func (m *PublicLink) GetMtime() uint64
- func (m *PublicLink) GetPath() string
- func (m *PublicLink) GetProtected() bool
- func (m *PublicLink) GetReadOnly() bool
- func (m *PublicLink) GetToken() string
- func (*PublicLink) ProtoMessage()
- func (m *PublicLink) Reset()
- func (m *PublicLink) String() string
- type PublicLinkManager
- type PublicLinkOptions
- type PublicLinkResponse
- type PublicLink_ItemType
- type ReceivedShareReq
- type ReceivedShareResponse
- func (*ReceivedShareResponse) Descriptor() ([]byte, []int)
- func (m *ReceivedShareResponse) GetShare() *FolderShare
- func (m *ReceivedShareResponse) GetStatus() StatusCode
- func (*ReceivedShareResponse) ProtoMessage()
- func (m *ReceivedShareResponse) Reset()
- func (m *ReceivedShareResponse) String() string
- type RecycleEntry
- func (*RecycleEntry) Descriptor() ([]byte, []int)
- func (m *RecycleEntry) GetDelMtime() uint64
- func (m *RecycleEntry) GetIsDir() bool
- func (m *RecycleEntry) GetRestoreKey() string
- func (m *RecycleEntry) GetRestorePath() string
- func (m *RecycleEntry) GetSize() uint64
- func (*RecycleEntry) ProtoMessage()
- func (m *RecycleEntry) Reset()
- func (m *RecycleEntry) String() string
- type RecycleEntryReq
- type RecycleEntryResponse
- func (*RecycleEntryResponse) Descriptor() ([]byte, []int)
- func (m *RecycleEntryResponse) GetRecycleEntry() *RecycleEntry
- func (m *RecycleEntryResponse) GetStatus() StatusCode
- func (*RecycleEntryResponse) ProtoMessage()
- func (m *RecycleEntryResponse) Reset()
- func (m *RecycleEntryResponse) String() string
- type Revision
- type RevisionReq
- type RevisionResponse
- type ShareClient
- type ShareIDReq
- type ShareManager
- type ShareRecipient
- type ShareRecipient_RecipientType
- type ShareServer
- type Share_ListFolderSharesClient
- type Share_ListFolderSharesServer
- type Share_ListPublicLinksClient
- type Share_ListPublicLinksServer
- type Share_ListReceivedSharesClient
- type Share_ListReceivedSharesServer
- type StatusCode
- type Storage
- type StorageClient
- type StorageServer
- type StorageWrapper
- type Storage_ListFolderClient
- type Storage_ListFolderServer
- type Storage_ListRecycleClient
- type Storage_ListRecycleServer
- type Storage_ListRevisionsClient
- type Storage_ListRevisionsServer
- type Storage_ReadFileClient
- type Storage_ReadFileServer
- type Storage_ReadRevisionClient
- type Storage_ReadRevisionServer
- type Storage_WriteChunkClient
- type Storage_WriteChunkServer
- type Token
- type TokenManager
- type TokenReq
- type TokenResponse
- type TxChunk
- type TxEnd
- type TxInfo
- type TxInfoResponse
- type UnshareFolderReq
- type UpdateFolderShareReq
- func (*UpdateFolderShareReq) Descriptor() ([]byte, []int)
- func (m *UpdateFolderShareReq) GetId() string
- func (m *UpdateFolderShareReq) GetReadOnly() bool
- func (m *UpdateFolderShareReq) GetUpdateReadOnly() bool
- func (*UpdateFolderShareReq) ProtoMessage()
- func (m *UpdateFolderShareReq) Reset()
- func (m *UpdateFolderShareReq) String() string
- type UpdateLinkReq
- func (*UpdateLinkReq) Descriptor() ([]byte, []int)
- func (m *UpdateLinkReq) GetExpiration() uint64
- func (m *UpdateLinkReq) GetId() string
- func (m *UpdateLinkReq) GetPassword() string
- func (m *UpdateLinkReq) GetReadOnly() bool
- func (m *UpdateLinkReq) GetUpdateExpiration() bool
- func (m *UpdateLinkReq) GetUpdatePassword() bool
- func (m *UpdateLinkReq) GetUpdateReadOnly() bool
- func (*UpdateLinkReq) ProtoMessage()
- func (m *UpdateLinkReq) Reset()
- func (m *UpdateLinkReq) String() string
- type User
- type UserResponse
- type VerifyTokenReq
- type VirtualStorage
- type WriteSummary
- type WriteSummaryResponse
- func (*WriteSummaryResponse) Descriptor() ([]byte, []int)
- func (m *WriteSummaryResponse) GetStatus() StatusCode
- func (m *WriteSummaryResponse) GetWriteSummary() *WriteSummary
- func (*WriteSummaryResponse) ProtoMessage()
- func (m *WriteSummaryResponse) Reset()
- func (m *WriteSummaryResponse) String() string
Constants ¶
This section is empty.
Variables ¶
View Source
var PublicLink_ItemType_name = map[int32]string{
0: "FILE",
1: "FOLDER",
}
View Source
var PublicLink_ItemType_value = map[string]int32{
"FILE": 0,
"FOLDER": 1,
}
View Source
0: "USER",
1: "GROUP",
2: "UNIX",
}
View Source
"USER": 0,
"GROUP": 1,
"UNIX": 2,
}
View Source
var StatusCode_name = map[int32]string{
0: "OK",
1: "UNKNOWN",
2: "STORAGE_NOT_FOUND",
3: "STORAGE_ALREADY_EXISTS",
4: "STORAGE_PERMISSIONDENIED",
5: "CONTEXT_USER_REQUIRED",
6: "PATH_INVALID",
7: "PUBLIC_LINK_NOT_FOUND",
8: "PUBLIC_LINK_INVALID_DATE",
9: "STORAGE_NOT_SUPPORTED",
10: "USER_NOT_FOUND",
11: "TOKEN_INVALID",
12: "FOLDER_SHARE_NOT_FOUND",
}
View Source
var StatusCode_value = map[string]int32{
"OK": 0,
"UNKNOWN": 1,
"STORAGE_NOT_FOUND": 2,
"STORAGE_ALREADY_EXISTS": 3,
"STORAGE_PERMISSIONDENIED": 4,
"CONTEXT_USER_REQUIRED": 5,
"PATH_INVALID": 6,
"PUBLIC_LINK_NOT_FOUND": 7,
"PUBLIC_LINK_INVALID_DATE": 8,
"STORAGE_NOT_SUPPORTED": 9,
"USER_NOT_FOUND": 10,
"TOKEN_INVALID": 11,
"FOLDER_SHARE_NOT_FOUND": 12,
}
Functions ¶
func ContextSetAccessToken ¶
func IsErrorCode ¶
func RegisterAuthServer ¶
func RegisterAuthServer(s *grpc.Server, srv AuthServer)
func RegisterPreviewServer ¶
func RegisterPreviewServer(s *grpc.Server, srv PreviewServer)
func RegisterShareServer ¶
func RegisterShareServer(s *grpc.Server, srv ShareServer)
func RegisterStorageServer ¶
func RegisterStorageServer(s *grpc.Server, srv StorageServer)
Types ¶
type ACLReq ¶
type ACLReq struct {
Path string `protobuf:"bytes,1,opt,name=path" json:"path,omitempty"`
Recipient *ShareRecipient `protobuf:"bytes,2,opt,name=recipient" json:"recipient,omitempty"`
ReadOnly bool `protobuf:"varint,3,opt,name=read_only,json=readOnly" json:"read_only,omitempty"`
}
func (*ACLReq) Descriptor ¶
func (*ACLReq) GetReadOnly ¶
func (*ACLReq) GetRecipient ¶
func (m *ACLReq) GetRecipient() *ShareRecipient
func (*ACLReq) GetShares ¶
func (m *ACLReq) GetShares() []*FolderShare
func (*ACLReq) ProtoMessage ¶
func (*ACLReq) ProtoMessage()
type AppError ¶
func (AppError) WithMessage ¶
type AuthClient ¶
type AuthClient interface {
CreateToken(ctx context.Context, in *CreateTokenReq, opts ...grpc.CallOption) (*TokenResponse, error)
VerifyToken(ctx context.Context, in *VerifyTokenReq, opts ...grpc.CallOption) (*UserResponse, error)
}
func NewAuthClient ¶
func NewAuthClient(cc *grpc.ClientConn) AuthClient
type AuthManager ¶
type AuthServer ¶
type AuthServer interface {
CreateToken(context.Context, *CreateTokenReq) (*TokenResponse, error)
VerifyToken(context.Context, *VerifyTokenReq) (*UserResponse, error)
}
type CreateTokenReq ¶
type CreateTokenReq struct {
ClientId string `protobuf:"bytes,1,opt,name=client_id,json=clientId" json:"client_id,omitempty"`
ClientSecret string `protobuf:"bytes,2,opt,name=client_secret,json=clientSecret" json:"client_secret,omitempty"`
}
func (*CreateTokenReq) Descriptor ¶
func (*CreateTokenReq) Descriptor() ([]byte, []int)
func (*CreateTokenReq) GetClientId ¶
func (m *CreateTokenReq) GetClientId() string
func (*CreateTokenReq) GetClientSecret ¶
func (m *CreateTokenReq) GetClientSecret() string
func (*CreateTokenReq) ProtoMessage ¶
func (*CreateTokenReq) ProtoMessage()
func (*CreateTokenReq) Reset ¶
func (m *CreateTokenReq) Reset()
func (*CreateTokenReq) String ¶
func (m *CreateTokenReq) String() string
type DataChunk ¶
type DataChunk struct {
Length uint64 `protobuf:"varint,1,opt,name=length" json:"length,omitempty"`
Offset uint64 `protobuf:"varint,2,opt,name=offset" json:"offset,omitempty"`
Data []byte `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"`
}
func (*DataChunk) Descriptor ¶
func (*DataChunk) ProtoMessage ¶
func (*DataChunk) ProtoMessage()
type DataChunkResponse ¶
type DataChunkResponse struct {
Status StatusCode `protobuf:"varint,1,opt,name=status,enum=api.StatusCode" json:"status,omitempty"`
DataChunk *DataChunk `protobuf:"bytes,2,opt,name=dataChunk" json:"dataChunk,omitempty"`
}
func (*DataChunkResponse) Descriptor ¶
func (*DataChunkResponse) Descriptor() ([]byte, []int)
func (*DataChunkResponse) GetDataChunk ¶
func (m *DataChunkResponse) GetDataChunk() *DataChunk
func (*DataChunkResponse) GetStatus ¶
func (m *DataChunkResponse) GetStatus() StatusCode
func (*DataChunkResponse) ProtoMessage ¶
func (*DataChunkResponse) ProtoMessage()
func (*DataChunkResponse) Reset ¶
func (m *DataChunkResponse) Reset()
func (*DataChunkResponse) String ¶
func (m *DataChunkResponse) String() string
type EmptyReq ¶
type EmptyReq struct {
}
func (*EmptyReq) Descriptor ¶
func (*EmptyReq) ProtoMessage ¶
func (*EmptyReq) ProtoMessage()
type EmptyResponse ¶
type EmptyResponse struct {
Status StatusCode `protobuf:"varint,1,opt,name=status,enum=api.StatusCode" json:"status,omitempty"`
}
func (*EmptyResponse) Descriptor ¶
func (*EmptyResponse) Descriptor() ([]byte, []int)
func (*EmptyResponse) GetStatus ¶
func (m *EmptyResponse) GetStatus() StatusCode
func (*EmptyResponse) ProtoMessage ¶
func (*EmptyResponse) ProtoMessage()
func (*EmptyResponse) Reset ¶
func (m *EmptyResponse) Reset()
func (*EmptyResponse) String ¶
func (m *EmptyResponse) String() string
type ErrorCode ¶
type ErrorCode string
const ( // StorageNotFoundErrorCode is used when a resource is not found. StorageNotFoundErrorCode ErrorCode = "STORAGE_ERROR_NOT_FOUND" // StorageAlreadyExistsErrorCode is used when a resource already exists. StorageAlreadyExistsErrorCode ErrorCode = "STORAGE_ERROR_ALREADY_EXISTS" // StoragePermissionDeniedErrorCode is used when it is not possible to acces the resource. StoragePermissionDeniedErrorCode ErrorCode = "STORAGE_ERROR_PERMISSION_DENIED" // ContextUserRequired requires an pkg.User object in the context ContextUserRequiredError ErrorCode = "CONTEXT_USER_REQUIRED" // PathInvalidError is used when a path is invalid, like not begging with / PathInvalidError ErrorCode = "PATH_INVALID_ERROR" // PublicLinkNotFoundErrorCode is used when a resource is not found. PublicLinkNotFoundErrorCode ErrorCode = "PUBLIC_LINK_NOT_FOUND" PublicLinkInvalidExpireDateErrorCode ErrorCode = "PUBLIC_LINK_INVALID_EXPIRE_DATE" FolderShareNotFoundErrorCode ErrorCode = "FOLDER_SHARE_NOT_FOUND" // StorageOperationNotSupported is used when some operation is not available on // the storage, like emptying the recycle bin StorageNotSupportedErrorCode ErrorCode = "STORAGE_NOT_SUPPORTED" UserNotFoundErrorCode ErrorCode = "USER_NOT_FOUND" TokenInvalidErrorCode ErrorCode = "TOKEN_INVALID" UnknownError ErrorCode = "UNKNOWN" )
type FolderShare ¶
type FolderShare struct {
}
func (*FolderShare) Descriptor ¶
func (*FolderShare) Descriptor() ([]byte, []int)
func (*FolderShare) GetCtime ¶
func (m *FolderShare) GetCtime() uint64
func (*FolderShare) GetId ¶
func (m *FolderShare) GetId() string
func (*FolderShare) GetMtime ¶
func (m *FolderShare) GetMtime() uint64
func (*FolderShare) GetOwnerId ¶
func (m *FolderShare) GetOwnerId() string
func (*FolderShare) GetPath ¶
func (m *FolderShare) GetPath() string
func (*FolderShare) GetReadOnly ¶
func (m *FolderShare) GetReadOnly() bool
func (*FolderShare) GetRecipient ¶
func (m *FolderShare) GetRecipient() *ShareRecipient
func (*FolderShare) GetTarget ¶
func (m *FolderShare) GetTarget() string
func (*FolderShare) ProtoMessage ¶
func (*FolderShare) ProtoMessage()
func (*FolderShare) Reset ¶
func (m *FolderShare) Reset()
func (*FolderShare) String ¶
func (m *FolderShare) String() string
type FolderShareResponse ¶
type FolderShareResponse struct {
}
func (*FolderShareResponse) Descriptor ¶
func (*FolderShareResponse) Descriptor() ([]byte, []int)
func (*FolderShareResponse) GetFolderShare ¶
func (m *FolderShareResponse) GetFolderShare() *FolderShare
func (*FolderShareResponse) GetStatus ¶
func (m *FolderShareResponse) GetStatus() StatusCode
func (*FolderShareResponse) ProtoMessage ¶
func (*FolderShareResponse) ProtoMessage()
func (*FolderShareResponse) Reset ¶
func (m *FolderShareResponse) Reset()
func (*FolderShareResponse) String ¶
func (m *FolderShareResponse) String() string
type LinkPermissions ¶
type LinkPermissions struct {
Read bool `protobuf:"varint,1,opt,name=read" json:"read,omitempty"`
Write bool `protobuf:"varint,2,opt,name=write" json:"write,omitempty"`
}
func (*LinkPermissions) Descriptor ¶
func (*LinkPermissions) Descriptor() ([]byte, []int)
func (*LinkPermissions) GetRead ¶
func (m *LinkPermissions) GetRead() bool
func (*LinkPermissions) GetWrite ¶
func (m *LinkPermissions) GetWrite() bool
func (*LinkPermissions) ProtoMessage ¶
func (*LinkPermissions) ProtoMessage()
func (*LinkPermissions) Reset ¶
func (m *LinkPermissions) Reset()
func (*LinkPermissions) String ¶
func (m *LinkPermissions) String() string
type ListFolderSharesReq ¶
type ListFolderSharesReq struct {
}
func (*ListFolderSharesReq) Descriptor ¶
func (*ListFolderSharesReq) Descriptor() ([]byte, []int)
func (*ListFolderSharesReq) GetPath ¶
func (m *ListFolderSharesReq) GetPath() string
func (*ListFolderSharesReq) ProtoMessage ¶
func (*ListFolderSharesReq) ProtoMessage()
func (*ListFolderSharesReq) Reset ¶
func (m *ListFolderSharesReq) Reset()
func (*ListFolderSharesReq) String ¶
func (m *ListFolderSharesReq) String() string
type Metadata ¶
type Metadata struct {
Id string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"`
Path string `protobuf:"bytes,2,opt,name=path" json:"path,omitempty"`
Size uint64 `protobuf:"varint,3,opt,name=size" json:"size,omitempty"`
Mtime uint64 `protobuf:"varint,4,opt,name=mtime" json:"mtime,omitempty"`
IsDir bool `protobuf:"varint,5,opt,name=is_dir,json=isDir" json:"is_dir,omitempty"`
Etag string `protobuf:"bytes,6,opt,name=etag" json:"etag,omitempty"`
Checksum string `protobuf:"bytes,7,opt,name=checksum" json:"checksum,omitempty"`
DerefPath string `protobuf:"bytes,8,opt,name=deref_path,json=derefPath" json:"deref_path,omitempty"`
IsReadOnly bool `protobuf:"varint,9,opt,name=is_read_only,json=isReadOnly" json:"is_read_only,omitempty"`
Sys []byte `protobuf:"bytes,10,opt,name=sys,proto3" json:"sys,omitempty"`
// EOS filesytem extended metadata records
EosFile string `protobuf:"bytes,11,opt,name=eos_file,json=eosFile" json:"eos_file,omitempty"`
EosInstance string `protobuf:"bytes,12,opt,name=eos_instance,json=eosInstance" json:"eos_instance,omitempty"`
ShareTarget string `protobuf:"bytes,13,opt,name=share_target,json=shareTarget" json:"share_target,omitempty"`
// Migration extended metadata records
MigId string `protobuf:"bytes,14,opt,name=mig_id,json=migId" json:"mig_id,omitempty"`
MigPath string `protobuf:"bytes,15,opt,name=mig_path,json=migPath" json:"mig_path,omitempty"`
}
func (*Metadata) Descriptor ¶
func (*Metadata) GetChecksum ¶
func (*Metadata) GetDerefPath ¶
func (*Metadata) GetEosFile ¶
func (*Metadata) GetEosInstance ¶
func (*Metadata) GetIsReadOnly ¶
func (*Metadata) GetMigPath ¶
func (*Metadata) GetShareTarget ¶
func (*Metadata) ProtoMessage ¶
func (*Metadata) ProtoMessage()
type MetadataResponse ¶
type MetadataResponse struct {
Status StatusCode `protobuf:"varint,1,opt,name=status,enum=api.StatusCode" json:"status,omitempty"`
Metadata *Metadata `protobuf:"bytes,2,opt,name=metadata" json:"metadata,omitempty"`
}
func (*MetadataResponse) Descriptor ¶
func (*MetadataResponse) Descriptor() ([]byte, []int)
func (*MetadataResponse) GetMetadata ¶
func (m *MetadataResponse) GetMetadata() *Metadata
func (*MetadataResponse) GetStatus ¶
func (m *MetadataResponse) GetStatus() StatusCode
func (*MetadataResponse) ProtoMessage ¶
func (*MetadataResponse) ProtoMessage()
func (*MetadataResponse) Reset ¶
func (m *MetadataResponse) Reset()
func (*MetadataResponse) String ¶
func (m *MetadataResponse) String() string
type Mount ¶
type Mount interface {
Storage
GetMountPoint() string
GetMountPointId() string
GetMountOptions() *MountOptions
GetStorage() Storage
}
Mount contains the information about a mount. Similar to "struct mntent" in /usr/include/mntent.h. See also getent(8). A Mount exposes two mount points, one path based and another namespace based. A path-based mount point can be '/home', a namespaced mount-point can be 'home:1234'
type MountOptions ¶
type MountOptions struct {
ReadOnly bool
}
type MountTable ¶
type MountTable struct {
Mounts []*MountTableEntry `json:"mounts"`
}
type MountTableEntry ¶
type MountTableEntry struct {
MountPoint string `json:"mount_point"`
MountID string `json:"mount_id"`
MountOptions *MountOptions `json:"mount_options"`
StorageDriver string `json:"storage_driver"`
StorageOptions interface{} `json:"storage_options"`
StorageWrappers []*StorageWrapper `json:"storage_wrappers"`
}
type MoveReq ¶
type MoveReq struct {
OldPath string `protobuf:"bytes,1,opt,name=old_path,json=oldPath" json:"old_path,omitempty"`
NewPath string `protobuf:"bytes,2,opt,name=new_path,json=newPath" json:"new_path,omitempty"`
}
func (*MoveReq) Descriptor ¶
func (*MoveReq) GetNewPath ¶
func (*MoveReq) GetOldPath ¶
func (*MoveReq) ProtoMessage ¶
func (*MoveReq) ProtoMessage()
type NewFolderShareReq ¶
type NewFolderShareReq struct {
}
func (*NewFolderShareReq) Descriptor ¶
func (*NewFolderShareReq) Descriptor() ([]byte, []int)
func (*NewFolderShareReq) GetPath ¶
func (m *NewFolderShareReq) GetPath() string
func (*NewFolderShareReq) GetReadOnly ¶
func (m *NewFolderShareReq) GetReadOnly() bool
func (*NewFolderShareReq) GetRecipient ¶
func (m *NewFolderShareReq) GetRecipient() *ShareRecipient
func (*NewFolderShareReq) ProtoMessage ¶
func (*NewFolderShareReq) ProtoMessage()
func (*NewFolderShareReq) Reset ¶
func (m *NewFolderShareReq) Reset()
func (*NewFolderShareReq) String ¶
func (m *NewFolderShareReq) String() string
type NewLinkReq ¶
type NewLinkReq struct {
Path string `protobuf:"bytes,1,opt,name=path" json:"path,omitempty"`
ReadOnly bool `protobuf:"varint,2,opt,name=read_only,json=readOnly" json:"read_only,omitempty"`
Password string `protobuf:"bytes,3,opt,name=password" json:"password,omitempty"`
Expires uint64 `protobuf:"varint,4,opt,name=expires" json:"expires,omitempty"`
}
func (*NewLinkReq) Descriptor ¶
func (*NewLinkReq) Descriptor() ([]byte, []int)
func (*NewLinkReq) GetExpires ¶
func (m *NewLinkReq) GetExpires() uint64
func (*NewLinkReq) GetPassword ¶
func (m *NewLinkReq) GetPassword() string
func (*NewLinkReq) GetPath ¶
func (m *NewLinkReq) GetPath() string
func (*NewLinkReq) GetReadOnly ¶
func (m *NewLinkReq) GetReadOnly() bool
func (*NewLinkReq) ProtoMessage ¶
func (*NewLinkReq) ProtoMessage()
func (*NewLinkReq) Reset ¶
func (m *NewLinkReq) Reset()
func (*NewLinkReq) String ¶
func (m *NewLinkReq) String() string
type PathReq ¶
type PathReq struct {
Path string `protobuf:"bytes,1,opt,name=path" json:"path,omitempty"`
}
func (*PathReq) Descriptor ¶
func (*PathReq) ProtoMessage ¶
func (*PathReq) ProtoMessage()
type PreviewClient ¶
type PreviewClient interface {
ReadPreview(ctx context.Context, in *PathReq, opts ...grpc.CallOption) (Preview_ReadPreviewClient, error)
}
func NewPreviewClient ¶
func NewPreviewClient(cc *grpc.ClientConn) PreviewClient
type PreviewServer ¶
type PreviewServer interface {
ReadPreview(*PathReq, Preview_ReadPreviewServer) error
}
type Preview_ReadPreviewClient ¶
type Preview_ReadPreviewClient interface {
Recv() (*DataChunkResponse, error)
grpc.ClientStream
}
type Preview_ReadPreviewServer ¶
type Preview_ReadPreviewServer interface {
Send(*DataChunkResponse) error
grpc.ServerStream
}
type PublicLink ¶
type PublicLink struct {
Id string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"`
Token string `protobuf:"bytes,2,opt,name=token" json:"token,omitempty"`
Path string `protobuf:"bytes,3,opt,name=path" json:"path,omitempty"`
Protected bool `protobuf:"varint,4,opt,name=protected" json:"protected,omitempty"`
Expires uint64 `protobuf:"varint,5,opt,name=expires" json:"expires,omitempty"`
ReadOnly bool `protobuf:"varint,6,opt,name=read_only,json=readOnly" json:"read_only,omitempty"`
Mtime uint64 `protobuf:"varint,7,opt,name=mtime" json:"mtime,omitempty"`
ItemType PublicLink_ItemType `protobuf:"varint,8,opt,name=item_type,json=itemType,enum=api.PublicLink_ItemType" json:"item_type,omitempty"`
}
func (*PublicLink) Descriptor ¶
func (*PublicLink) Descriptor() ([]byte, []int)
func (*PublicLink) GetExpires ¶
func (m *PublicLink) GetExpires() uint64
func (*PublicLink) GetId ¶
func (m *PublicLink) GetId() string
func (*PublicLink) GetItemType ¶
func (m *PublicLink) GetItemType() PublicLink_ItemType
func (*PublicLink) GetMtime ¶
func (m *PublicLink) GetMtime() uint64
func (*PublicLink) GetPath ¶
func (m *PublicLink) GetPath() string
func (*PublicLink) GetProtected ¶
func (m *PublicLink) GetProtected() bool
func (*PublicLink) GetReadOnly ¶
func (m *PublicLink) GetReadOnly() bool
func (*PublicLink) GetToken ¶
func (m *PublicLink) GetToken() string
func (*PublicLink) ProtoMessage ¶
func (*PublicLink) ProtoMessage()
func (*PublicLink) Reset ¶
func (m *PublicLink) Reset()
func (*PublicLink) String ¶
func (m *PublicLink) String() string
type PublicLinkManager ¶
type PublicLinkManager interface {
CreatePublicLink(ctx context.Context, path string, opt *PublicLinkOptions) (*PublicLink, error)
UpdatePublicLink(ctx context.Context, id string, opt *PublicLinkOptions) (*PublicLink, error)
InspectPublicLink(ctx context.Context, id string) (*PublicLink, error)
ListPublicLinks(ctx context.Context) ([]*PublicLink, error)
RevokePublicLink(ctx context.Context, token string) error
}
type PublicLinkOptions ¶
type PublicLinkResponse ¶
type PublicLinkResponse struct {
Status StatusCode `protobuf:"varint,1,opt,name=status,enum=api.StatusCode" json:"status,omitempty"`
PublicLink *PublicLink `protobuf:"bytes,2,opt,name=publicLink" json:"publicLink,omitempty"`
}
func (*PublicLinkResponse) Descriptor ¶
func (*PublicLinkResponse) Descriptor() ([]byte, []int)
func (*PublicLinkResponse) GetPublicLink ¶
func (m *PublicLinkResponse) GetPublicLink() *PublicLink
func (*PublicLinkResponse) GetStatus ¶
func (m *PublicLinkResponse) GetStatus() StatusCode
func (*PublicLinkResponse) ProtoMessage ¶
func (*PublicLinkResponse) ProtoMessage()
func (*PublicLinkResponse) Reset ¶
func (m *PublicLinkResponse) Reset()
func (*PublicLinkResponse) String ¶
func (m *PublicLinkResponse) String() string
type PublicLink_ItemType ¶
type PublicLink_ItemType int32
const ( PublicLink_FILE PublicLink_ItemType = 0 PublicLink_FOLDER PublicLink_ItemType = 1 )
func (PublicLink_ItemType) EnumDescriptor ¶
func (PublicLink_ItemType) EnumDescriptor() ([]byte, []int)
func (PublicLink_ItemType) String ¶
func (x PublicLink_ItemType) String() string
type ReceivedShareReq ¶
type ReceivedShareReq struct {
}
func (*ReceivedShareReq) Descriptor ¶
func (*ReceivedShareReq) Descriptor() ([]byte, []int)
func (*ReceivedShareReq) GetShareId ¶
func (m *ReceivedShareReq) GetShareId() string
func (*ReceivedShareReq) ProtoMessage ¶
func (*ReceivedShareReq) ProtoMessage()
func (*ReceivedShareReq) Reset ¶
func (m *ReceivedShareReq) Reset()
func (*ReceivedShareReq) String ¶
func (m *ReceivedShareReq) String() string
type ReceivedShareResponse ¶
type ReceivedShareResponse struct {
}
func (*ReceivedShareResponse) Descriptor ¶
func (*ReceivedShareResponse) Descriptor() ([]byte, []int)
func (*ReceivedShareResponse) GetShare ¶
func (m *ReceivedShareResponse) GetShare() *FolderShare
func (*ReceivedShareResponse) GetStatus ¶
func (m *ReceivedShareResponse) GetStatus() StatusCode
func (*ReceivedShareResponse) ProtoMessage ¶
func (*ReceivedShareResponse) ProtoMessage()
func (*ReceivedShareResponse) Reset ¶
func (m *ReceivedShareResponse) Reset()
func (*ReceivedShareResponse) String ¶
func (m *ReceivedShareResponse) String() string
type RecycleEntry ¶
type RecycleEntry struct {
RestorePath string `protobuf:"bytes,1,opt,name=restore_path,json=restorePath" json:"restore_path,omitempty"`
RestoreKey string `protobuf:"bytes,2,opt,name=restore_key,json=restoreKey" json:"restore_key,omitempty"`
Size uint64 `protobuf:"varint,3,opt,name=size" json:"size,omitempty"`
DelMtime uint64 `protobuf:"varint,4,opt,name=del_mtime,json=delMtime" json:"del_mtime,omitempty"`
IsDir bool `protobuf:"varint,5,opt,name=is_dir,json=isDir" json:"is_dir,omitempty"`
}
func (*RecycleEntry) Descriptor ¶
func (*RecycleEntry) Descriptor() ([]byte, []int)
func (*RecycleEntry) GetDelMtime ¶
func (m *RecycleEntry) GetDelMtime() uint64
func (*RecycleEntry) GetIsDir ¶
func (m *RecycleEntry) GetIsDir() bool
func (*RecycleEntry) GetRestoreKey ¶
func (m *RecycleEntry) GetRestoreKey() string
func (*RecycleEntry) GetRestorePath ¶
func (m *RecycleEntry) GetRestorePath() string
func (*RecycleEntry) GetSize ¶
func (m *RecycleEntry) GetSize() uint64
func (*RecycleEntry) ProtoMessage ¶
func (*RecycleEntry) ProtoMessage()
func (*RecycleEntry) Reset ¶
func (m *RecycleEntry) Reset()
func (*RecycleEntry) String ¶
func (m *RecycleEntry) String() string
type RecycleEntryReq ¶
type RecycleEntryReq struct {
RestoreKey string `protobuf:"bytes,1,opt,name=restore_key,json=restoreKey" json:"restore_key,omitempty"`
}
func (*RecycleEntryReq) Descriptor ¶
func (*RecycleEntryReq) Descriptor() ([]byte, []int)
func (*RecycleEntryReq) GetRestoreKey ¶
func (m *RecycleEntryReq) GetRestoreKey() string
func (*RecycleEntryReq) ProtoMessage ¶
func (*RecycleEntryReq) ProtoMessage()
func (*RecycleEntryReq) Reset ¶
func (m *RecycleEntryReq) Reset()
func (*RecycleEntryReq) String ¶
func (m *RecycleEntryReq) String() string
type RecycleEntryResponse ¶
type RecycleEntryResponse struct {
Status StatusCode `protobuf:"varint,1,opt,name=status,enum=api.StatusCode" json:"status,omitempty"`
RecycleEntry *RecycleEntry `protobuf:"bytes,2,opt,name=recycleEntry" json:"recycleEntry,omitempty"`
}
func (*RecycleEntryResponse) Descriptor ¶
func (*RecycleEntryResponse) Descriptor() ([]byte, []int)
func (*RecycleEntryResponse) GetRecycleEntry ¶
func (m *RecycleEntryResponse) GetRecycleEntry() *RecycleEntry
func (*RecycleEntryResponse) GetStatus ¶
func (m *RecycleEntryResponse) GetStatus() StatusCode
func (*RecycleEntryResponse) ProtoMessage ¶
func (*RecycleEntryResponse) ProtoMessage()
func (*RecycleEntryResponse) Reset ¶
func (m *RecycleEntryResponse) Reset()
func (*RecycleEntryResponse) String ¶
func (m *RecycleEntryResponse) String() string
type Revision ¶
type Revision struct {
RevKey string `protobuf:"bytes,1,opt,name=rev_key,json=revKey" json:"rev_key,omitempty"`
Size uint64 `protobuf:"varint,2,opt,name=size" json:"size,omitempty"`
Mtime uint64 `protobuf:"varint,3,opt,name=mtime" json:"mtime,omitempty"`
IsDir bool `protobuf:"varint,4,opt,name=is_dir,json=isDir" json:"is_dir,omitempty"`
}
func (*Revision) Descriptor ¶
func (*Revision) ProtoMessage ¶
func (*Revision) ProtoMessage()
type RevisionReq ¶
type RevisionReq struct {
Path string `protobuf:"bytes,1,opt,name=path" json:"path,omitempty"`
RevKey string `protobuf:"bytes,2,opt,name=rev_key,json=revKey" json:"rev_key,omitempty"`
}
func (*RevisionReq) Descriptor ¶
func (*RevisionReq) Descriptor() ([]byte, []int)
func (*RevisionReq) GetPath ¶
func (m *RevisionReq) GetPath() string
func (*RevisionReq) GetRevKey ¶
func (m *RevisionReq) GetRevKey() string
func (*RevisionReq) ProtoMessage ¶
func (*RevisionReq) ProtoMessage()
func (*RevisionReq) Reset ¶
func (m *RevisionReq) Reset()
func (*RevisionReq) String ¶
func (m *RevisionReq) String() string
type RevisionResponse ¶
type RevisionResponse struct {
Status StatusCode `protobuf:"varint,1,opt,name=status,enum=api.StatusCode" json:"status,omitempty"`
Revision *Revision `protobuf:"bytes,2,opt,name=revision" json:"revision,omitempty"`
}
func (*RevisionResponse) Descriptor ¶
func (*RevisionResponse) Descriptor() ([]byte, []int)
func (*RevisionResponse) GetRevision ¶
func (m *RevisionResponse) GetRevision() *Revision
func (*RevisionResponse) GetStatus ¶
func (m *RevisionResponse) GetStatus() StatusCode
func (*RevisionResponse) ProtoMessage ¶
func (*RevisionResponse) ProtoMessage()
func (*RevisionResponse) Reset ¶
func (m *RevisionResponse) Reset()
func (*RevisionResponse) String ¶
func (m *RevisionResponse) String() string
type ShareClient ¶
type ShareClient interface {
}
func NewShareClient ¶
func NewShareClient(cc *grpc.ClientConn) ShareClient
type ShareIDReq ¶
type ShareIDReq struct {
}
func (*ShareIDReq) Descriptor ¶
func (*ShareIDReq) Descriptor() ([]byte, []int)
func (*ShareIDReq) GetId ¶
func (m *ShareIDReq) GetId() string
func (*ShareIDReq) ProtoMessage ¶
func (*ShareIDReq) ProtoMessage()
func (*ShareIDReq) Reset ¶
func (m *ShareIDReq) Reset()
func (*ShareIDReq) String ¶
func (m *ShareIDReq) String() string
type ShareManager ¶
type ShareManager interface {
}
type ShareRecipient ¶
type ShareRecipient struct {
}
func (*ShareRecipient) Descriptor ¶
func (*ShareRecipient) Descriptor() ([]byte, []int)
func (*ShareRecipient) GetIdentity ¶
func (m *ShareRecipient) GetIdentity() string
func (*ShareRecipient) GetType ¶
func (m *ShareRecipient) GetType() ShareRecipient_RecipientType
func (*ShareRecipient) ProtoMessage ¶
func (*ShareRecipient) ProtoMessage()
func (*ShareRecipient) Reset ¶
func (m *ShareRecipient) Reset()
func (*ShareRecipient) String ¶
func (m *ShareRecipient) String() string
type ShareRecipient_RecipientType ¶
type ShareRecipient_RecipientType int32
const ( )
func (ShareRecipient_RecipientType) EnumDescriptor ¶
func (ShareRecipient_RecipientType) EnumDescriptor() ([]byte, []int)
func (ShareRecipient_RecipientType) String ¶
func (x ShareRecipient_RecipientType) String() string
type ShareServer ¶
type ShareServer interface {
}
type Share_ListFolderSharesClient ¶
type Share_ListFolderSharesClient interface {
grpc.ClientStream
}
type Share_ListFolderSharesServer ¶
type Share_ListFolderSharesServer interface {
grpc.ServerStream
}
type Share_ListPublicLinksClient ¶
type Share_ListPublicLinksClient interface {
grpc.ClientStream
}
type Share_ListPublicLinksServer ¶
type Share_ListPublicLinksServer interface {
grpc.ServerStream
}
type Share_ListReceivedSharesClient ¶
type Share_ListReceivedSharesClient interface {
grpc.ClientStream
}
type Share_ListReceivedSharesServer ¶
type Share_ListReceivedSharesServer interface {
grpc.ServerStream
}
type StatusCode ¶
type StatusCode int32
const ( StatusCode_OK StatusCode = 0 StatusCode_UNKNOWN StatusCode = 1 StatusCode_STORAGE_NOT_FOUND StatusCode = 2 StatusCode_STORAGE_ALREADY_EXISTS StatusCode = 3 StatusCode_STORAGE_PERMISSIONDENIED StatusCode = 4 StatusCode_CONTEXT_USER_REQUIRED StatusCode = 5 StatusCode_PATH_INVALID StatusCode = 6 StatusCode_PUBLIC_LINK_NOT_FOUND StatusCode = 7 StatusCode_PUBLIC_LINK_INVALID_DATE StatusCode = 8 StatusCode_STORAGE_NOT_SUPPORTED StatusCode = 9 StatusCode_USER_NOT_FOUND StatusCode = 10 StatusCode_TOKEN_INVALID StatusCode = 11 StatusCode_FOLDER_SHARE_NOT_FOUND StatusCode = 12 )
func GetStatus ¶
func GetStatus(err error) StatusCode
func (StatusCode) EnumDescriptor ¶
func (StatusCode) EnumDescriptor() ([]byte, []int)
func (StatusCode) String ¶
func (x StatusCode) String() string
type Storage ¶
type Storage interface {
CreateDir(ctx context.Context, name string) error
Delete(ctx context.Context, name string) error
Move(ctx context.Context, oldName, newName string) error
GetMetadata(ctx context.Context, name string) (*Metadata, error)
ListFolder(ctx context.Context, name string) ([]*Metadata, error)
Upload(ctx context.Context, name string, r io.ReadCloser) error
Download(ctx context.Context, name string) (io.ReadCloser, error)
ListRevisions(ctx context.Context, path string) ([]*Revision, error)
DownloadRevision(ctx context.Context, path, revisionKey string) (io.ReadCloser, error)
RestoreRevision(ctx context.Context, path, revisionKey string) error
ListRecycle(ctx context.Context, path string) ([]*RecycleEntry, error)
RestoreRecycleEntry(ctx context.Context, restoreKey string) error
EmptyRecycle(ctx context.Context, path string) error
GetPathByID(ctx context.Context, id string) (string, error)
SetACL(ctx context.Context, path string, readOnly bool, recipient *ShareRecipient, shareList []*FolderShare) error
UnsetACL(ctx context.Context, path string, recipient *ShareRecipient, shareList []*FolderShare) error
UpdateACL(ctx context.Context, path string, readOnly bool, recipient *ShareRecipient, shareList []*FolderShare) error
}
type StorageClient ¶
type StorageClient interface {
CreateDir(ctx context.Context, in *PathReq, opts ...grpc.CallOption) (*EmptyResponse, error)
Delete(ctx context.Context, in *PathReq, opts ...grpc.CallOption) (*EmptyResponse, error)
Move(ctx context.Context, in *MoveReq, opts ...grpc.CallOption) (*EmptyResponse, error)
Inspect(ctx context.Context, in *PathReq, opts ...grpc.CallOption) (*MetadataResponse, error)
ListFolder(ctx context.Context, in *PathReq, opts ...grpc.CallOption) (Storage_ListFolderClient, error)
StartWriteTx(ctx context.Context, in *EmptyReq, opts ...grpc.CallOption) (*TxInfoResponse, error)
WriteChunk(ctx context.Context, opts ...grpc.CallOption) (Storage_WriteChunkClient, error)
FinishWriteTx(ctx context.Context, in *TxEnd, opts ...grpc.CallOption) (*EmptyResponse, error)
ReadFile(ctx context.Context, in *PathReq, opts ...grpc.CallOption) (Storage_ReadFileClient, error)
ListRevisions(ctx context.Context, in *PathReq, opts ...grpc.CallOption) (Storage_ListRevisionsClient, error)
ReadRevision(ctx context.Context, in *RevisionReq, opts ...grpc.CallOption) (Storage_ReadRevisionClient, error)
RestoreRevision(ctx context.Context, in *RevisionReq, opts ...grpc.CallOption) (*EmptyResponse, error)
ListRecycle(ctx context.Context, in *PathReq, opts ...grpc.CallOption) (Storage_ListRecycleClient, error)
RestoreRecycleEntry(ctx context.Context, in *RecycleEntryReq, opts ...grpc.CallOption) (*EmptyResponse, error)
EmptyRecycle(ctx context.Context, in *PathReq, opts ...grpc.CallOption) (*EmptyResponse, error)
SetACL(ctx context.Context, in *ACLReq, opts ...grpc.CallOption) (*EmptyResponse, error)
UpdateACL(ctx context.Context, in *ACLReq, opts ...grpc.CallOption) (*EmptyResponse, error)
UnsetACL(ctx context.Context, in *ACLReq, opts ...grpc.CallOption) (*EmptyResponse, error)
}
func NewStorageClient ¶
func NewStorageClient(cc *grpc.ClientConn) StorageClient
type StorageServer ¶
type StorageServer interface {
CreateDir(context.Context, *PathReq) (*EmptyResponse, error)
Delete(context.Context, *PathReq) (*EmptyResponse, error)
Move(context.Context, *MoveReq) (*EmptyResponse, error)
Inspect(context.Context, *PathReq) (*MetadataResponse, error)
ListFolder(*PathReq, Storage_ListFolderServer) error
StartWriteTx(context.Context, *EmptyReq) (*TxInfoResponse, error)
WriteChunk(Storage_WriteChunkServer) error
FinishWriteTx(context.Context, *TxEnd) (*EmptyResponse, error)
ReadFile(*PathReq, Storage_ReadFileServer) error
ListRevisions(*PathReq, Storage_ListRevisionsServer) error
ReadRevision(*RevisionReq, Storage_ReadRevisionServer) error
RestoreRevision(context.Context, *RevisionReq) (*EmptyResponse, error)
ListRecycle(*PathReq, Storage_ListRecycleServer) error
RestoreRecycleEntry(context.Context, *RecycleEntryReq) (*EmptyResponse, error)
EmptyRecycle(context.Context, *PathReq) (*EmptyResponse, error)
SetACL(context.Context, *ACLReq) (*EmptyResponse, error)
UpdateACL(context.Context, *ACLReq) (*EmptyResponse, error)
UnsetACL(context.Context, *ACLReq) (*EmptyResponse, error)
}
type StorageWrapper ¶
type Storage_ListFolderClient ¶
type Storage_ListFolderClient interface {
Recv() (*MetadataResponse, error)
grpc.ClientStream
}
type Storage_ListFolderServer ¶
type Storage_ListFolderServer interface {
Send(*MetadataResponse) error
grpc.ServerStream
}
type Storage_ListRecycleClient ¶
type Storage_ListRecycleClient interface {
Recv() (*RecycleEntryResponse, error)
grpc.ClientStream
}
type Storage_ListRecycleServer ¶
type Storage_ListRecycleServer interface {
Send(*RecycleEntryResponse) error
grpc.ServerStream
}
type Storage_ListRevisionsClient ¶
type Storage_ListRevisionsClient interface {
Recv() (*RevisionResponse, error)
grpc.ClientStream
}
type Storage_ListRevisionsServer ¶
type Storage_ListRevisionsServer interface {
Send(*RevisionResponse) error
grpc.ServerStream
}
type Storage_ReadFileClient ¶
type Storage_ReadFileClient interface {
Recv() (*DataChunkResponse, error)
grpc.ClientStream
}
type Storage_ReadFileServer ¶
type Storage_ReadFileServer interface {
Send(*DataChunkResponse) error
grpc.ServerStream
}
type Storage_ReadRevisionClient ¶
type Storage_ReadRevisionClient interface {
Recv() (*DataChunkResponse, error)
grpc.ClientStream
}
type Storage_ReadRevisionServer ¶
type Storage_ReadRevisionServer interface {
Send(*DataChunkResponse) error
grpc.ServerStream
}
type Storage_WriteChunkClient ¶
type Storage_WriteChunkClient interface {
Send(*TxChunk) error
CloseAndRecv() (*WriteSummaryResponse, error)
grpc.ClientStream
}
type Storage_WriteChunkServer ¶
type Storage_WriteChunkServer interface {
SendAndClose(*WriteSummaryResponse) error
Recv() (*TxChunk, error)
grpc.ServerStream
}
type Token ¶
type Token struct {
Token string `protobuf:"bytes,1,opt,name=token" json:"token,omitempty"`
}
func (*Token) Descriptor ¶
func (*Token) ProtoMessage ¶
func (*Token) ProtoMessage()
type TokenManager ¶
type TokenReq ¶
type TokenReq struct {
Token string `protobuf:"bytes,1,opt,name=token" json:"token,omitempty"`
}
func (*TokenReq) Descriptor ¶
func (*TokenReq) ProtoMessage ¶
func (*TokenReq) ProtoMessage()
type TokenResponse ¶
type TokenResponse struct {
Status StatusCode `protobuf:"varint,1,opt,name=status,enum=api.StatusCode" json:"status,omitempty"`
Token *Token `protobuf:"bytes,2,opt,name=token" json:"token,omitempty"`
}
func (*TokenResponse) Descriptor ¶
func (*TokenResponse) Descriptor() ([]byte, []int)
func (*TokenResponse) GetStatus ¶
func (m *TokenResponse) GetStatus() StatusCode
func (*TokenResponse) GetToken ¶
func (m *TokenResponse) GetToken() *Token
func (*TokenResponse) ProtoMessage ¶
func (*TokenResponse) ProtoMessage()
func (*TokenResponse) Reset ¶
func (m *TokenResponse) Reset()
func (*TokenResponse) String ¶
func (m *TokenResponse) String() string
type TxChunk ¶
type TxChunk struct {
TxId string `protobuf:"bytes,1,opt,name=tx_id,json=txId" json:"tx_id,omitempty"`
Length uint64 `protobuf:"varint,2,opt,name=length" json:"length,omitempty"`
Offset uint64 `protobuf:"varint,3,opt,name=offset" json:"offset,omitempty"`
Data []byte `protobuf:"bytes,4,opt,name=data,proto3" json:"data,omitempty"`
}
maybe add checksum data ?
func (*TxChunk) Descriptor ¶
func (*TxChunk) ProtoMessage ¶
func (*TxChunk) ProtoMessage()
type TxEnd ¶
type TxEnd struct {
TxId string `protobuf:"bytes,1,opt,name=tx_id,json=txId" json:"tx_id,omitempty"`
Path string `protobuf:"bytes,2,opt,name=path" json:"path,omitempty"`
Checksum string `protobuf:"bytes,3,opt,name=checksum" json:"checksum,omitempty"`
}
func (*TxEnd) Descriptor ¶
func (*TxEnd) GetChecksum ¶
func (*TxEnd) ProtoMessage ¶
func (*TxEnd) ProtoMessage()
type TxInfo ¶
type TxInfo struct {
TxId string `protobuf:"bytes,1,opt,name=tx_id,json=txId" json:"tx_id,omitempty"`
}
func (*TxInfo) Descriptor ¶
func (*TxInfo) ProtoMessage ¶
func (*TxInfo) ProtoMessage()
type TxInfoResponse ¶
type TxInfoResponse struct {
Status StatusCode `protobuf:"varint,1,opt,name=status,enum=api.StatusCode" json:"status,omitempty"`
TxInfo *TxInfo `protobuf:"bytes,2,opt,name=txInfo" json:"txInfo,omitempty"`
}
func (*TxInfoResponse) Descriptor ¶
func (*TxInfoResponse) Descriptor() ([]byte, []int)
func (*TxInfoResponse) GetStatus ¶
func (m *TxInfoResponse) GetStatus() StatusCode
func (*TxInfoResponse) GetTxInfo ¶
func (m *TxInfoResponse) GetTxInfo() *TxInfo
func (*TxInfoResponse) ProtoMessage ¶
func (*TxInfoResponse) ProtoMessage()
func (*TxInfoResponse) Reset ¶
func (m *TxInfoResponse) Reset()
func (*TxInfoResponse) String ¶
func (m *TxInfoResponse) String() string
type UnshareFolderReq ¶
type UnshareFolderReq struct {
}
func (*UnshareFolderReq) Descriptor ¶
func (*UnshareFolderReq) Descriptor() ([]byte, []int)
func (*UnshareFolderReq) GetId ¶
func (m *UnshareFolderReq) GetId() string
func (*UnshareFolderReq) ProtoMessage ¶
func (*UnshareFolderReq) ProtoMessage()
func (*UnshareFolderReq) Reset ¶
func (m *UnshareFolderReq) Reset()
func (*UnshareFolderReq) String ¶
func (m *UnshareFolderReq) String() string
type UpdateFolderShareReq ¶
type UpdateFolderShareReq struct {
}
func (*UpdateFolderShareReq) Descriptor ¶
func (*UpdateFolderShareReq) Descriptor() ([]byte, []int)
func (*UpdateFolderShareReq) GetId ¶
func (m *UpdateFolderShareReq) GetId() string
func (*UpdateFolderShareReq) GetReadOnly ¶
func (m *UpdateFolderShareReq) GetReadOnly() bool
func (*UpdateFolderShareReq) GetUpdateReadOnly ¶
func (m *UpdateFolderShareReq) GetUpdateReadOnly() bool
func (*UpdateFolderShareReq) ProtoMessage ¶
func (*UpdateFolderShareReq) ProtoMessage()
func (*UpdateFolderShareReq) Reset ¶
func (m *UpdateFolderShareReq) Reset()
func (*UpdateFolderShareReq) String ¶
func (m *UpdateFolderShareReq) String() string
type UpdateLinkReq ¶
type UpdateLinkReq struct {
Id string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"`
UpdatePassword bool `protobuf:"varint,2,opt,name=update_password,json=updatePassword" json:"update_password,omitempty"`
Password string `protobuf:"bytes,3,opt,name=password" json:"password,omitempty"`
UpdateExpiration bool `protobuf:"varint,4,opt,name=update_expiration,json=updateExpiration" json:"update_expiration,omitempty"`
Expiration uint64 `protobuf:"varint,5,opt,name=expiration" json:"expiration,omitempty"`
ReadOnly bool `protobuf:"varint,6,opt,name=read_only,json=readOnly" json:"read_only,omitempty"`
UpdateReadOnly bool `protobuf:"varint,7,opt,name=update_read_only,json=updateReadOnly" json:"update_read_only,omitempty"`
}
func (*UpdateLinkReq) Descriptor ¶
func (*UpdateLinkReq) Descriptor() ([]byte, []int)
func (*UpdateLinkReq) GetExpiration ¶
func (m *UpdateLinkReq) GetExpiration() uint64
func (*UpdateLinkReq) GetId ¶
func (m *UpdateLinkReq) GetId() string
func (*UpdateLinkReq) GetPassword ¶
func (m *UpdateLinkReq) GetPassword() string
func (*UpdateLinkReq) GetReadOnly ¶
func (m *UpdateLinkReq) GetReadOnly() bool
func (*UpdateLinkReq) GetUpdateExpiration ¶
func (m *UpdateLinkReq) GetUpdateExpiration() bool
func (*UpdateLinkReq) GetUpdatePassword ¶
func (m *UpdateLinkReq) GetUpdatePassword() bool
func (*UpdateLinkReq) GetUpdateReadOnly ¶
func (m *UpdateLinkReq) GetUpdateReadOnly() bool
func (*UpdateLinkReq) ProtoMessage ¶
func (*UpdateLinkReq) ProtoMessage()
func (*UpdateLinkReq) Reset ¶
func (m *UpdateLinkReq) Reset()
func (*UpdateLinkReq) String ¶
func (m *UpdateLinkReq) String() string
type User ¶
type User struct {
AccountId string `protobuf:"bytes,1,opt,name=account_id,json=accountId" json:"account_id,omitempty"`
Groups []string `protobuf:"bytes,2,rep,name=groups" json:"groups,omitempty"`
}
func (*User) Descriptor ¶
func (*User) GetAccountId ¶
func (*User) ProtoMessage ¶
func (*User) ProtoMessage()
type UserResponse ¶
type UserResponse struct {
Status StatusCode `protobuf:"varint,1,opt,name=status,enum=api.StatusCode" json:"status,omitempty"`
User *User `protobuf:"bytes,2,opt,name=user" json:"user,omitempty"`
}
func (*UserResponse) Descriptor ¶
func (*UserResponse) Descriptor() ([]byte, []int)
func (*UserResponse) GetStatus ¶
func (m *UserResponse) GetStatus() StatusCode
func (*UserResponse) GetUser ¶
func (m *UserResponse) GetUser() *User
func (*UserResponse) ProtoMessage ¶
func (*UserResponse) ProtoMessage()
func (*UserResponse) Reset ¶
func (m *UserResponse) Reset()
func (*UserResponse) String ¶
func (m *UserResponse) String() string
type VerifyTokenReq ¶
type VerifyTokenReq struct {
Token string `protobuf:"bytes,1,opt,name=token" json:"token,omitempty"`
}
func (*VerifyTokenReq) Descriptor ¶
func (*VerifyTokenReq) Descriptor() ([]byte, []int)
func (*VerifyTokenReq) GetToken ¶
func (m *VerifyTokenReq) GetToken() string
func (*VerifyTokenReq) ProtoMessage ¶
func (*VerifyTokenReq) ProtoMessage()
func (*VerifyTokenReq) Reset ¶
func (m *VerifyTokenReq) Reset()
func (*VerifyTokenReq) String ¶
func (m *VerifyTokenReq) String() string
type VirtualStorage ¶
type VirtualStorage interface {
AddMount(ctx context.Context, mount Mount) error
RemoveMount(ctx context.Context, mountPoint string) error
ListMounts(ctx context.Context) ([]Mount, error)
GetMount(path string) (Mount, error)
Storage
}
A VirtualStorage is similar to the Linux VFS (Virtual File Switch).
type WriteSummary ¶
type WriteSummary struct {
Nchunks uint64 `protobuf:"varint,1,opt,name=nchunks" json:"nchunks,omitempty"`
TotalSize uint64 `protobuf:"varint,2,opt,name=total_size,json=totalSize" json:"total_size,omitempty"`
}
func (*WriteSummary) Descriptor ¶
func (*WriteSummary) Descriptor() ([]byte, []int)
func (*WriteSummary) GetNchunks ¶
func (m *WriteSummary) GetNchunks() uint64
func (*WriteSummary) GetTotalSize ¶
func (m *WriteSummary) GetTotalSize() uint64
func (*WriteSummary) ProtoMessage ¶
func (*WriteSummary) ProtoMessage()
func (*WriteSummary) Reset ¶
func (m *WriteSummary) Reset()
func (*WriteSummary) String ¶
func (m *WriteSummary) String() string
type WriteSummaryResponse ¶
type WriteSummaryResponse struct {
Status StatusCode `protobuf:"varint,1,opt,name=status,enum=api.StatusCode" json:"status,omitempty"`
WriteSummary *WriteSummary `protobuf:"bytes,2,opt,name=writeSummary" json:"writeSummary,omitempty"`
}
func (*WriteSummaryResponse) Descriptor ¶
func (*WriteSummaryResponse) Descriptor() ([]byte, []int)
func (*WriteSummaryResponse) GetStatus ¶
func (m *WriteSummaryResponse) GetStatus() StatusCode
func (*WriteSummaryResponse) GetWriteSummary ¶
func (m *WriteSummaryResponse) GetWriteSummary() *WriteSummary
func (*WriteSummaryResponse) ProtoMessage ¶
func (*WriteSummaryResponse) ProtoMessage()
func (*WriteSummaryResponse) Reset ¶
func (m *WriteSummaryResponse) Reset()
func (*WriteSummaryResponse) String ¶
func (m *WriteSummaryResponse) String() string
Click to show internal directories.
Click to hide internal directories.