b_file_chunk.go 812 B

12345678910111213141516171819202122
  1. package bll
  2. import (
  3. "context"
  4. "gxt-file-server/app/schema"
  5. )
  6. // IFileChunk demo业务逻辑接口
  7. type IFileChunk interface {
  8. // Query 查询数据
  9. Query(ctx context.Context, params schema.FileChunkQueryParam, opts ...schema.FileChunkQueryOptions) (*schema.FileChunkQueryResult, error)
  10. // Get 查询指定数据
  11. Get(ctx context.Context, recordID string, opts ...schema.FileChunkQueryOptions) (*schema.FileChunk, error)
  12. // Create 创建数据
  13. Create(ctx context.Context, item schema.FileChunk) (*schema.FileChunk, error)
  14. // Update 更新数据
  15. Update(ctx context.Context, recordID string, item schema.FileChunk) (*schema.FileChunk, error)
  16. // Delete 删除数据
  17. Delete(ctx context.Context, recordID string) error
  18. //ClearChunks 清理过期的文件分块
  19. ClearChunks(ctx context.Context) error
  20. }