api

package
v0.0.0-...-3e6ee68 Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2023 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

View Source
const AddEdgesUrl = "/add_edges"
View Source
const AddVerticesUrl = "/add_vertices"
View Source
const GetGenerationUrl = "/get_generation"
View Source
const HealthzUrl = "/healthz"
View Source
const RecalculateDsURL = "/recalculate_ds"
View Source
const ShortestPathUrl = "/shortest_path"

Variables

This section is empty.

Functions

This section is empty.

Types

type AddEdgesRequest

type AddEdgesRequest struct {
	Edges []Edge `json:"edges"`
}

type AddEdgesResponse

type AddEdgesResponse struct {
}

type AddVerticesRequest

type AddVerticesRequest struct {
	Vertices []Vertex `json:"vertices"`
}

type AddVerticesResponse

type AddVerticesResponse struct {
}

type Edge

type Edge struct {
	From   VertexId   `json:"from"`
	To     VertexId   `json:"to"`
	Length EdgeLength `json:"length"`
	Id     EdgeId     `json:"flag_id" gorm:"primarykey"`
}

type EdgeId

type EdgeId = int64

type EdgeLength

type EdgeLength = float64

type Generation

type Generation = uint16

type GetGenerationResponse

type GetGenerationResponse struct {
	Generation Generation `json:"generation"`
}

type HealthzResponse

type HealthzResponse struct {
}

type RecalculateDsResponse

type RecalculateDsResponse struct {
}

type ShortestPathRequest

type ShortestPathRequest struct {
	From VertexId `json:"from"`
	To   VertexId `json:"to"`
}

type ShortestPathResponse

type ShortestPathResponse struct {
	NoPath   bool       `json:"no_path,omitempty"`
	Distance float64    `json:"distance"`
	Vertices []VertexId `json:"vertices"`
}

type Vertex

type Vertex struct {
	Id        VertexId `json:"id" gorm:"primarykey"`
	Latitude  float64  `json:"latitude"`
	Longitude float64  `json:"longitude"`
}

type VertexId

type VertexId = int64

Jump to

Keyboard shortcuts

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