oc-lib/static/peer_static.go

31 lines
1.0 KiB
Go
Raw Permalink Normal View History

2024-08-13 09:49:42 +02:00
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
2024-08-13 09:49:42 +02:00
func GetMyLocalBsonPeer() (string, map[string]interface{}) {
return "6fd0134c-fefc-427e-94c2-e01365fc5fb0", map[string]interface{}{
"abstractobject": map[string]interface{}{
2024-08-20 09:28:02 +02:00
"id": "6fd0134c-fefc-427e-94c2-e01365fc5fb0",
2024-08-13 09:49:42 +02:00
"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
2024-08-13 09:49:42 +02:00
func GetMyLocalJsonPeer() (string, map[string]interface{}) {
return "6fd0134c-fefc-427e-94c2-e01365fc5fb0", map[string]interface{}{
2024-08-20 09:28:02 +02:00
"id": "6fd0134c-fefc-427e-94c2-e01365fc5fb0",
2024-08-13 09:49:42 +02:00
"name": "local_peer",
"url": "http://localhost",
"public_key": "public_key_lulz",
}
}