1
0
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:
huyng
2019-08-17 11:03:48 +07:00
committed by seta-davenguyen
parent 102ca82125
commit d277b0ec25
26 changed files with 294 additions and 163 deletions

View File

@ -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