postgres

package
v0.0.0-...-2d6df09 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2025 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

create way for the rest of our app to interact with postgres

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNotExists   = fmt.Errorf("the row does not exist")
	ErrMoreThanOne = fmt.Errorf("there is more than one row")
)

Functions

This section is empty.

Types

type Config

type Config struct {
	Host     string
	Port     uint16
	Database string
	User     string
	Password string
}

type Database

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

func NewDatabase

func NewDatabase(c Config) (*Database, error)

func (*Database) AddDataSet

func (d *Database) AddDataSet(ctx context.Context, dataSet *model.DataSet) error

AddDataSet - adds a dataset

func (*Database) Close

func (d *Database) Close() error

func (*Database) GetDataSet

func (d *Database) GetDataSet(ctx context.Context, dataSetKey string) (*model.DataSet, error)

GetDataSet - gets a dataset

Jump to

Keyboard shortcuts

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