-
-
Notifications
You must be signed in to change notification settings - Fork 586
/
encode_response_gen.go
82 lines (64 loc) · 2.26 KB
/
encode_response_gen.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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
// Code generated by internal/gen/api/main.go. DO NOT EDIT.
package apiproto
import "encoding/json"
// JSONResponseEncoder ...
type JSONResponseEncoder struct{}
func NewJSONResponseEncoder() *JSONResponseEncoder {
return &JSONResponseEncoder{}
}
// EncodeBatch ...
func (e *JSONResponseEncoder) EncodeBatch(response *BatchResponse) ([]byte, error) {
return json.Marshal(response)
}
// EncodePublish ...
func (e *JSONResponseEncoder) EncodePublish(response *PublishResponse) ([]byte, error) {
return json.Marshal(response)
}
// EncodeBroadcast ...
func (e *JSONResponseEncoder) EncodeBroadcast(response *BroadcastResponse) ([]byte, error) {
return json.Marshal(response)
}
// EncodeSubscribe ...
func (e *JSONResponseEncoder) EncodeSubscribe(response *SubscribeResponse) ([]byte, error) {
return json.Marshal(response)
}
// EncodeUnsubscribe ...
func (e *JSONResponseEncoder) EncodeUnsubscribe(response *UnsubscribeResponse) ([]byte, error) {
return json.Marshal(response)
}
// EncodeDisconnect ...
func (e *JSONResponseEncoder) EncodeDisconnect(response *DisconnectResponse) ([]byte, error) {
return json.Marshal(response)
}
// EncodePresence ...
func (e *JSONResponseEncoder) EncodePresence(response *PresenceResponse) ([]byte, error) {
return json.Marshal(response)
}
// EncodePresenceStats ...
func (e *JSONResponseEncoder) EncodePresenceStats(response *PresenceStatsResponse) ([]byte, error) {
return json.Marshal(response)
}
// EncodeHistory ...
func (e *JSONResponseEncoder) EncodeHistory(response *HistoryResponse) ([]byte, error) {
return json.Marshal(response)
}
// EncodeHistoryRemove ...
func (e *JSONResponseEncoder) EncodeHistoryRemove(response *HistoryRemoveResponse) ([]byte, error) {
return json.Marshal(response)
}
// EncodeInfo ...
func (e *JSONResponseEncoder) EncodeInfo(response *InfoResponse) ([]byte, error) {
return json.Marshal(response)
}
// EncodeRPC ...
func (e *JSONResponseEncoder) EncodeRPC(response *RPCResponse) ([]byte, error) {
return json.Marshal(response)
}
// EncodeRefresh ...
func (e *JSONResponseEncoder) EncodeRefresh(response *RefreshResponse) ([]byte, error) {
return json.Marshal(response)
}
// EncodeChannels ...
func (e *JSONResponseEncoder) EncodeChannels(response *ChannelsResponse) ([]byte, error) {
return json.Marshal(response)
}