models

package
v0.0.0-...-4290cae Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Collection

type Collection struct {
	gorm.Model

	Id        string     `json:"id,omitempty"`
	Data      JSONB      `gorm:"type:jsonb" json:"data,omitempty"`
	CreatedAt *time.Time `json:"CreatedAt,omitempty"`
	UpdatedAt *time.Time `json:"UpdatedAt,omitempty"`
}

type Context

type Context struct {
	Returned int `json:"returned,omitempty"`
	Limit    int `json:"limit,omitempty"`
}

type Extent

type Extent struct {
	Spatial  Spatial  `json:"spatial,omitempty"`
	Temporal Temporal `json:"temporal,omitempty"`
	License  string   `json:"license,omitempty"`
}

type GeoJSONGenericGeometry

type GeoJSONGenericGeometry struct {
	Type        string          `json:"type"`
	Coordinates json.RawMessage `json:"coordinates"`
}

type GeoJSONGeometryCollection

type GeoJSONGeometryCollection struct {
	Type       string            `json:"type"` // will always be "GeometryCollection"
	Geometries []json.RawMessage `json:"geometries"`
}

type GeoJSONLine

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

line or multipoint

type GeoJSONMultiPolygon

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

type GeoJSONPoint

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

type GeoJSONPoly

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

polygon or multiline

type GeoJSONPolygon

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

polygon or multiline

type Item

type Item struct {
	Id         string     `json:"id,omitempty"`
	Collection string     `json:"collection,omitempty"`
	Data       string     `json:"data,omitempty"`
	Geometry   string     `json:"geometry,omitempty"`
	CreatedAt  *time.Time `json:"CreatedAt,omitempty"`
	UpdatedAt  *time.Time `json:"UpdatedAt,omitempty"`
}

type ItemCollection

type ItemCollection struct {
	Type     string  `json:"type,omitempty"`
	Context  Context `json:"context,omitempty"`
	Features []Item  `json:"features,omitempty"`
}

type JSONB

type JSONB []interface{}

func (*JSONB) Scan

func (a *JSONB) Scan(value interface{}) error

Scan Unmarshal

func (JSONB) Value

func (a JSONB) Value() (driver.Value, error)

Value Marshal

type Link struct {
	Rel   string `json:"rel,omitempty"`
	Href  string `json:"href,omitempty"`
	Type  string `json:"type,omitempty"`
	Title string `json:"title,omitempty"`
}

type Providers

type Providers struct {
	Name  string   `json:"name,omitempty"`
	Roles []string `json:"roles,omitempty"`
	Url   string   `json:"url,omitempty"`
}

type Root

type Root struct {
	StacVersion string `json:"stac_version,omitempty"`
	Id          string `json:"id,omitempty"`
	Title       string `json:"title,omitempty"`
	Description string `json:"description,omitempty"`
	Links       []Link `json:"links,omitempty"`
}
type Search struct {
	Ids                []string                  `json:"ids,omitempty"`
	Collections        []string                  `json:"collections,omitempty"`
	Limit              int                       `json:"limit,omitempty"`
	Bbox               []float64                 `json:"bbox,omitempty"`
	Geometry           GeoJSONGenericGeometry    `json:"geometry,omitempty"`
	GeometryCollection GeoJSONGeometryCollection `json:"geometrycollection,omitempty"`
	Sortby             []Sort                    `json:"sortby,omitempty"`
}

type SearchMap

type SearchMap struct {
	Collections int
	Ids         int
	Geometry    int
}

type Sort

type Sort struct {
	Field     string `json:"field"`
	Direction string `json:"direction"`
}

type Spatial

type Spatial struct {
	Bbox [][]float64 `json:"bbox,omitempty"`
}

type StacCollection

type StacCollection struct {
	StacVersion    string                 `json:"stac_version,omitempty"`
	Id             string                 `json:"id,omitempty"`
	Title          string                 `json:"title,omitempty"`
	Description    string                 `json:"description,omitempty"`
	Keywords       []string               `json:"keywords,omitempty"`
	StacExtensions []string               `json:"stac_extensions,omitempty"`
	License        string                 `json:"license,omitempty"`
	Providers      []Providers            `json:"providers,omitempty"`
	Extent         Extent                 `json:"extent,omitempty"`
	Summaries      map[string]interface{} `json:"summaries,omitempty"`
	Links          []Link                 `json:"links,omitempty"`
	ItemType       string                 `json:"itemType,omitempty"`
	Crs            []string               `json:"crs,omitempty"`
}

type StacItem

type StacItem struct {
	Id             string          `json:"id,omitempty"`
	Type           string          `json:"type,omitempty"`
	Collection     string          `json:"collection,omitempty"`
	StacVersion    string          `json:"stac_version,omitempty"`
	StacExtensions []string        `json:"stac_extensions,omitempty"`
	Bbox           pq.Float64Array `gorm:"type:float[]"`
	Geometry       GeoJSONPoly     `json:"geometry,omitempty"`
	Properties     interface{}     `json:"properties,omitempty"`
	Assets         interface{}     `json:"assets,omitempty"`
	Links          []interface{}   `json:"links,omitempty"`
}

type Temporal

type Temporal struct {
	Interval [][]string `json:"interval,omitempty"`
}

Jump to

Keyboard shortcuts

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