-
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adjust schema to add additional fields
- Loading branch information
Showing
2 changed files
with
16 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,11 @@ | ||
package model | ||
|
||
type Actor struct { | ||
ActorType string `json:"actor_type"` | ||
Id string `json:"id"` | ||
PublicKey string `json:"public_key"` | ||
PrivateKey string `json:"private_key"` | ||
ActorType string `json:"actor_type"` | ||
Id string `json:"id"` | ||
DisplayName string `json:"display_name"` | ||
Bio string `json:"bio"` | ||
MatrixUserId string `json:"matrix_user_id"` | ||
PublicKey string `json:"public_key"` | ||
PrivateKey string `json:"private_key"` | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,13 +27,15 @@ func main() { | |
defer cancel() | ||
|
||
body := ` | ||
{ | ||
"actor_type": "user", | ||
"id": "[email protected]", | ||
"private_key": "some super secure string", | ||
"public_key": "the public key" | ||
} | ||
` | ||
{ | ||
"actor_type": "user", | ||
"id": "[email protected]", | ||
"display_name": "Lazyguru", | ||
"bio": "I am a lazy guru", | ||
"matrix_user_id": "@lazyguru:discuss.online", | ||
"private_key": "some super secure string", | ||
"public_key": "the public key" | ||
}` | ||
err = ch.ExchangeDeclare( | ||
"federation", // name | ||
"direct", // type | ||
|