models

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2020 License: Apache-2.0 Imports: 0 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CocoHostInfo

type CocoHostInfo struct {
	HostInfo
	Type string `json:"type" binding:"required"`
}

CocoHostInfo comes from a coconut node telling us it's alive

type CocoPresence

type CocoPresence struct {
	CocoHostInfo
	LastSeen int64 `json:"lastSeen" binding:"required"`
}

CocoPresence holds presence info for a coconut node.

type Error

type Error struct {
	Error string `json:"error"`
}

Error ...

type GatewayHostInfo added in v0.7.0

type GatewayHostInfo struct {
	ClientListener    string             `json:"clientListener"`
	MixnetListener    string             `json:"mixnetListener"`
	PubKey            string             `json:"pubKey" binding:"required"`
	Version           string             `json:"version" binding:"required"`
	Location          string             `json:"location"`
	RegisteredClients []RegisteredClient `json:"registeredClients" binding:"required"`
}

GatewayHostInfo comes from a node telling us it's alive

type GatewayPresence added in v0.7.0

type GatewayPresence struct {
	GatewayHostInfo
	LastSeen int64 `json:"lastSeen" binding:"required"`
}

GatewayPresence holds presence info for a gateway node

type HostInfo

type HostInfo struct {
	Host     string `json:"host"`
	PubKey   string `json:"pubKey" binding:"required"`
	Version  string `json:"version" binding:"required"`
	Location string `json:"location"`
}

HostInfo comes from a node telling us it's alive

type MixHostInfo

type MixHostInfo struct {
	HostInfo
	Layer uint `json:"layer" binding:"required"`
}

MixHostInfo comes from a node telling us it's alive

type MixMetric

type MixMetric struct {
	PubKey   string          `json:"pubKey" binding:"required"`
	Sent     map[string]uint `json:"sent" binding:"required"`
	Received *uint           `json:"received" binding:"required"`
}

MixMetric is a report from each mixnode detailing recent traffic. Useful for creating visualisations.

type MixNodeID added in v0.7.0

type MixNodeID struct {
	PubKey string
}

MixNodeID is a request to knock a node out of the regular topology and into the disallowed list. It's a temporary band-aid until we have staking and doesn't relate to anything else.

type MixNodePresence

type MixNodePresence struct {
	MixHostInfo
	LastSeen int64 `json:"lastSeen" binding:"required"`
}

MixNodePresence holds presence info for a mixnode

type MixProviderHostInfo

type MixProviderHostInfo struct {
	ClientListener    string             `json:"clientListener"`
	MixnetListener    string             `json:"mixnetListener"`
	PubKey            string             `json:"pubKey" binding:"required"`
	Version           string             `json:"version" binding:"required"`
	Location          string             `json:"location"`
	RegisteredClients []RegisteredClient `json:"registeredClients" binding:"required"`
}

MixProviderHostInfo comes from a node telling us it's alive

type MixProviderPresence

type MixProviderPresence struct {
	MixProviderHostInfo
	LastSeen int64 `json:"lastSeen" binding:"required"`
}

MixProviderPresence holds presence info for a mix provider node

type PersistedMixMetric

type PersistedMixMetric struct {
	MixMetric
	Timestamp int64 `json:"timestamp" binding:"required"`
}

PersistedMixMetric is a saved MixMetric with a timestamp recording when it was seen by the directory server. It can be used to build visualizations of mixnet traffic.

type Presence

type Presence struct {
	HostInfo
	LastSeen int64 `json:"lastSeen" binding:"required"`
}

Presence lets the server tell clients when a node was last seen

type RegisteredClient

type RegisteredClient struct {
	PubKey string `json:"pubKey" binding:"required"`
}

RegisteredClient holds information about client registered at a provider

type Topology

type Topology struct {
	CocoNodes        []CocoPresence        `json:"cocoNodes"`
	MixNodes         []MixNodePresence     `json:"mixNodes"`
	MixProviderNodes []MixProviderPresence `json:"mixProviderNodes"`
	Gateways         []GatewayPresence     `json:"gatewayNodes"`
}

Topology shows us the current state of the overall Nym network

Jump to

Keyboard shortcuts

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