mirror of
https://github.com/42wim/matterbridge.git
synced 2024-11-16 00:49:26 +01:00
22 lines
318 B
Go
22 lines
318 B
Go
|
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
|
||
|
}
|
||
|
}
|