db

package
v0.0.0-...-96c172f Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Name     string
	Host     string
	Port     int
	User     string
	Password string
}

Config contains the basic DB configuration params.

type RedisConfig

type RedisConfig struct {
	Host string
	Port int
}

RedisConfig contains the configuration to access a Redis instance.

func (*RedisConfig) Address

func (rc *RedisConfig) Address() string

Address returns the address for a redis instance.

type SQLDB

type SQLDB interface {
	Master() *sqlx.DB
	Close()
}

SQLDB contains the connection to a master database and a way to shutdown the connection using Close

func NewSQLDB

func NewSQLDB(ins *obs.Insighter, conf *Config) SQLDB

NewSQLDB creates a connection to a database.

Jump to

Keyboard shortcuts

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