Yonle on Nostr: Writing my own AP server: 1 type struct type ActorPublicKey { Id string `json:"id"` ...
Writing my own AP server: 1
type struct
type ActorPublicKey {
Id string `json:"id"`
Owner string `json:"owner"`
PublicKeyPem string `json:"publicKeyPem"`
}
type Actor struct {
Context []string `json:"@context"`
Id string `json:"id"`
Type string `json:"type"`
PreferredUsername string `json:"preferredUsername"`
Inbox string `json:"inbox"`
}
While this code is here, I just take a look at honk's code. Instead of types, Honk use map[] to do it's thing.
Published at
2024-07-23 16:41:13Event JSON
{
"id": "4d722a66305610ae6263f6bfefe7f8bf5e98214abc30f0671a03d6740d6cc2e5",
"pubkey": "d418a84ff4d0cec1d490d4e5991887cf7251c55b48bd57607c31b4aed8edd460",
"created_at": 1721752873,
"kind": 1,
"tags": [
[
"proxy",
"https://fedi.lecturify.net/objects/eec2ead0-23ca-4e92-8003-5e194f6066ee",
"activitypub"
]
],
"content": "Writing my own AP server: 1\n\ntype struct\n\ntype ActorPublicKey {\n Id string `json:\"id\"`\n Owner string `json:\"owner\"`\n PublicKeyPem string `json:\"publicKeyPem\"`\n}\n\ntype Actor struct {\n Context []string `json:\"@context\"`\n\n Id string `json:\"id\"`\n Type string `json:\"type\"`\n PreferredUsername string `json:\"preferredUsername\"`\n Inbox string `json:\"inbox\"`\n}\n\n\nWhile this code is here, I just take a look at honk's code. Instead of types, Honk use map[] to do it's thing.",
"sig": "6f4fff2dc368cd8f3c7c010d3baf3c8bffb262a0a73a0b154d738ec0471479cd4cbb67fdb83cfbdf920f4c57ee4fe22f3c320ffbf19312eb8927fe28c4065cc1"
}