-
Notifications
You must be signed in to change notification settings - Fork 467
/
requests.go
27 lines (23 loc) · 896 Bytes
/
requests.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
// ------------------------------------------------------------
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
// ------------------------------------------------------------
package pubsub
// PublishRequest is the request to publish a message
type PublishRequest struct {
Data []byte `json:"data"`
PubsubName string `json:"pubsubname"`
Topic string `json:"topic"`
Metadata map[string]string `json:"metadata"`
}
// SubscribeRequest is the request to subscribe to a topic
type SubscribeRequest struct {
Topic string `json:"topic"`
Metadata map[string]string `json:"metadata"`
}
// NewMessage is an event arriving from a message bus instance
type NewMessage struct {
Data []byte `json:"data"`
Topic string `json:"topic"`
Metadata map[string]string `json:"metadata"`
}