repository

package
v0.0.0-...-86a22be Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 28, 2023 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	CityIdToMap                                  = make(map[int]model.City)
	DistrictIdToMap                              = make(map[int]model.District)
	NeighborhoodIdToMap                          = make(map[int]model.Neighborhood)
	CityToDistrictToNeighborhoodToNeighborhoodId = make(map[string]map[string]map[string]int)
)

Functions

This section is empty.

Types

type NeighborhoodScore

type NeighborhoodScore struct {
	NeighborhoodId int
	TotalScore     int
	Count          int
}

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) GetFeeds

func (r *Repository) GetFeeds() (*feeds.Response, error)

func (*Repository) GetFeedsFromMemory

func (r *Repository) GetFeedsFromMemory() (*feeds.Response, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL