You've already forked golang-saas-starter-kit
mirror of
https://github.com/raseels-repos/golang-saas-starter-kit.git
synced 2025-08-08 22:36:41 +02:00
Use interface in the handlers of web-api/web-app
This commit is contained in:
@ -1,6 +1,18 @@
|
||||
package geonames
|
||||
|
||||
import "github.com/shopspring/decimal"
|
||||
import "github.com/jmoiron/sqlx"
|
||||
|
||||
type Repository struct {
|
||||
DbConn *sqlx.DB
|
||||
}
|
||||
|
||||
// NewRepository creates a new Repository that defines dependencies for Project.
|
||||
func NewRepository(db *sqlx.DB) *Repository {
|
||||
return &Repository{
|
||||
DbConn: db,
|
||||
}
|
||||
}
|
||||
|
||||
type Geoname struct {
|
||||
CountryCode string // US
|
||||
|
Reference in New Issue
Block a user