oc-lib/static/peer_static.go

31 lines
1.0 KiB
Go

package static
/*
This package contains static data for the peer model
It's used to test the peer model
Temporary version, will be removed in the future and replaced with a more dynamic solution
to generate the data
*/
// GetMyLocalBsonPeer returns a tuple with the peer ID and the peer data in BSON format
func GetMyLocalBsonPeer() (string, map[string]interface{}) {
return "6fd0134c-fefc-427e-94c2-e01365fc5fb0", map[string]interface{}{
"abstractobject": map[string]interface{}{
"id": "6fd0134c-fefc-427e-94c2-e01365fc5fb0",
"name": "local_peer",
},
"url": "http://localhost",
"public_key": "public_key_lulz",
}
}
// GetMyLocalJsonPeer returns a tuple with the peer ID and the peer data in JSON format
func GetMyLocalJsonPeer() (string, map[string]interface{}) {
return "6fd0134c-fefc-427e-94c2-e01365fc5fb0", map[string]interface{}{
"id": "6fd0134c-fefc-427e-94c2-e01365fc5fb0",
"name": "local_peer",
"url": "http://localhost",
"public_key": "public_key_lulz",
}
}