storage

package
v0.0.0-...-7226b57 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2021 License: AGPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Database

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

Database interfaces with the PostgreSQL database.

func NewDatabase

func NewDatabase(cfg *config.DatabaseConfig) (d *Database, err error)

NewDatabase instantiates a new Database.

func (*Database) GetAllStats

func (d *Database) GetAllStats() ([]*common.DailyStats, error)

GetAllStats retrieves all the stats stored in the database.

func (*Database) GetKnownFileNames

func (d *Database) GetKnownFileNames() (map[string]bool, error)

GetKnownFileNames retrieves the names of the daily data files that already exist in the database.

func (*Database) StoreStats

func (d *Database) StoreStats(stats *common.DailyStats) error

StoreStats stores the provided stats into the database.

Jump to

Keyboard shortcuts

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