storage

package
v0.0.0-...-e8e586d Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PolygonStorage

type PolygonStorage interface {
	InitPolygon(ctx context.Context) error
	DropPolygon(ctx context.Context) error

	AddPolygon(ctx context.Context, polygon internal.Polygon) error
	AddPolygonBatch(ctx context.Context, polygons []internal.Polygon) error

	GetInRadiusPolygon(ctx context.Context, p internal.Polygon, radius int) ([]internal.Polygon, error)
	GetInPolygonPolygon(ctx context.Context, polygon internal.Polygon) ([]internal.Polygon, error)

	GetIntersectionPolygon(ctx context.Context, polygon internal.Polygon) ([]internal.Polygon, error)
	GetIntersectionPoint(ctx context.Context, point internal.Point) ([]internal.Polygon, error)
}

type Storage

type Storage interface {
	Init(ctx context.Context) error
	Drop(ctx context.Context) error

	AddPoint(ctx context.Context, p internal.Point) error
	AddPointBatch(ctx context.Context, points []internal.Point) error

	GetInRadius(ctx context.Context, p internal.Point, radius int) ([]internal.Point, error)
	GetInPolygon(ctx context.Context, polygon []internal.Point) ([]internal.Point, error)

	GetInShapes(ctx context.Context, shapes internal.Shapes) ([]internal.Point, error)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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