ipfs

package
v0.0.0-...-42c6bbb Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2020 License: GPL-2.0, GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetAllFromIpfs

func GetAllFromIpfs(actorType string, actorID int) (map[string]interface{}, error)

func GetFromIpfs

func GetFromIpfs(reportType string, actorType string, actorID int) (map[string]interface{}, error)

func GetFromIpfsEarthData

func GetFromIpfsEarthData() (map[string]Earth, error)

func IpfsCommitData

func IpfsCommitData(data interface{}) (string, error)

Commits data to IPFS and returns IPFS hash

Types

type Adaptation

type Adaptation struct {
}

type AdaptationChild

type AdaptationChild struct {
}

type Earth

type Earth struct {
	AtmosCO2 float64

	GlobalTemp float64
	// ArcticIceMin float64
	// IceSheets    float64
	SeaLevelRise float64
}

type Emissions

type Emissions struct {
	// Meta-data
	UserID     int
	EntityType string
	Year       int

	DateReported string

	TotalScope1CO2e int
	TotalScope2CO2e int
	TotalScope3CO2e int

	// Where is the report and its data from?
	// (options: internally conducted report, consulting group, etc.)
	Source string

	// what methodology was used in the reporting and
	// verification of the emissions data?
	Methodology string

	// Emissions data (by asset)
	// Country children: regions
	// Region children: companies & cities
	// Company children: assets
	ByChild []struct {
		ChildID    int
		ChildName  string
		Scope1CO2e float64
		Scope2CO2e float64
		Scope3CO2e float64
	}
}

type Mitigation

type Mitigation struct {
	// Meta-data
	UserID     int
	EntityType string
	Year       int

	// Where is the report and its data from?
	// (options: internally conducted report, consulting group, etc.)
	Source string

	// what methodology was used in the reporting and
	// verification of the mitigation data?
	Methodology string

	// Emissions data (by asset)
	// Country children: regions
	// Region children: companies & cities
	// Company children: assets
	ByChild []struct {
		ChildID      int
		ChildName    string
		CarbonOffset float64
		EnergySaved  float64
		EnergyGen    float64

		// Options:
		// - Renewable energy
		// - Energy efficiency
		// - Agriculture, Forestry & Other
		// - Carbon sequestrations
		Type string

		// Options:
		// - Reduction of GHG sources
		// - Enhancement of GHG sinks
		// - Both
		Category string
	}
}

Jump to

Keyboard shortcuts

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