assets

package
v0.10.1 Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package to control static assets, e.g. databases, schema migrations sql files .etc.

This package also control some core constants, includes:

  • default file location of database file.
  • database schema version
  • database type
  • default backup location of database file

Index

Constants

View Source
const BackupDir = "backup"

Default backup directory to stored backup database. Inside RootDir.

View Source
const DatabaseFile = "storage.db"

Database filename.

View Source
const DatabaseType = "sqlite3"

Database type.

View Source
const RootDir = "comicInfo-parser"

Root Directory to storing all config files.

Variables

This section is empty.

Functions

func Config

func Config() *config.ProgramConfig

Load config from yaml file. If any error occur in loading, then a default config will be returned, and no error return.

func DefaultDb

func DefaultDb(path string) *lazydb.LazyDB

Return default lazydb.

func DefaultDbWithBackup

func DefaultDbWithBackup(path string, backupDir string) *lazydb.LazyDB

Return default lazydb that allow auto-backup when schema version changed.

func GetSchema

func GetSchema() embed.FS

Get embedded schema from filesystem. Used for database schema migrations.

Types

This section is empty.

Jump to

Keyboard shortcuts

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