Documentation ¶
Index ¶
- Variables
- type NeighborhoodScore
- type OvoBuilding
- type OvoBuildingsInfo
- type PgxIface
- type Repository
- func (r *Repository) ApplyVolunteer(volunteer model.VolunteerDoc) (int, error)
- func (r *Repository) Close()
- func (r *Repository) GetFeedDetail(neighborhoodId int) (*feeds.FeedDetailResponse, error)
- func (r *Repository) GetFeedDetailFromMemory(neighborhoodId int) (*feeds.FeedDetailResponse, error)
- func (r *Repository) GetFeeds() (*feeds.Response, error)
- func (r *Repository) GetFeedsFromMemory() (*feeds.Response, error)
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type NeighborhoodScore ¶
type OvoBuilding ¶
type OvoBuilding struct { City string District string DistrictScore int Neighborhood string BuildingName string BuildingScore int BuildingId string }
OvoBuilding struct, represents each line of data
type OvoBuildingsInfo ¶
type OvoBuildingsInfo struct { BuildingInfos []OvoBuilding CityToDistrictsToNeigh map[string]map[string]map[string][]OvoBuilding NeighToAvgScore map[string]NeighborhoodScore NeighborhoodIdToBuildings map[int][]OvoBuilding NeighborhoodIdToAvgScore map[int]int LastUpdateTime time.Time }
var OvoBuildingStore *OvoBuildingsInfo
func NewOvoBuildingInfo ¶
func NewOvoBuildingInfo(data s3.ObjectData) *OvoBuildingsInfo
func (*OvoBuildingsInfo) Store ¶
func (o *OvoBuildingsInfo) Store() *OvoBuildingsInfo
type PgxIface ¶
type PgxIface interface { Begin(context.Context) (pgx.Tx, error) Query(context.Context, string, ...any) (pgx.Rows, error) QueryRow(context.Context, string, ...any) pgx.Row Exec(context.Context, string, ...any) (pgconn.CommandTag, error) SendBatch(context.Context, *pgx.Batch) pgx.BatchResults Close() }
type Repository ¶
type Repository struct {
// contains filtered or unexported fields
}
func New ¶
func New() *Repository
func (*Repository) ApplyVolunteer ¶
func (r *Repository) ApplyVolunteer(volunteer model.VolunteerDoc) (int, error)
func (*Repository) Close ¶
func (r *Repository) Close()
func (*Repository) GetFeedDetail ¶
func (r *Repository) GetFeedDetail(neighborhoodId int) (*feeds.FeedDetailResponse, error)
func (*Repository) GetFeedDetailFromMemory ¶
func (r *Repository) GetFeedDetailFromMemory(neighborhoodId int) (*feeds.FeedDetailResponse, error)
func (*Repository) GetFeedsFromMemory ¶
func (r *Repository) GetFeedsFromMemory() (*feeds.Response, error)
Click to show internal directories.
Click to hide internal directories.