pg_geo_table_generator

package
v0.0.0-...-2fb2347 Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	MoscowSquareBorders = Borders{MinX: 37.0471, MaxX: 38.1495, MinY: 55.4652, MaxY: 55.9871}
)

Functions

func Run

func Run(pool *pgxpool.Pool) error

Types

type Borders

type Borders struct {
	MinX float64
	MaxX float64
	MinY float64
	MaxY float64
}

type GeoDBGenerator

type GeoDBGenerator interface {
	Generate(ctx context.Context, bord Borders, amount int) error
}

func NewGenerator

func NewGenerator(repo Repository) GeoDBGenerator

type Repository

type Repository interface {
	CreateTable(ctx context.Context) error
	FillTable(ctx context.Context, bord Borders, amount int) error
}

func NewRepo

func NewRepo(conn *pgxpool.Pool) Repository

Jump to

Keyboard shortcuts

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