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

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