Documentation ¶
Overview ¶
Package aurora exposes the data structure and operations necessary on the aurora.Address type which used in the handshake protocol, address-book and hive protocol.
Index ¶
- Constants
- Variables
- type Address
- type AddressInfo
- type ApiBody
- type ApiFilter
- type BitVectorApi
- type ChunkInfoOverlay
- type ChunkInfoSourceApi
- type ChunkSourceApi
- type FileInfo
- type Model
- type Paging
- func (pg *Paging) Page(list []map[string]interface{}, page int) (newList []map[string]interface{})
- func (pg *Paging) PageSort(list []map[string]interface{}, sortName, sortType string) (newList []map[string]interface{})
- func (pg *Paging) ResponseFilter(list []map[string]interface{}, filterTerm []ApiFilter) (newList []map[string]interface{})
Constants ¶
View Source
const ( FullNode = iota BootNode )
View Source
const ( EQ = "eq" NE = "ne" )
View Source
const ( GT = "gt" Ge = "ge" IT = "it" LE = "le" IN = "in" )
View Source
const ( CN = "contains" NC = "NoContains" HP = "HasPrefix" HS = "HasSuffix" )
View Source
const ( ASC = "asc" DESC = "desc" )
View Source
const RelayPrefixHttp = "/group/http"
Variables ¶
View Source
var ErrInvalidAddress = errors.New("invalid address")
View Source
var ErrInvalidNodeMode = errors.New("invalid node mode")
Functions ¶
This section is empty.
Types ¶
type Address ¶
Address represents the aurora address in boson. It consists of a peers underlay (physical) address, overlay (topology) address and signature. Signature is used to verify the `Overlay/Underlay` pair, as it is based on `underlay|networkID`, signed with the public key of Overlay address
func NewAddress ¶
func ParseAddress ¶
func (*Address) MarshalJSON ¶
func (*Address) ShortString ¶
ShortString returns shortened versions of aurora address in a format: [Overlay, Underlay] It can be used for logging
func (*Address) UnmarshalJSON ¶
type AddressInfo ¶ added in v1.1.0
AddressInfo contains the information received from the handshake.
func (*AddressInfo) LightString ¶ added in v1.1.0
func (i *AddressInfo) LightString() string
type BitVectorApi ¶
type ChunkInfoOverlay ¶
type ChunkInfoOverlay struct { Overlay string `json:"overlay"` Bit BitVectorApi `json:"bit"` }
type ChunkInfoSourceApi ¶ added in v1.1.6
type ChunkInfoSourceApi struct { PyramidSource string `json:"pyramidSource"` ChunkSource []ChunkSourceApi `json:"chunkSource"` }
type ChunkSourceApi ¶ added in v1.1.6
type ChunkSourceApi struct { Overlay string `json:"overlay"` ChunkBit BitVectorApi `json:"chunkBit"` }
type FileInfo ¶
type FileInfo struct { TreeSize int `json:"treeSize"` FileSize int `json:"fileSize"` Bitvector BitVectorApi `json:"bitvector"` PinState bool `json:"pinState"` }
type Model ¶ added in v1.1.0
func NewModelFromBytes ¶ added in v1.1.3
func (Model) IsBootNode ¶ added in v1.1.0
Click to show internal directories.
Click to hide internal directories.