handler

package
v0.0.0-...-7a0ce36 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2020 License: MIT Imports: 18 Imported by: 0

Documentation

Index

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 (*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 DownloadHandler

type DownloadHandler struct{}

func (*DownloadHandler) CreateDownloadUrl

func (*DownloadHandler) GetImageThumbnail

func (*DownloadHandler) GetWeedDownloadUrl

type DownloadURL

type DownloadURL struct {
	Url      string
	Filename string
}

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) ValidateEntry

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) GetFolderInfo

func (*FolderHandler) RemoveFolder

func (*FolderHandler) UpdateFolder

Jump to

Keyboard shortcuts

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