db

package
v0.23.0 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2026 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DB

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

func Open

func Open() (*DB, error)

func (*DB) AddScanDir

func (d *DB) AddScanDir(path string) error

func (*DB) Close

func (d *DB) Close()

func (*DB) CreateInferenceEngine

func (d *DB) CreateInferenceEngine(e model.InferenceEngine) error

func (*DB) DeleteInferenceEngine

func (d *DB) DeleteInferenceEngine(id string) (err error)

func (*DB) DeleteProfile

func (d *DB) DeleteProfile(id int64) error

func (*DB) GetInferenceEngineByID

func (d *DB) GetInferenceEngineByID(id string) (model.InferenceEngine, error)

func (*DB) GetProfile

func (d *DB) GetProfile(id int64) (model.Profile, error)

func (*DB) GetSetting

func (d *DB) GetSetting(key string) (string, error)

func (*DB) ListAllProfiles

func (d *DB) ListAllProfiles() ([]ProfileEntry, error)

func (*DB) ListInferenceEngines

func (d *DB) ListInferenceEngines() ([]model.InferenceEngine, error)

func (*DB) ListModels

func (d *DB) ListModels() ([]model.ModelEntry, error)

func (*DB) ListProfiles

func (d *DB) ListProfiles(modelID int64) ([]model.Profile, error)

func (*DB) ListRecentModels

func (d *DB) ListRecentModels(limit int) ([]model.ModelEntry, error)

func (*DB) ListRecents

func (d *DB) ListRecents(limit int) ([]RecentEntry, error)

func (*DB) ListScanDirs

func (d *DB) ListScanDirs() ([]string, error)

func (*DB) MarkModelUsed

func (d *DB) MarkModelUsed(id int64) error

func (*DB) MarkRecent

func (d *DB) MarkRecent(modelID, profileID int64) error

func (*DB) RemoveScanDir

func (d *DB) RemoveScanDir(path string) (err error)

func (*DB) SetSetting

func (d *DB) SetSetting(key, value string) error

func (*DB) Sync

func (d *DB) Sync(scanned []model.ModelEntry) (int, int, error)

func (*DB) SyncPerRoot

func (d *DB) SyncPerRoot(scannedByRoot map[string][]model.ModelEntry) (int, int, error)

func (*DB) UpdateInferenceEngineName

func (d *DB) UpdateInferenceEngineName(id, name string) error

func (*DB) UpdateInferenceEnginePath

func (d *DB) UpdateInferenceEnginePath(id, path string) error

func (*DB) UpsertModel

func (d *DB) UpsertModel(m *model.ModelEntry) error

func (*DB) UpsertProfile

func (d *DB) UpsertProfile(p *model.Profile) error

type ProfileEntry

type ProfileEntry struct {
	Model           model.ModelEntry
	InferenceEngine model.InferenceEngine
	Profile         model.Profile
	DraftModelName  string
}

type RecentEntry

type RecentEntry struct {
	Model           model.ModelEntry
	InferenceEngine model.InferenceEngine
	Profile         model.Profile
	DraftModelName  string
}

Jump to

Keyboard shortcuts

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