fileimport

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2024 License: GPL-3.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ImportTreesFromCSV

func ImportTreesFromCSV(svc service.TreeService) fiber.Handler

@Summary Import trees from a CSV file @Description Import trees from a CSV file @Id import-trees-from-csv @Tags File Import @Success 204 @Accept multipart/form-data @Produce json @Failure 400 {object} HTTPError @Failure 401 {object} HTTPError @Failure 403 {object} HTTPError @Failure 404 {object} HTTPError @Failure 500 {object} HTTPError @Router /v1/import/csv [post] @Security Keycloak @Param file formData file true "CSV file to import"

func RegisterRoutes

func RegisterRoutes(svc service.TreeService) *fiber.App

Types

type GeoPoint

type GeoPoint struct {
	X float64
	Y float64
}

type GeoTransformer

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

func NewGeoTransformer

func NewGeoTransformer(from, to int) (*GeoTransformer, error)

func (*GeoTransformer) Transform

func (g *GeoTransformer) Transform(x, y float64) (lat, lng float64, err error)

func (*GeoTransformer) TransformBatch

func (g *GeoTransformer) TransformBatch(points []GeoPoint) ([]GeoPoint, error)

Jump to

Keyboard shortcuts

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