upgrade

package
v0.0.0-...-29e199f Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2024 License: Apache-2.0 Imports: 9 Imported by: 1

Documentation

Overview

Package upgrade defines the graph with the dependencies needed to execute the db migrations.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	// Libraries configuration
	Libraries LibrariesConfig `valid:"required"`
}

Config of the application

type LibrariesConfig

type LibrariesConfig struct {
	// PersistenceFw persistence framework configuration
	PersistenceFw PersistenceFwConfig `valid:"required"`
}

LibrariesConfig configuration of the different libraries used by the signare

type PersistenceFwConfig

type PersistenceFwConfig struct {
	// PostgreSQL configuration to connect to a PostgreSQL database
	PostgreSQL *PostgresSQLConfig `valid:"optional"`
	// SQLite configuration to connect to a SQLite database. SQLite must be used just for testing purposes and not in a production environment.
	SQLite *SQLiteConfig `valid:"optional"`
}

PersistenceFwConfig persistence framework configuration

type PostgresSQLConfig

type PostgresSQLConfig struct {
	// Host of database system
	Host string `valid:"required"`
	// Port of database system. Default value is 5432
	Port *int `valid:"optional"`
	// Scheme of database system. Default value is "postgres"
	Scheme *string `valid:"optional"`
	// Username to use in database system
	Username string `valid:"required"`
	// Password to use with username in database system
	Password string `valid:"required"`
	// SSLMode to use in database system. Default value is "disable", however, it is advised to enable SSL for security reasons
	SSLMode string `valid:"optional"`
	// Database to access to in the database system
	Database string `valid:"required"`
}

PostgresSQLConfig configuration to connect to a PostgreSQL database

type SQLiteConfig

type SQLiteConfig struct{}

SQLiteConfig configuration for the SQLite client

type UpgradeGraph

type UpgradeGraph struct {
	// contains filtered or unexported fields
}

func New

func New(config Config) (*UpgradeGraph, error)

func (*UpgradeGraph) Build

func (graph *UpgradeGraph) Build()

Build builds the upgrade graph

func (*UpgradeGraph) PersistenceFwConnection

func (graph *UpgradeGraph) PersistenceFwConnection() sql.Connection

Jump to

Keyboard shortcuts

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