model

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

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

Go to latest
Published: Apr 29, 2020 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 AccountBalance

type AccountBalance struct {
	Data []AccountBalanceData `json:"data"`
}

AccountBalance is the parent type for the account balance endpoint

type AccountBalanceAttributes

type AccountBalanceAttributes struct {
	Address     string `json:"address"`
	EthBalance  string `json:"eth_balance"`
	LinkBalance string `json:"link_balance"`
}

AccountBalanceAttributes reflects `attributes` returned from the account balance endpoint

type AccountBalanceData

type AccountBalanceData struct {
	Type       string                   `json:"type"`
	Id         string                   `json:"id"`
	Attributes AccountBalanceAttributes `json:"attributes"`
}

AccountBalanceData reflects `data` returned from the account balance endpoint

type BridgeTypeAttributes

type BridgeTypeAttributes struct {
	URL string `json:"url"`
}

BridgeTypeAttributes reflects the `attributes` obj returned from the bridge endpoint

type BridgeTypeData

type BridgeTypeData struct {
	Type       string               `json:"type"`
	Id         string               `json:"id"`
	Attributes BridgeTypeAttributes `json:"attributes"`
}

BridgeTypeData reflects the `data` obj returned from the bridge endpoint

type BridgeTypes

type BridgeTypes struct {
	Data []*BridgeTypeData `json:"data"`
	Meta Meta              `json:"meta"`
}

BridgeTypes is the parent type for the bridge type api

type Config

type Config struct {
	Port               int
	TickerInterval     time.Duration
	NodeConfigLocation string
	NodeConfigs        []*NodeConfig
	PromPort           int
	PromEnabled        bool
	ClientApiEnabled   bool
	ClientApiPort      int
	Debug              bool
	WsEnabled          bool
	StatsEnabled       bool
}

Config stores all the configurable options parsed by flags

type JobSpecStats

type JobSpecStats struct {
	ID           string                  `json:"id"`
	RunCount     int                     `json:"run_count"`
	AdaptorCount map[string]int          `json:"adaptor_count"`
	StatusCount  map[string]int          `json:"status_count"`
	ParamCount   map[string][]ParamCount `json:"param_count"`
}

JobSpecStats reflects the `job_spec_stats` obj from the stats endpoint

type Links struct {
	Next string `json:"next"`
}

Links is part of the paginated response from a node

type Meta

type Meta struct {
	Count int `json:"count"`
}

Meta is part of the paginated response from a node

type Metrics

type Metrics struct {
	TotalSpecs   int          `json:"totalSpecs"`
	TotalBridges int          `json:"totalBridges"`
	Address      string       `json:"address"`
	EthBalance   string       `json:"ethBalance"`
	LinkBalance  string       `json:"linkBalance"`
	JobSpecStats JobSpecStats `json:"job_spec_stats"`
}

Metrics is the type returned for the rest and ws clients

type NodeConfig

type NodeConfig struct {
	URL      string `json:"url"`
	Username string `json:"username"`
	Password string `json:"password"`
}

NodeConfig is the type needed for the client management api and the config file

type NodeStats

type NodeStats struct {
	Data  NodeStatsData `json:"data"`
	Links Links         `json:"links"`
	Meta  Meta          `json:"meta"`
}

NodeStats is the parent type returned from the stats endpoint

type NodeStatsAttributes

type NodeStatsAttributes struct {
	JobSpecStats []JobSpecStats `json:"job_spec_stats"`
}

NodeStatsAttributes reflects the `attributes` obj from the stats endpoint

type NodeStatsData

type NodeStatsData struct {
	ID         string              `json:"id"`
	Attributes NodeStatsAttributes `json:"attributes"`
}

NodeStatsData reflects the `data` obj from the stats endpoint

type ParamCount

type ParamCount struct {
	Value string `json:"value"`
	Count int    `json:"count"`
}

ParamCount reflects the `param_count` obj from the stats endpoint

type Session

type Session struct {
	Email    string `json:"email"`
	Password string `json:"password"`
}

Session is the type needed for creating/deleting sessions on the node

type Subscription

type Subscription struct {
	Addresses []string `json:"addresses"`
}

Subscription is the type required to be sent from a ws client to subscribe to any addresses

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL