api

package
v0.0.0-...-95106c8 Latest Latest
Warning

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

Go to latest
Published: May 23, 2019 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccountTokenTransfer

type AccountTokenTransfer struct {
	Txns  []models.TokenTransfer `bson:"txns" json:"txns"`
	Total int                    `bson:"total" json:"total"`
}

type AccountTxn

type AccountTxn struct {
	Txns  []models.Transaction `bson:"txns" json:"txns"`
	Total int                  `bson:"total" json:"total"`
}

type ApiServer

type ApiServer struct {
	// contains filtered or unexported fields
}

func New

func New(backend *storage.MongoDB, cfg *Config) *ApiServer

func (*ApiServer) Start

func (a *ApiServer) Start()

type BlockRes

type BlockRes struct {
	Blocks []models.Block `bson:"blocks" json:"blocks"`
	Total  int            `bson:"total" json:"total"`
}

type Config

type Config struct {
	Enabled bool   `json:"enabled"`
	Port    string `json:"port"`
	Nodemap struct {
		Enabled bool   `json:"enabled"`
		Mode    string `json:"mode"`
		Geodb   string `json:"mmdb"`
	} `json:"nodemap"`
}

type Node

type Node struct {
	Name    string
	Network struct {
		LocalAddress  string
		RemoteAddress string
	}
}

type Peer

type Peer struct {
	Enode string   `json:"id"`
	City  []string `json:"city"`
	LL    []string `json:"lat_lng"`
}

type UncleRes

type UncleRes struct {
	Uncles []models.Uncle `bson:"uncles" json:"uncles"`
	Total  int            `bson:"total" json:"total"`
}

Jump to

Keyboard shortcuts

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