From 7267a0c92d798a47b391e22a0539437343e37b18 Mon Sep 17 00:00:00 2001 From: Joachim Bauch Date: Mon, 16 May 2022 15:13:50 +0200 Subject: [PATCH] Processed classes implement the "json.Marshaler/Unmarshaler" interfaces. --- api_backend.go | 9 +++++++++ api_proxy.go | 7 +++++++ api_signaling.go | 6 ++++++ 3 files changed, 22 insertions(+) diff --git a/api_backend.go b/api_backend.go index 021d343..58ee9c7 100644 --- a/api_backend.go +++ b/api_backend.go @@ -149,6 +149,9 @@ type BackendClientAuthRequest struct { } type BackendClientRequest struct { + json.Marshaler + json.Unmarshaler + Type string `json:"type"` Auth *BackendClientAuthRequest `json:"auth,omitempty"` @@ -171,6 +174,9 @@ func NewBackendClientAuthRequest(params *json.RawMessage) *BackendClientRequest } type BackendClientResponse struct { + json.Marshaler + json.Unmarshaler + Type string `json:"type"` Error *Error `json:"error,omitempty"` @@ -302,6 +308,9 @@ type OcsBody struct { } type OcsResponse struct { + json.Marshaler + json.Unmarshaler + Ocs *OcsBody `json:"ocs"` } diff --git a/api_proxy.go b/api_proxy.go index 7192410..8f511bc 100644 --- a/api_proxy.go +++ b/api_proxy.go @@ -22,12 +22,16 @@ package signaling import ( + "encoding/json" "fmt" "github.com/golang-jwt/jwt" ) type ProxyClientMessage struct { + json.Marshaler + json.Unmarshaler + // The unique request id (optional). Id string `json:"id,omitempty"` @@ -91,6 +95,9 @@ func (m *ProxyClientMessage) NewWrappedErrorServerMessage(e error) *ProxyServerM // ProxyServerMessage is a message that is sent from the server to a client. type ProxyServerMessage struct { + json.Marshaler + json.Unmarshaler + Id string `json:"id,omitempty"` Type string `json:"type"` diff --git a/api_signaling.go b/api_signaling.go index b740b72..cef25c8 100644 --- a/api_signaling.go +++ b/api_signaling.go @@ -35,6 +35,9 @@ const ( // ClientMessage is a message that is sent from a client to the server. type ClientMessage struct { + json.Marshaler + json.Unmarshaler + // The unique request id (optional). Id string `json:"id,omitempty"` @@ -129,6 +132,9 @@ func (m *ClientMessage) NewWrappedErrorServerMessage(e error) *ServerMessage { // ServerMessage is a message that is sent from the server to a client. type ServerMessage struct { + json.Marshaler + json.Unmarshaler + Id string `json:"id,omitempty"` Type string `json:"type"`