db

package
v1.0.12 Latest Latest
Warning

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

Go to latest
Published: May 13, 2024 License: AGPL-3.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Handle *gorm.DB
)

Functions

func Initialize

func Initialize(driver, dsn, customTLSConfig string, dbDebug bool) error

Initialize initializes the database engine

func ScheduleCleanup

func ScheduleCleanup()

ScheduleCleanup tries to periodically remove unreferenced folders

Types

type File

type File struct {
	ID           int64 `gorm:"primarykey"`
	Name         string
	LastModified int64
	FolderID     int64
	Folder       Folder // foreign key
}

func (*File) TableName

func (*File) TableName() string

type Folder

type Folder struct {
	ID        int64 `gorm:"primarykey"`
	Path      string
	StorageID string
}

func (*Folder) TableName

func (*Folder) TableName() string

type Metadater

type Metadater struct{}

func (*Metadater) GetFolders

func (m *Metadater) GetFolders(storageID string, limit int, from string) ([]string, error)

func (*Metadater) GetModificationTime

func (m *Metadater) GetModificationTime(storageID, objectPath string) (int64, error)

func (*Metadater) GetModificationTimes

func (m *Metadater) GetModificationTimes(storageID, objectPath string) (map[string]int64, error)

func (*Metadater) RemoveMetadata

func (m *Metadater) RemoveMetadata(storageID, objectPath string) error

func (*Metadater) SetModificationTime

func (m *Metadater) SetModificationTime(storageID, objectPath string, mTime int64) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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