data

package
v0.0.0-...-eb549c3 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2024 License: MIT Imports: 5 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 {
	ConnectionString string
}

func NewDatabase

func NewDatabase(connectionString string) (*Database, error)

func (*Database) GetIntervention

func (d *Database) GetIntervention(timestamp string) (models.Intervention, error)

func (*Database) GetInterventions

func (d *Database) GetInterventions() ([]models.Intervention, error)

func (*Database) GetInterventionsByDate

func (d *Database) GetInterventionsByDate(date string) ([]models.Intervention, error)

func (*Database) UpdateIntervention

func (d *Database) UpdateIntervention(timestamp string, intervention models.Intervention) error

type SqliteInterventionRepository

type SqliteInterventionRepository struct {
	ConnectionString string
}

func NewSqliteInterventionRepository

func NewSqliteInterventionRepository(connectionString string) *SqliteInterventionRepository

func (*SqliteInterventionRepository) GetIntervention

func (ir *SqliteInterventionRepository) GetIntervention(timestamp string) (models.Intervention, error)

func (*SqliteInterventionRepository) GetInterventions

func (ir *SqliteInterventionRepository) GetInterventions() ([]models.Intervention, error)

func (*SqliteInterventionRepository) GetInterventionsByDate

func (ir *SqliteInterventionRepository) GetInterventionsByDate(date string) ([]models.Intervention, error)

Jump to

Keyboard shortcuts

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