Skip to content

Commit

Permalink
chore: use json logging and json responses
Browse files Browse the repository at this point in the history
  • Loading branch information
im-adithya committed May 28, 2024
1 parent 2ee400c commit b9880c0
Show file tree
Hide file tree
Showing 2 changed files with 147 additions and 49 deletions.
12 changes: 11 additions & 1 deletion internal/nostr/models.go
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ type RequestEvent struct {

type ResponseEvent struct {
ID uint
RequestId *uint
RequestId uint
SubscriptionId uint `validate:"required"`
NostrId string `validate:"required"`
Content string
Expand Down Expand Up @@ -158,6 +158,11 @@ type NIP47Request struct {
SignedEvent *nostr.Event `json:"event"`
}

type NIP47Response struct {
Event *nostr.Event `json:"event,omitempty"`
State string `json:"state"`
}

type PublishRequest struct {
RelayUrl string `json:"relayUrl"`
SignedEvent *nostr.Event `json:"event"`
Expand All @@ -179,3 +184,8 @@ type SubscriptionResponse struct {
SubscriptionId string `json:"subscription_id"`
WebhookUrl string `json:"webhookUrl"`
}

type StopSubscriptionResponse struct {
Message string `json:"message"`
State string `json:"state"`
}
Loading

0 comments on commit b9880c0

Please sign in to comment.