storage

package
v0.0.0-...-df67ef6 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 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 PostgresStore

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

func NewPostgressStore

func NewPostgressStore(connectionString string) (*PostgresStore, error)

func (*PostgresStore) CreateWeatherReport

func (s *PostgresStore) CreateWeatherReport(w *types.WeatherReport) error

func (*PostgresStore) DeleteWeatherReport

func (s *PostgresStore) DeleteWeatherReport(id uuid.UUID) error

func (*PostgresStore) GetWeatherReportByID

func (s *PostgresStore) GetWeatherReportByID(id uuid.UUID) (*types.WeatherReport, error)

func (*PostgresStore) GetWeatherReports

func (s *PostgresStore) GetWeatherReports() ([]*types.WeatherReport, error)

func (*PostgresStore) Init

func (s *PostgresStore) Init() error

func (*PostgresStore) UpdateWeatherReport

func (s *PostgresStore) UpdateWeatherReport(w *types.WeatherReport) error

type Storage

type Storage interface {
	CreateWeatherReport(*types.WeatherReport) error
	DeleteWeatherReport(uuid.UUID) error
	UpdateWeatherReport(*types.WeatherReport) error
	GetWeatherReports() ([]*types.WeatherReport, error)
	GetWeatherReportByID(id uuid.UUID) (*types.WeatherReport, error)
}

Jump to

Keyboard shortcuts

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