Documentation ¶
Index ¶
- func AppendCertificate(cert []byte) bool
- func GetHTTPClient() *http.Client
- func GetPeerURL(publicKey []byte) (string, error)
- func GetPeers() []string
- func GetPublicKeysFromOtherNode(url string, publicKey []byte) ([][]byte, []string, error)
- func PeerAdd(url string)
- func SetHostURL(url string)
- func StartSync()
- type PartyInfoRequest
- type PartyInfoResponse
- type Peer
- type ProvenPublicKey
- type SafePublicKeyMap
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetHTTPClient ¶ added in v1.0.2
GetHTTPClient get http client
func GetPublicKeysFromOtherNode ¶
GetPublicKeysFromOtherNode get pub from other nodes
Types ¶
type PartyInfoRequest ¶
type PartyInfoRequest struct { SenderURL string `json:"url"` SenderKey string `json:"key"` SenderNonce string `json:"nonce"` }
PartyInfoRequest used to marshal/unmarshal json
type PartyInfoResponse ¶
type PartyInfoResponse struct { PublicKeys []ProvenPublicKey `json:"publicKeys"` PeerURLs []string `json:"peers"` }
PartyInfoResponse used to marshal/unmarshal json
type Peer ¶
type Peer struct {
// contains filtered or unexported fields
}
Peer used to marshal/unmarshal json
type ProvenPublicKey ¶
ProvenPublicKey used to marshal/unmarshal json
type SafePublicKeyMap ¶
SafePublicKeyMap used to marshal/unmarshal json
func NewSafePublicKeyMap ¶
func NewSafePublicKeyMap() *SafePublicKeyMap
NewSafePublicKeyMap create new key
func (*SafePublicKeyMap) Delete ¶
func (spm *SafePublicKeyMap) Delete(key string)
Delete will delete internal key
func (*SafePublicKeyMap) Get ¶
func (spm *SafePublicKeyMap) Get(key string) (value *Peer)
Get will get internal key
func (*SafePublicKeyMap) Store ¶
func (spm *SafePublicKeyMap) Store(key string, value *Peer)
Store will store key
Click to show internal directories.
Click to hide internal directories.