repository

package
v0.0.0-...-a3b1edf Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2023 License: Apache-2.0 Imports: 3 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 {
	*sqlx.DB
}

func NewWeatherRepository

func NewWeatherRepository(db *sqlx.DB) *DB

func (*DB) FetchWeather

func (r *DB) FetchWeather(ctx context.Context) ([]*models.CurrentWeather, error)

func (*DB) InsertWeather

func (r *DB) InsertWeather(ctx context.Context, weather *models.CurrentWeather) error

type Repository

type Repository struct {
	Weather
}

func NewRepository

func NewRepository(db *sqlx.DB) *Repository

type Weather

type Weather interface {
	InsertWeather(ctx context.Context, weather *models.CurrentWeather) error
	FetchWeather(ctx context.Context) ([]*models.CurrentWeather, error)
}

Jump to

Keyboard shortcuts

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