db

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2021 License: BSD-3-Clause Imports: 11 Imported by: 0

Documentation

Overview

Package db contains a variety of utility functions and test helpers for working with Sherlock's database. While we are using Gorm for everyday application-level sql operations, we are opting for golang-migrate in order to provide more robust and reversible sql migrations.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ApplyMigrations

func ApplyMigrations(changeLogPath string, config *viper.Viper) error

ApplyMigrations is a utility function intended for use in integration tests and local development where changelogs can be applied to a local postgres instance during startup

func Connect

func Connect(config *viper.Viper) (*gorm.DB, error)

Connect is a utility function that accepts a viper instance containing database configs and returns a gorm database connection

Types

This section is empty.

Jump to

Keyboard shortcuts

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