Documentation
¶
Overview ¶
Package geocatalogo provides the main interactions with the geospatial catalogue
Index ¶
- Constants
- Variables
- func EmitResponse(c *GeoCatalogue, w http.ResponseWriter, code int, response []byte)
- func GetURL(url string) string
- func InitLog(cfg *config.Config, log *logrus.Logger) error
- func RenderTemplate(templateString string, data map[string]interface{}) ([]byte, error)
- func Struct2JSON(iface interface{}, prettyPrint bool) []byte
- type GeoCatalogue
Constants ¶
const VERSION string = "0.2-dev"
VERSION provides the geocatalogo version installed.
Variables ¶
var LogLevels = map[string]logrus.Level{ "DEBUG": logrus.DebugLevel, "INFO": logrus.InfoLevel, "WARN": logrus.WarnLevel, "ERROR": logrus.ErrorLevel, "FATAL": logrus.FatalLevel, "NONE": logrus.PanicLevel, }
LogLevels provides a mapping between configuration and logging level types
Functions ¶
func EmitResponse ¶
func EmitResponse(c *GeoCatalogue, w http.ResponseWriter, code int, response []byte)
EmitResponse provides HTTP response for successful requests
func RenderTemplate ¶
RenderTemplate generates template text
func Struct2JSON ¶
Struct2JSON generates a byte representation from a struct
Types ¶
type GeoCatalogue ¶
type GeoCatalogue struct { Config config.Config Repository *repository.Elasticsearch }
GeoCatalogue provides the core structure
func New ¶
func New(cfg *config.Config) (*GeoCatalogue, error)
New provides the initializing functionality
func NewFromEnv ¶
func NewFromEnv() (*GeoCatalogue, error)
NewFromEnv provides the initializing functionality using configuration from the environment
func (*GeoCatalogue) Get ¶
func (c *GeoCatalogue) Get(identifiers []string) search.Results
Get retrieves a single metadata record from the Index
func (*GeoCatalogue) Index ¶
func (c *GeoCatalogue) Index(record metadata.Record) bool
Index adds a metadata record to the Index
func (*GeoCatalogue) Search ¶
func (c *GeoCatalogue) Search(collections []string, term string, bbox []float64, timeVal []time.Time, from int, size int) search.Results
Search performs a search/query against the Index
func (*GeoCatalogue) UnIndex ¶
func (c *GeoCatalogue) UnIndex() bool
UnIndex removes a metadata record to the Index
Directories
¶
Path | Synopsis |
---|---|
cmd
|
|
geocatalogo
Package main - simple Wrapper
|
Package main - simple Wrapper |
landsat-aws-importer
Package main - Landsat 8 on Amazone AWS importer
|
Package main - Landsat 8 on Amazone AWS importer |
oam-catalog-importer
Package main - OpenAerialMap Catalog importer
|
Package main - OpenAerialMap Catalog importer |
Package web - simple HTTP Wrapper
|
Package web - simple HTTP Wrapper |