dao

package
v0.0.0-...-23f538b Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type File

type File struct {
	Id         string
	Key        string
	Path       string
	Name       string
	Suffix     string
	Size       int64
	ShardIndex int32
	ShardSize  int32
	ShardTotal int32
	CreateAt   time.Time
	UpdateAt   time.Time
}

func (File) TableName

func (File) TableName() string

type FileDao

type FileDao struct {
}

func (*FileDao) DeleteByProperty

func (f *FileDao) DeleteByProperty(property, value string)

DeleteById: 删除文件记录

func (*FileDao) Save

func (f *FileDao) Save(in *dto.FileDto) *public.BusinessException

Save: 新增/更新文件记录

func (*FileDao) SaveNew

func (f *FileDao) SaveNew(in *dto.FileDto) *public.BusinessException

Save: 新增文件记录

func (*FileDao) SelectByProperty

func (f *FileDao) SelectByProperty(prop string, value interface{}) *File

SelectByProperty: 通过一个属性查询

type FileShard

type FileShard struct {
	Id    int32
	Key   string
	Index int32
	Size  int32
	Total int32
}

func (FileShard) TableName

func (FileShard) TableName() string

type FileShardDao

type FileShardDao struct {
}

func (*FileShardDao) DeleteByKey

func (f *FileShardDao) DeleteByKey(key string)

DeleteByKey: 上传完成后删除分片记录

func (*FileShardDao) GetUploadedShards

func (f *FileShardDao) GetUploadedShards(key string) []int32

GetUploadedShards: 获取传入文件的所有已上传分片索引

func (*FileShardDao) Save

Save: 保存文件分片记录

Jump to

Keyboard shortcuts

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