Files
weatherapi/internal/adapters/outbound/postgres/repository.go
2026-03-20 09:44:53 -05:00

21 lines
462 B
Go

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