filerepo

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2024 License: GPL-3.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 GetTableNameFunc

type GetTableNameFunc func(f *models.File) string

GetTableNameFunc is a function that returns the table name for a file

type PersistRepository

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

func New

func New() *PersistRepository

func (*PersistRepository) Add

func (r *PersistRepository) Add(ctx context.Context, tx *gorm.DB, file *models.File, method GetTableNameFunc) error

func (*PersistRepository) GetTx

func (r *PersistRepository) GetTx() *gorm.DB

func (*PersistRepository) Load

func (r *PersistRepository) Load(ctx context.Context, file *models.File, method GetTableNameFunc) error

func (*PersistRepository) LoadByHash

func (r *PersistRepository) LoadByHash(ctx context.Context, file *models.File, method GetTableNameFunc) error

func (*PersistRepository) LoadUploaded

func (r *PersistRepository) LoadUploaded(ctx context.Context, file *models.File, method GetTableNameFunc) error

func (*PersistRepository) Remove

func (r *PersistRepository) Remove(ctx context.Context, tx *gorm.DB, file *models.File, method GetTableNameFunc) error

func (*PersistRepository) Update

func (r *PersistRepository) Update(ctx context.Context, tx *gorm.DB, file *models.File, method GetTableNameFunc) error

Jump to

Keyboard shortcuts

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