Documentation ¶
Index ¶
- Constants
- type BottleHandler
- func (b *BottleHandler) GetBottleMetadata(ctx context.Context, req *pb.GetBottleMetadataRequest, ...) error
- func (b *BottleHandler) InitBottle(ctx context.Context, req *pb.InitBottleRequest, resp *pb.InitBottleResponse) error
- func (b *BottleHandler) UpdateBottle(ctx context.Context, req *pb.UpdateBottleRequest, ...) error
- type BottleServiceHandler
- type DownloadHandler
- func (*DownloadHandler) CreateDownloadUrl(ctx context.Context, req *pb.CreateDownloadUrlRequest, ...) error
- func (*DownloadHandler) GetImageThumbnail(ctx context.Context, req *pb.GetImageThumbnailRequest, ...) error
- func (*DownloadHandler) GetWeedDownloadUrl(ctx context.Context, req *pb.GetWeedDownloadUrlRequest, ...) error
- type DownloadURL
- type EntryHandler
- type FileHandler
- func (f *FileHandler) CreateFile(ctx context.Context, req *pb.CreateFileRequest, resp *pb.CreateFileResponse) error
- func (f *FileHandler) CreateFileMeta(ctx context.Context, req *pb.CreateFileMetaRequest, ...) error
- func (f *FileHandler) GetFileByMeta(ctx context.Context, req *pb.GetFileByMetaRequest, ...) error
- func (f *FileHandler) GetFileInfo(ctx context.Context, req *pb.GetFileInfoRequest, resp *pb.GetFileInfoResponse) error
- func (f *FileHandler) GetFileMeta(ctx context.Context, req *pb.GetFileMetaRequest, resp *pb.GetFileMetaResponse) error
- func (f *FileHandler) RemoveFile(ctx context.Context, req *pb.RemoveFileRequest, resp *pb.RemoveFileResponse) error
- func (f *FileHandler) UpdateFile(ctx context.Context, req *pb.UpdateFileRequest, resp *pb.UpdateFileResponse) error
- type FolderHandler
- func (*FolderHandler) CreateFolder(ctx context.Context, req *pb.CreateFolderRequest, ...) error
- func (*FolderHandler) GetFolderInfo(ctx context.Context, req *pb.GetFolderInfoRequest, ...) error
- func (*FolderHandler) RemoveFolder(ctx context.Context, req *pb.RemoveFolderRequest, ...) error
- func (*FolderHandler) UpdateFolder(ctx context.Context, req *pb.UpdateFolderRequest, ...) error
Constants ¶
View Source
const DownloadTokenCache = "download:user_id=%d;file_id=%d"
View Source
const DownloadTokenKey = "download:token=%s;user_id=%d"
View Source
const FolderLockKey = "lock:parent_id=%d"
use for folder name unique
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BottleHandler ¶
type BottleHandler struct{}
func (*BottleHandler) GetBottleMetadata ¶
func (b *BottleHandler) GetBottleMetadata(ctx context.Context, req *pb.GetBottleMetadataRequest, resp *pb.GetBottleMetadataResponse) error
func (*BottleHandler) InitBottle ¶
func (b *BottleHandler) InitBottle(ctx context.Context, req *pb.InitBottleRequest, resp *pb.InitBottleResponse) error
func (*BottleHandler) UpdateBottle ¶
func (b *BottleHandler) UpdateBottle(ctx context.Context, req *pb.UpdateBottleRequest, resp *pb.UpdateBottleResponse) error
type BottleServiceHandler ¶
type BottleServiceHandler struct { BottleHandler FolderHandler FileHandler DownloadHandler EntryHandler }
type DownloadHandler ¶
type DownloadHandler struct{}
func (*DownloadHandler) CreateDownloadUrl ¶
func (*DownloadHandler) CreateDownloadUrl(ctx context.Context, req *pb.CreateDownloadUrlRequest, resp *pb.CreateDownloadUrlResponse) error
func (*DownloadHandler) GetImageThumbnail ¶
func (*DownloadHandler) GetImageThumbnail(ctx context.Context, req *pb.GetImageThumbnailRequest, resp *pb.GetImageThumbnailResponse) error
func (*DownloadHandler) GetWeedDownloadUrl ¶
func (*DownloadHandler) GetWeedDownloadUrl(ctx context.Context, req *pb.GetWeedDownloadUrlRequest, resp *pb.GetWeedDownloadUrlResponse) error
type DownloadURL ¶
func (*DownloadURL) Marshal ¶
func (d *DownloadURL) Marshal() ([]byte, error)
func (*DownloadURL) Unmarshal ¶
func (d *DownloadURL) Unmarshal(b []byte) error
type EntryHandler ¶
type EntryHandler struct{}
func (*EntryHandler) GetEntryParents ¶
func (*EntryHandler) GetEntryParents(ctx context.Context, req *pb.GetEntryParentsRequest, resp *pb.GetEntryParentsResponse) error
func (*EntryHandler) ValidateEntry ¶
func (*EntryHandler) ValidateEntry(ctx context.Context, req *pb.ValidateEntryRequest, resp *pb.ValidateEntryResponse) error
type FileHandler ¶
type FileHandler struct{}
func (*FileHandler) CreateFile ¶
func (f *FileHandler) CreateFile(ctx context.Context, req *pb.CreateFileRequest, resp *pb.CreateFileResponse) error
func (*FileHandler) CreateFileMeta ¶
func (f *FileHandler) CreateFileMeta(ctx context.Context, req *pb.CreateFileMetaRequest, resp *pb.CreateFileMetaResponse) error
func (*FileHandler) GetFileByMeta ¶
func (f *FileHandler) GetFileByMeta(ctx context.Context, req *pb.GetFileByMetaRequest, resp *pb.GetFileByMetaResponse) error
return id=0 when file not found, this rpc just for upload check
func (*FileHandler) GetFileInfo ¶
func (f *FileHandler) GetFileInfo(ctx context.Context, req *pb.GetFileInfoRequest, resp *pb.GetFileInfoResponse) error
func (*FileHandler) GetFileMeta ¶
func (f *FileHandler) GetFileMeta(ctx context.Context, req *pb.GetFileMetaRequest, resp *pb.GetFileMetaResponse) error
return id=0 when meta not found, this rpc just for upload check
func (*FileHandler) RemoveFile ¶
func (f *FileHandler) RemoveFile(ctx context.Context, req *pb.RemoveFileRequest, resp *pb.RemoveFileResponse) error
func (*FileHandler) UpdateFile ¶
func (f *FileHandler) UpdateFile(ctx context.Context, req *pb.UpdateFileRequest, resp *pb.UpdateFileResponse) error
type FolderHandler ¶
type FolderHandler struct{}
func (*FolderHandler) CreateFolder ¶
func (*FolderHandler) CreateFolder(ctx context.Context, req *pb.CreateFolderRequest, resp *pb.CreateFolderResponse) error
func (*FolderHandler) GetFolderInfo ¶
func (*FolderHandler) GetFolderInfo(ctx context.Context, req *pb.GetFolderInfoRequest, resp *pb.GetFolderInfoResponse) error
func (*FolderHandler) RemoveFolder ¶
func (*FolderHandler) RemoveFolder(ctx context.Context, req *pb.RemoveFolderRequest, resp *pb.RemoveFolderResponse) error
func (*FolderHandler) UpdateFolder ¶
func (*FolderHandler) UpdateFolder(ctx context.Context, req *pb.UpdateFolderRequest, resp *pb.UpdateFolderResponse) error
Click to show internal directories.
Click to hide internal directories.