handler

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2023 License: MIT Imports: 7 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

type Handler struct {
	v1.UnimplementedServiceServer
	// contains filtered or unexported fields
}

Handler is a file service handler.

func New

func New(conf *config.Config) *Handler

func (*Handler) AddDirectory

func (h *Handler) AddDirectory(ctx context.Context, in *v1.AddDirectoryRequest) (*v1.Directory, error)

AddDirectory 添加目录

func (*Handler) DeleteDirectory

func (h *Handler) DeleteDirectory(ctx context.Context, in *v1.DeleteDirectoryRequest) (*empty.Empty, error)

DeleteDirectory 删除目录

func (*Handler) DeleteFile

func (h *Handler) DeleteFile(ctx context.Context, in *v1.DeleteFileRequest) (*empty.Empty, error)

DeleteFile 删除文件

func (*Handler) GetDirectory

func (h *Handler) GetDirectory(ctx context.Context, in *v1.GetDirectoryRequest) (*v1.GetDirectoryReply, error)

GetDirectory 获取目录

func (*Handler) GetFile

GetFile 获取文件

func (*Handler) GetFileBySha added in v1.0.1

func (h *Handler) GetFileBySha(ctx context.Context, in *v1.GetFileByShaRequest) (*v1.File, error)

GetFileBySha 文件查询

func (*Handler) PageFile

func (h *Handler) PageFile(ctx context.Context, in *v1.PageFileRequest) (*v1.PageFileReply, error)

PageFile 文件分野查询

func (*Handler) PrepareUploadFile

func (h *Handler) PrepareUploadFile(ctx context.Context, in *v1.PrepareUploadFileRequest) (*v1.PrepareUploadFileReply, error)

PrepareUploadFile 文件预上传

func (*Handler) UpdateDirectory

func (h *Handler) UpdateDirectory(ctx context.Context, in *v1.UpdateDirectoryRequest) (*empty.Empty, error)

UpdateDirectory 更新目录

func (*Handler) UpdateFile

func (h *Handler) UpdateFile(ctx context.Context, in *v1.UpdateFileRequest) (*empty.Empty, error)

UpdateFile 修改文件

func (*Handler) UploadFile

func (h *Handler) UploadFile(ctx context.Context, in *v1.UploadFileRequest) (*v1.UploadFileReply, error)

UploadFile 文件上传

Jump to

Keyboard shortcuts

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