From 772b57386f4dd6bca97e7b7508e9c286bb60502f Mon Sep 17 00:00:00 2001 From: enahum Date: Fri, 4 Nov 2016 13:05:32 -0300 Subject: PLT-4550 move webrtc to TE (#4440) * PLT-4550 move webrtc to TE * remove webrtc from makefile enterprise tests --- model/license.go | 6 ------ model/webrtc.go | 21 +++++++++++++++++++++ 2 files changed, 21 insertions(+), 6 deletions(-) create mode 100644 model/webrtc.go (limited to 'model') diff --git a/model/license.go b/model/license.go index ed38ea438..8d8d0068f 100644 --- a/model/license.go +++ b/model/license.go @@ -44,7 +44,6 @@ type Features struct { SAML *bool `json:"saml"` PasswordRequirements *bool `json:"password_requirements"` // after we enabled more features for webrtc we'll need to control them with this - Webrtc *bool `json:"webrtc"` FutureFeatures *bool `json:"future_features"` } @@ -124,11 +123,6 @@ func (f *Features) SetDefaults() { f.PasswordRequirements = new(bool) *f.PasswordRequirements = *f.FutureFeatures } - - if f.Webrtc == nil { - f.Webrtc = new(bool) - *f.Webrtc = *f.FutureFeatures - } } func (l *License) IsExpired() bool { diff --git a/model/webrtc.go b/model/webrtc.go new file mode 100644 index 000000000..e746d62a8 --- /dev/null +++ b/model/webrtc.go @@ -0,0 +1,21 @@ +package model + +import ( + "encoding/json" + "io" +) + +type GatewayResponse struct { + Status string `json:"janus"` +} + +func GatewayResponseFromJson(data io.Reader) *GatewayResponse { + decoder := json.NewDecoder(data) + var o GatewayResponse + err := decoder.Decode(&o) + if err == nil { + return &o + } else { + return nil + } +} -- cgit v1.2.3-1-g7c22