iptReport

package module
v0.0.0-...-4275075 Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2018 License: GPL-2.0, GPL-3.0 Imports: 9 Imported by: 0

README

iptReport

Coverage Status Build Status Go Report Card GoDoc

Package iptReport provides means for large countries to monitor biodiversity progress at many IPTs. At cmd/report2csv you will find a example generate a csv report.

Installing

go get github.com/dvdscripter/iptReport

Documentation

Overview

Package iptReport provides means for large countries to monitor biodiversity progress at many IPTs. At cmd/report2csv you will find a example generate a csv report.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CrawlIPT

func CrawlIPT(url, alias string, result chan IPTResult)

CrawlIPT crawl ipt at url with identifying alias storing in IPTResult.

func EscapeJSON

func EscapeJSON(s string) string

EscapeJSON escape occurrences of [', ", \] into valid json.

Types

type IPT

type IPT struct {
	Name      string
	Resources []Resource
	Err       error
}

IPT is our main struct to describe each IPT.

type IPTResult

type IPTResult struct {
	Msg  [][]string
	Name string
	Err  error
}

IPTResult is a placeholder struct to receive data coming from crawlIPT coroutines.

type Resource

type Resource struct {
	Name            string
	Link            string
	Organization    string
	Type            string
	Subtype         string
	Events          int
	Measurements    int
	Occurrences     int
	LastModified    time.Time
	LastPublication time.Time
	NextPublication time.Time
	Visibility      string
	Author          string
}

Resource type will hold the final json object.

func (*Resource) Bind

func (r *Resource) Bind(resource []string) (err error)

Bind bind all unmarshal elements to Resource.

func (*Resource) CrawlResource

func (r *Resource) CrawlResource() (err error)

CrawlResource seek information about number of occurreces, events and measurements to fill Resource.occurreces, Resource.Events and Resource.Measurements.

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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