geocatalogo: Index | Files | Directories

package geocatalogo

import ""

Package geocatalogo provides the main interactions with the geospatial catalogue


Package Files

geocatalogo.go logging.go util.go


const VERSION string = "0.2-dev"

VERSION provides the geocatalogo version installed.


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

func EmitResponse Uses

func EmitResponse(c *GeoCatalogue, w http.ResponseWriter, code int, response []byte)

EmitResponse provides HTTP response for successful requests

func GetURL Uses

func GetURL(url string) string

GetURL downloads a URL

func InitLog Uses

func InitLog(cfg *config.Config, log *logrus.Logger) error

InitLog initializes the logging facility

func RenderTemplate Uses

func RenderTemplate(templateString string, data map[string]interface{}) ([]byte, error)

RenderTemplate generates template text

func Struct2JSON Uses

func Struct2JSON(iface interface{}, prettyPrint bool) []byte

Struct2JSON generates a byte representation from a struct

type GeoCatalogue Uses

type GeoCatalogue struct {
    Config     config.Config
    Repository *repository.Elasticsearch

GeoCatalogue provides the core structure

func New Uses

func New(cfg *config.Config) (*GeoCatalogue, error)

New provides the initializing functionality

func NewFromEnv Uses

func NewFromEnv() (*GeoCatalogue, error)

NewFromEnv provides the initializing functionality using configuration from the environment

func (*GeoCatalogue) Get Uses

func (c *GeoCatalogue) Get(identifiers []string) search.Results

Get retrieves a single metadata record from the Index

func (*GeoCatalogue) Index Uses

func (c *GeoCatalogue) Index(record metadata.Record) bool

Index adds a metadata record to the Index

func (*GeoCatalogue) Search Uses

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 Uses

func (c *GeoCatalogue) UnIndex() bool

UnIndex removes a metadata record to the Index


webPackage web - simple HTTP Wrapper

Package geocatalogo imports 13 packages (graph) and is imported by 2 packages. Updated 2019-10-21. Refresh now. Tools for package owners.