initialize

package
v4.1.8 Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2025 License: AGPL-3.0 Imports: 38 Imported by: 0

Documentation

Overview

Package initialize handles the initialization of OpenList's configuration and components

Package initialize handles the initialization of OpenList's components

Index

Constants

View Source
const (
	// DefaultConfigFileName is the name of the configuration file
	DefaultConfigFileName = "config.json"

	// DefaultFileMode defines the permission for created files
	DefaultFileMode = 0o644

	// DefaultDirMode defines the permission for created directories
	DefaultDirMode = 0o755
)
View Source
const (
	// SQLiteMemoryDSN is the DSN for in-memory SQLite database with shared cache
	SQLiteMemoryDSN = "file::memory:?cache=shared"

	// SQLiteJournalMode sets the journal mode for SQLite databases
	SQLiteJournalMode = "WAL"

	// SQLiteVacuumMode sets the vacuum mode for SQLite databases
	SQLiteVacuumMode = "incremental"

	// DefaultTimeZone is the default timezone for database connections
	DefaultTimeZone = "Asia/Shanghai"
)

Variables

View Source
var LastLaunchedVersion string

LastLaunchedVersion stores the version from the last launch

Functions

func CleanTempDir

func CleanTempDir()

CleanTempDir removes all files from the temporary directory

func InitApp

func InitApp(server ...bool)

func InitConfig

func InitConfig()

InitConfig initializes the application configuration It loads configuration from file or creates a default one if not exists, applies environment variables, and initializes related components

func InitialSettings

func InitialSettings() []model.SettingItem

func InitialTasks

func InitialTasks() []model.TaskItem

Types

This section is empty.

Jump to

Keyboard shortcuts

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