Documentation ¶
Overview ¶
Package address Package exposes the data structure and operations necessary on the address.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 ApiPage
- type ApiSort
- type BitVectorApi
- type ChunkInfoOverlay
- type ChunkInfoSourceApi
- type ChunkSourceApi
- type FileInfo
- type Model
- type Paging
- func (pg *Paging) Page(list []map[string]interface{}) []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 = "cn" NC = "nc" HP = "hp" HS = "hs" )
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 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 address in a format: [Overlay, Underlay] It can be used for logging
func (*Address) UnmarshalJSON ¶
type AddressInfo ¶
AddressInfo contains the information received from the handshake.
func (*AddressInfo) LightString ¶
func (i *AddressInfo) LightString() string
type BitVectorApi ¶
type ChunkInfoOverlay ¶
type ChunkInfoOverlay struct { Overlay string `json:"overlay"` Bit BitVectorApi `json:"bit"` }
type ChunkInfoSourceApi ¶
type ChunkInfoSourceApi struct { PyramidSource string `json:"pyramidSource"` ChunkSource []ChunkSourceApi `json:"chunkSource"` }
type ChunkSourceApi ¶
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"` }
Click to show internal directories.
Click to hide internal directories.