database

package
v0.0.0-...-b7cded1 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Db

type Db struct {
	Con *sql.DB // Database connection
}

func Connect

func Connect(cfg *config.Config) (*Db, error)

func ConnectGCloud

func ConnectGCloud() (*Db, func() error)

getDB creates a connection to the database based on environment variables.

func (*Db) GetAccounts

func (db *Db) GetAccounts() ([]model.Account, error)

func (*Db) InsertAccount

func (db *Db) InsertAccount(accInp *model.Account) (model.Account, error)

Jump to

Keyboard shortcuts

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