Files

21 lines
462 B
Go
Raw Permalink Normal View History

// repository.go defines the Postgres repository shell and constructor.
// Layer: adapters/outbound/postgres repository root.
2026-03-19 19:52:13 -05:00
package postgres
import (
"database/sql"
"gitea.maximumdirect.net/ejr/weatherapi/internal/app"
2026-03-19 19:52:13 -05:00
)
// Repository is a Postgres-backed implementation of weatherapi read ports.
type Repository struct {
db *sql.DB
}
var _ app.Repository = (*Repository)(nil)
2026-03-19 19:52:13 -05:00
func NewRepository(db *sql.DB) *Repository {
return &Repository{db: db}
}