summaryrefslogtreecommitdiffstats
path: root/model/webrtc.go
blob: e746d62a8ca063f9e37c6558e3dc1f360b0ef6ad (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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
	}
}