db

package
v0.0.0-...-c783a93 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2021 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package db provides types and methods database operations.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetConnection

func GetConnection() *gorm.DB

GetConnection returns the configured db connection or nil

Types

type MySQLConfig

type MySQLConfig struct {
	// Optional.
	Username, Password string

	// Host of the MySQL instance.
	//
	// If set, Instance should be unset.
	Host string

	// Port of the MySQL instance.
	//
	// If set, Instance should be unset.
	Port int

	// Instance is the CloudSQL instance name.
	//
	// If set, Host and Port should be unset.
	Instance string
}

MySQLConfig holds SQL configuration information for setting up connections

Jump to

Keyboard shortcuts

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