models

package
Version: v0.0.0-...-c804a74 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2021 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	CanisterName   string
	UpdateInterval time.Duration
}

Config is the configuration for the oracle to be made

type Endpoint

type Endpoint struct {
	Endpoint      string
	JSONPaths     map[string]string
	NormalizeFunc func(map[string]interface{}) (map[string]float64, error)
}

Endpoint is an endpoint configuration for the oracle

type Engine

type Engine struct {
	Metadata []MappingMetadata
}

Engine is the configuration for the oracle core to work

type MappingMetadata

type MappingMetadata struct {
	Key         string
	SummaryFunc func([]map[string]float64) map[string]float64
	Endpoints   []Endpoint
}

MappingMetadata is the data required for the smart contract to store arbitrary key-values

Jump to

Keyboard shortcuts

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