service

package
v1.0.27 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2024 License: MIT Imports: 33 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EXPORT_STATUS_FAIL      = "FAIL"
	EXPORT_STATUS_PROGRESS  = "PROGRESS"
	EXPORT_STATUS_COMPLETED = "COMPLETED"
	EXPORT_STATUS_EXPIRED   = "EXPIRED"
)
View Source
const (
	STATUS_PROGRESS  = "PROGRESS"
	STATUS_COMPLETED = "COMPLETED"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Directory

type Directory struct {
	// contains filtered or unexported fields
}

func NewDirectory

func NewDirectory(
	conf *conf.Config,
	repo repository.Directory,
) *Directory

func (*Directory) CreateDirectory

func (u *Directory) CreateDirectory(ctx kratosx.Context, req *entity.Directory) (uint32, error)

CreateDirectory 创建文件目录信息

func (*Directory) DeleteDirectory

func (u *Directory) DeleteDirectory(ctx kratosx.Context, ids []uint32) (uint32, error)

DeleteDirectory 删除文件目录信息

func (*Directory) GetDirectory

func (u *Directory) GetDirectory(ctx kratosx.Context, id uint32) (*entity.Directory, error)

GetDirectory 获取指定的文件目录信息

func (*Directory) ListDirectory

func (u *Directory) ListDirectory(ctx kratosx.Context, req *types.ListDirectoryRequest) ([]*entity.Directory, uint32, error)

ListDirectory 获取文件目录信息列表树

func (*Directory) UpdateDirectory

func (u *Directory) UpdateDirectory(ctx kratosx.Context, req *entity.Directory) error

UpdateDirectory 更新文件目录信息

type Export

type Export struct {
	// contains filtered or unexported fields
}

func NewExport

func NewExport(
	conf *conf.Config,
	repo repository.Export,
	file repository.File,
	store repository.Store,
) *Export

func (*Export) DeleteExport

func (u *Export) DeleteExport(ctx kratosx.Context, ids []uint32) (uint32, error)

DeleteExport 删除导出信息

func (*Export) Download

func (s *Export) Download() thttp.HandlerFunc

func (*Export) ExportExcel

func (u *Export) ExportExcel(ctx kratosx.Context, req *types.ExportExcelRequest) (*types.ExportExcelReply, error)

ExportExcel 创建导出表格

func (*Export) ExportFile

func (u *Export) ExportFile(ctx kratosx.Context, req *types.ExportFileRequest) (*types.ExportFileReply, error)

ExportFile 创建导出表格

func (*Export) GetExport

func (u *Export) GetExport(ctx kratosx.Context, req *types.GetExportRequest) (*entity.Export, error)

GetExport 获取指定的导出信息

func (*Export) ListExport

func (u *Export) ListExport(ctx kratosx.Context, req *types.ListExportRequest) ([]*entity.Export, uint32, error)

ListExport 获取导出信息列表

func (*Export) LocalPath

func (s *Export) LocalPath(next http.Handler, src string) http.Handler

func (*Export) VerifyURL

func (u *Export) VerifyURL(key, expire, sign string) error

VerifyURL 验证url

type File

type File struct {
	// contains filtered or unexported fields
}

func NewFile

func NewFile(
	conf *conf.Config,
	repo repository.File,
	directory repository.Directory,
	store repository.Store,
) *File

func (*File) DeleteFile

func (u *File) DeleteFile(ctx kratosx.Context, ids []uint32) (uint32, error)

DeleteFile 删除文件信息

func (*File) GetFile

func (u *File) GetFile(ctx kratosx.Context, req *types.GetFileRequest) (*entity.File, error)

GetFile 获取指定的文件信息

func (*File) ListFile

func (u *File) ListFile(ctx kratosx.Context, req *types.ListFileRequest) ([]*entity.File, uint32, error)

ListFile 获取文件信息列表

func (*File) LocalPath

func (s *File) LocalPath(next http.Handler, src string) http.Handler

func (*File) PrepareUploadFile

PrepareUploadFile 预上传文件信息

func (*File) SrcBlob

func (s *File) SrcBlob() thttp.HandlerFunc

func (*File) UpdateFile

func (u *File) UpdateFile(ctx kratosx.Context, req *entity.File) error

UpdateFile 更新文件信息

func (*File) UploadFile

func (u *File) UploadFile(ctx kratosx.Context, req *types.UploadFileRequest) (*types.UploadFileReply, error)

UploadFile 上传文件信息

Jump to

Keyboard shortcuts

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