api

package
v0.0.0-...-75366a7 Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2024 License: AGPL-3.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Register

func Register(ctx context.Context, app application.App, policies io.Reader) (*chi.Mux, error)

Types

type ApiResponse

type ApiResponse struct {
	Meta     *meta           `json:"meta,omitempty"`
	Data     json.RawMessage `json:"data"`
	Links    *links          `json:"links,omitempty"`
	Included []Resource      `json:"included,omitempty"`
}

func NewApiResponse

func NewApiResponse(r *http.Request, data json.RawMessage, count, total, offset, limit uint64) ApiResponse

func (ApiResponse) Byte

func (r ApiResponse) Byte() []byte

type Feature

type Feature struct {
	ID         string   `json:"id"`
	Type       string   `json:"type"`
	Geometry   Geometry `json:"geometry"`
	Properties map[string]any
}

type FeatureCollection

type FeatureCollection struct {
	Type     string    `json:"type"`
	Features []Feature `json:"features"`
}

type Geometry

type Geometry struct {
	Type        string    `json:"type"`
	Coordinates []float64 `json:"coordinates"`
}

type Resource

type Resource struct {
	ThingID string `json:"thing_id"`
	Id      string `json:"id"`
	Type    string `json:"type"`
}

Jump to

Keyboard shortcuts

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