sqlite

package
v0.2.4 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	// Path is the path to the SQLite database file.
	Path string `envconfig:"DBX_SQLITE_PATH"`
}

Config represents configuration for PostgreSQL connection.

func FromContext

func FromContext(ctx context.Context) *Config

FromContext will return the Config carried in the provided Context.

It panics if config is not available on the current context.

func NewConfig

func NewConfig(path string) *Config

NewConfig returns a new Config instance.

func (*Config) Context

func (cfg *Config) Context(ctx context.Context) context.Context

Context returns a new Context that carries the provided Config.

func (*Config) Dir

func (c *Config) Dir() (string, error)

Dir returns the directory of the SQLite database file.

func (*Config) Mkdir

func (c *Config) Mkdir() error

Mkdir creates the directory for the SQLite database file.

Jump to

Keyboard shortcuts

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