Documentation
¶
Index ¶
- type BaseModel
- type CreateModel
- type DeleteModel
- type Directory
- func (u *Directory) AllByParentID(ctx kratosx.Context, app string, id uint32) ([]*Directory, error)
- func (u *Directory) Create(ctx kratosx.Context) error
- func (u *Directory) DeleteByID(ctx kratosx.Context, id uint32) error
- func (u *Directory) OneByID(ctx kratosx.Context, id uint32) error
- func (u *Directory) OneByName(ctx kratosx.Context, id uint32, name string) error
- func (u *Directory) OneByPaths(ctx kratosx.Context, app string, paths []string) error
- func (u *Directory) Update(ctx kratosx.Context) error
- type File
- func (f *File) AllByDirectoryID(ctx kratosx.Context, id uint32) ([]*File, error)
- func (f *File) Copy(ctx kratosx.Context, dir uint32, key string) error
- func (f *File) CountByDirectoryID(ctx kratosx.Context, id uint32) (int64, error)
- func (f *File) CountByName(ctx kratosx.Context, name string) (int64, error)
- func (f *File) Create(ctx kratosx.Context) error
- func (f *File) DeleteByDirAndIds(ctx kratosx.Context, did uint32, ids []uint32) error
- func (f *File) OneByDirAndName(ctx kratosx.Context, id uint32, name string) error
- func (f *File) OneByID(ctx kratosx.Context, id uint32) error
- func (f *File) OneBySha(ctx kratosx.Context, sha string) error
- func (f *File) OneByUploadID(ctx kratosx.Context, ui string) error
- func (f *File) Page(ctx kratosx.Context, options *PageOptions) ([]*File, uint32, error)
- func (f *File) Update(ctx kratosx.Context) error
- type PageOptions
- type Scopes
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CreateModel ¶
type DeleteModel ¶
type Directory ¶
type Directory struct {
BaseModel
ParentID uint32 `json:"parent_id"`
Name string `json:"name"`
App string `json:"app"`
}
func (*Directory) AllByParentID ¶
AllByParentID 通过id查询目录信息
func (*Directory) DeleteByID ¶
DeleteByID 通过id删除目录信息
func (*Directory) OneByPaths ¶
OneByPaths 获取目录信息
type File ¶
type File struct {
BaseModel
DirectoryID uint32 `json:"directory_id"`
Name string `json:"name"`
Type string `json:"type"`
Size uint32 `json:"size"`
Sha string `json:"sha"`
Src string `json:"src"`
UploadID string `json:"upload_id"`
ChunkCount uint32 `json:"chunk_count"`
Storage string `json:"storage"`
Status string `json:"status"`
}
func (*File) AllByDirectoryID ¶
AllByDirectoryID 通过id查询文件信息
func (*File) CountByDirectoryID ¶
CountByDirectoryID 通过id查询文件数量
func (*File) CountByName ¶
CountByName 通过name查询文件数量
func (*File) DeleteByDirAndIds ¶
DeleteByDirAndIds 通过id数组删除文件信息
func (*File) OneByDirAndName ¶
OneByDirAndName 通过id查询文件信息
func (*File) OneByUploadID ¶
OneByUploadID 通过upload_id查询文件信息
type PageOptions ¶
Click to show internal directories.
Click to hide internal directories.