elasticsearch

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: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Response

type Response struct {
	Hits struct {
		Hits []struct {
			Source struct {
				Point   string `json:"point"`
				Polygon struct {
					Coordinates [][][]float64 `json:"coordinates"`
				} `json:"polygon"`
			} `json:"_source"`
		} `json:"hits"`
	} `json:"hits"`
}

type Storage

type Storage struct {
	// contains filtered or unexported fields
}

func New

func New() (*Storage, error)

func (*Storage) AddPoint

func (s *Storage) AddPoint(ctx context.Context, p internal.Point) error

func (*Storage) AddPointBatch

func (s *Storage) AddPointBatch(ctx context.Context, points []internal.Point) error

func (*Storage) AddPolygon

func (s *Storage) AddPolygon(ctx context.Context, p internal.Polygon) error

func (*Storage) AddPolygonBatch

func (s *Storage) AddPolygonBatch(ctx context.Context, polygon []internal.Polygon) error

func (*Storage) Drop

func (s *Storage) Drop(ctx context.Context) error

func (*Storage) DropPolygon

func (s *Storage) DropPolygon(ctx context.Context) error

func (*Storage) GetInPolygon

func (s *Storage) GetInPolygon(ctx context.Context, polygon []internal.Point) ([]internal.Point, error)

func (*Storage) GetInPolygonPolygon

func (s *Storage) GetInPolygonPolygon(ctx context.Context, polygon internal.Polygon) ([]internal.Polygon, error)

func (*Storage) GetInRadius

func (s *Storage) GetInRadius(ctx context.Context, p internal.Point, radius int) ([]internal.Point, error)

func (*Storage) GetInRadiusPolygon

func (s *Storage) GetInRadiusPolygon(ctx context.Context, p internal.Polygon, radius int) ([]internal.Polygon, error)

func (*Storage) GetInShapes

func (s *Storage) GetInShapes(ctx context.Context, shape internal.Shapes) ([]internal.Point, error)

func (*Storage) GetIntersectionPoint

func (s *Storage) GetIntersectionPoint(ctx context.Context, point internal.Point) ([]internal.Polygon, error)

func (*Storage) GetIntersectionPolygon

func (s *Storage) GetIntersectionPolygon(ctx context.Context, polygon internal.Polygon) ([]internal.Polygon, error)

func (*Storage) Init

func (s *Storage) Init(ctx context.Context) error

func (*Storage) InitPolygon

func (s *Storage) InitPolygon(ctx context.Context) error

func (*Storage) Ping

func (s *Storage) Ping() error

Jump to

Keyboard shortcuts

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