config

package
v0.0.0-...-6cb0f0b Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2024 License: GPL-3.0 Imports: 0 Imported by: 0

Documentation

Overview

Package config provide the configurations to run this app.

Index

Constants

View Source
const (
	// DefaultPathToDatabase defines the path to the sqlite storage file.
	DefaultPathToDatabase = "./storage"

	// DefaultPathToSchemaScripts defines the path to the scripts managing the database structure.
	// nolint: godox
	DefaultPathToSchemaScripts = "./scripts/sql/sqlite" // TODO: change that it works with other dialects like postgres
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Database

type Database struct {
	StoragePath       *string `json:"storage_path"`
	SchemaScriptsPath *string `json:"schema_scripts_path"`
}

Database provides the configuration for the database.

func (*Database) GetSchemaScriptPath

func (d *Database) GetSchemaScriptPath() string

GetSchemaScriptPath returns the path to the schema script files managing the database structure.

func (*Database) GetStoragePath

func (d *Database) GetStoragePath() string

GetStoragePath returns the path to the storage file.

func (*Database) Merge

func (d *Database) Merge(cfg *Database)

Merge overwrites the values given by the config from parameter if they differ from default values.

Jump to

Keyboard shortcuts

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