storage

package
v0.0.0-...-e0271d0 Latest Latest
Warning

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

Go to latest
Published: May 29, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package storage contains database and ORM layers.

Index

Constants

This section is empty.

Variables

View Source
var (

	//nolint:varnamelen
	DB *gorm.DB
)

DB is the global variable to hold the database access.

Functions

func InitDB

func InitDB(config *configuration.Config) error

InitDB is a wrapper around initialization of the selected database type.

func Migrate

func Migrate(models ...interface{}) error

Migrate updates the database schema according to the referenced models.

Types

type DBType

type DBType string

DBType enumerates the supported databases.

const (
	SQLite   DBType = "sqlite"
	Postgres DBType = "postgres"
)

These const values represent the supported databases.

Directories

Path Synopsis
Package models contains the ORM layer
Package models contains the ORM layer

Jump to

Keyboard shortcuts

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