db

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2024 License: AGPL-3.0, AGPL-3.0-or-later Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RunMigrations

func RunMigrations(cfg Config) error

RunMigrations will execute pending migrations if needed to keep the database updated with the latest changes

Types

type Config

type Config struct {
	// Database type
	Database string `mapstructure:"Database"`

	// Database name
	Name string `mapstructure:"Name"`

	// User name
	User string `mapstructure:"User"`

	// Password of the user
	Password string `mapstructure:"Password"`

	// Host address
	Host string `mapstructure:"Host"`

	// Port Number
	Port string `mapstructure:"Port"`

	// MaxConns is the maximum number of connections in the pool.
	MaxConns int `mapstructure:"MaxConns"`
}

Config struct

type Storage

type Storage interface{}

Storage interface

func NewStorage

func NewStorage(cfg Config) (Storage, error)

NewStorage creates a new Storage

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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