file_record

package
v1.7.1 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2025 License: Apache-2.0 Imports: 16 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FileRecordRepo

type FileRecordRepo interface {
	AddFileRecord(ctx context.Context, fileRecord *entity.FileRecord) (err error)
	UpdateFileRecord(ctx context.Context, fileRecord *entity.FileRecord) (err error)
	GetFileRecordPage(ctx context.Context, page, pageSize int, cond *entity.FileRecord) (
		fileRecordList []*entity.FileRecord, total int64, err error)
	DeleteFileRecord(ctx context.Context, id int) (err error)
	GetFileRecordByURL(ctx context.Context, fileURL string) (record *entity.FileRecord, err error)
}

FileRecordRepo file record repository

type FileRecordService

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

FileRecordService file record service

func NewFileRecordService

func NewFileRecordService(
	fileRecordRepo FileRecordRepo,
	revisionRepo revision.RevisionRepo,
	serviceConfig *service_config.ServiceConfig,
	siteInfoService siteinfo_common.SiteInfoCommonService,
	userService *usercommon.UserCommon,
) *FileRecordService

NewFileRecordService new file record service

func (*FileRecordService) AddFileRecord

func (fs *FileRecordService) AddFileRecord(ctx context.Context, userID, filePath, fileURL, source string)

AddFileRecord add file record

func (*FileRecordService) CleanOrphanUploadFiles

func (fs *FileRecordService) CleanOrphanUploadFiles(ctx context.Context)

CleanOrphanUploadFiles clean orphan upload files

func (*FileRecordService) DeleteAndMoveFileRecord added in v1.5.1

func (fs *FileRecordService) DeleteAndMoveFileRecord(ctx context.Context, fileRecord *entity.FileRecord) error

func (*FileRecordService) GetFileRecordByURL added in v1.5.1

func (fs *FileRecordService) GetFileRecordByURL(ctx context.Context, fileURL string) (record *entity.FileRecord, err error)

func (*FileRecordService) PurgeDeletedFiles

func (fs *FileRecordService) PurgeDeletedFiles(ctx context.Context)

Jump to

Keyboard shortcuts

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