mirror of
https://github.com/strukturag/nextcloud-spreed-signaling
synced 2026-03-14 14:35:44 +01:00
Update generated files.
This commit is contained in:
parent
6756520447
commit
f407b98443
2 changed files with 633 additions and 451 deletions
File diff suppressed because it is too large
Load diff
308
etcd/api_easyjson.go
Normal file
308
etcd/api_easyjson.go
Normal file
|
|
@ -0,0 +1,308 @@
|
|||
// Code generated by easyjson for marshaling/unmarshaling. DO NOT EDIT.
|
||||
|
||||
package etcd
|
||||
|
||||
import (
|
||||
json "encoding/json"
|
||||
easyjson "github.com/mailru/easyjson"
|
||||
jlexer "github.com/mailru/easyjson/jlexer"
|
||||
jwriter "github.com/mailru/easyjson/jwriter"
|
||||
api "github.com/strukturag/nextcloud-spreed-signaling/api"
|
||||
)
|
||||
|
||||
// suppress unused package warning
|
||||
var (
|
||||
_ *json.RawMessage
|
||||
_ *jlexer.Lexer
|
||||
_ *jwriter.Writer
|
||||
_ easyjson.Marshaler
|
||||
)
|
||||
|
||||
func easyjsonC1cedd36DecodeGithubComStrukturagNextcloudSpreedSignalingEtcd(in *jlexer.Lexer, out *BackendServerInfoEtcd) {
|
||||
isTopLevel := in.IsStart()
|
||||
if in.IsNull() {
|
||||
if isTopLevel {
|
||||
in.Consumed()
|
||||
}
|
||||
in.Skip()
|
||||
return
|
||||
}
|
||||
in.Delim('{')
|
||||
for !in.IsDelim('}') {
|
||||
key := in.UnsafeFieldName(false)
|
||||
in.WantColon()
|
||||
switch key {
|
||||
case "endpoints":
|
||||
if in.IsNull() {
|
||||
in.Skip()
|
||||
out.Endpoints = nil
|
||||
} else {
|
||||
in.Delim('[')
|
||||
if out.Endpoints == nil {
|
||||
if !in.IsDelim(']') {
|
||||
out.Endpoints = make([]string, 0, 4)
|
||||
} else {
|
||||
out.Endpoints = []string{}
|
||||
}
|
||||
} else {
|
||||
out.Endpoints = (out.Endpoints)[:0]
|
||||
}
|
||||
for !in.IsDelim(']') {
|
||||
var v1 string
|
||||
if in.IsNull() {
|
||||
in.Skip()
|
||||
} else {
|
||||
v1 = string(in.String())
|
||||
}
|
||||
out.Endpoints = append(out.Endpoints, v1)
|
||||
in.WantComma()
|
||||
}
|
||||
in.Delim(']')
|
||||
}
|
||||
case "active":
|
||||
if in.IsNull() {
|
||||
in.Skip()
|
||||
} else {
|
||||
out.Active = string(in.String())
|
||||
}
|
||||
case "connected":
|
||||
if in.IsNull() {
|
||||
in.Skip()
|
||||
out.Connected = nil
|
||||
} else {
|
||||
if out.Connected == nil {
|
||||
out.Connected = new(bool)
|
||||
}
|
||||
if in.IsNull() {
|
||||
in.Skip()
|
||||
} else {
|
||||
*out.Connected = bool(in.Bool())
|
||||
}
|
||||
}
|
||||
default:
|
||||
in.SkipRecursive()
|
||||
}
|
||||
in.WantComma()
|
||||
}
|
||||
in.Delim('}')
|
||||
if isTopLevel {
|
||||
in.Consumed()
|
||||
}
|
||||
}
|
||||
func easyjsonC1cedd36EncodeGithubComStrukturagNextcloudSpreedSignalingEtcd(out *jwriter.Writer, in BackendServerInfoEtcd) {
|
||||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
{
|
||||
const prefix string = ",\"endpoints\":"
|
||||
out.RawString(prefix[1:])
|
||||
if in.Endpoints == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
out.RawByte('[')
|
||||
for v2, v3 := range in.Endpoints {
|
||||
if v2 > 0 {
|
||||
out.RawByte(',')
|
||||
}
|
||||
out.String(string(v3))
|
||||
}
|
||||
out.RawByte(']')
|
||||
}
|
||||
}
|
||||
if in.Active != "" {
|
||||
const prefix string = ",\"active\":"
|
||||
out.RawString(prefix)
|
||||
out.String(string(in.Active))
|
||||
}
|
||||
if in.Connected != nil {
|
||||
const prefix string = ",\"connected\":"
|
||||
out.RawString(prefix)
|
||||
out.Bool(bool(*in.Connected))
|
||||
}
|
||||
out.RawByte('}')
|
||||
}
|
||||
|
||||
// MarshalJSON supports json.Marshaler interface
|
||||
func (v BackendServerInfoEtcd) MarshalJSON() ([]byte, error) {
|
||||
w := jwriter.Writer{}
|
||||
easyjsonC1cedd36EncodeGithubComStrukturagNextcloudSpreedSignalingEtcd(&w, v)
|
||||
return w.Buffer.BuildBytes(), w.Error
|
||||
}
|
||||
|
||||
// MarshalEasyJSON supports easyjson.Marshaler interface
|
||||
func (v BackendServerInfoEtcd) MarshalEasyJSON(w *jwriter.Writer) {
|
||||
easyjsonC1cedd36EncodeGithubComStrukturagNextcloudSpreedSignalingEtcd(w, v)
|
||||
}
|
||||
|
||||
// UnmarshalJSON supports json.Unmarshaler interface
|
||||
func (v *BackendServerInfoEtcd) UnmarshalJSON(data []byte) error {
|
||||
r := jlexer.Lexer{Data: data}
|
||||
easyjsonC1cedd36DecodeGithubComStrukturagNextcloudSpreedSignalingEtcd(&r, v)
|
||||
return r.Error()
|
||||
}
|
||||
|
||||
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
||||
func (v *BackendServerInfoEtcd) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
||||
easyjsonC1cedd36DecodeGithubComStrukturagNextcloudSpreedSignalingEtcd(l, v)
|
||||
}
|
||||
func easyjsonC1cedd36DecodeGithubComStrukturagNextcloudSpreedSignalingEtcd1(in *jlexer.Lexer, out *BackendInformationEtcd) {
|
||||
isTopLevel := in.IsStart()
|
||||
if in.IsNull() {
|
||||
if isTopLevel {
|
||||
in.Consumed()
|
||||
}
|
||||
in.Skip()
|
||||
return
|
||||
}
|
||||
in.Delim('{')
|
||||
for !in.IsDelim('}') {
|
||||
key := in.UnsafeFieldName(false)
|
||||
in.WantColon()
|
||||
switch key {
|
||||
case "url":
|
||||
if in.IsNull() {
|
||||
in.Skip()
|
||||
} else {
|
||||
out.Url = string(in.String())
|
||||
}
|
||||
case "urls":
|
||||
if in.IsNull() {
|
||||
in.Skip()
|
||||
out.Urls = nil
|
||||
} else {
|
||||
in.Delim('[')
|
||||
if out.Urls == nil {
|
||||
if !in.IsDelim(']') {
|
||||
out.Urls = make([]string, 0, 4)
|
||||
} else {
|
||||
out.Urls = []string{}
|
||||
}
|
||||
} else {
|
||||
out.Urls = (out.Urls)[:0]
|
||||
}
|
||||
for !in.IsDelim(']') {
|
||||
var v4 string
|
||||
if in.IsNull() {
|
||||
in.Skip()
|
||||
} else {
|
||||
v4 = string(in.String())
|
||||
}
|
||||
out.Urls = append(out.Urls, v4)
|
||||
in.WantComma()
|
||||
}
|
||||
in.Delim(']')
|
||||
}
|
||||
case "secret":
|
||||
if in.IsNull() {
|
||||
in.Skip()
|
||||
} else {
|
||||
out.Secret = string(in.String())
|
||||
}
|
||||
case "maxstreambitrate":
|
||||
if in.IsNull() {
|
||||
in.Skip()
|
||||
} else {
|
||||
out.MaxStreamBitrate = api.Bandwidth(in.Uint64())
|
||||
}
|
||||
case "maxscreenbitrate":
|
||||
if in.IsNull() {
|
||||
in.Skip()
|
||||
} else {
|
||||
out.MaxScreenBitrate = api.Bandwidth(in.Uint64())
|
||||
}
|
||||
case "sessionlimit":
|
||||
if in.IsNull() {
|
||||
in.Skip()
|
||||
} else {
|
||||
out.SessionLimit = uint64(in.Uint64())
|
||||
}
|
||||
default:
|
||||
in.SkipRecursive()
|
||||
}
|
||||
in.WantComma()
|
||||
}
|
||||
in.Delim('}')
|
||||
if isTopLevel {
|
||||
in.Consumed()
|
||||
}
|
||||
}
|
||||
func easyjsonC1cedd36EncodeGithubComStrukturagNextcloudSpreedSignalingEtcd1(out *jwriter.Writer, in BackendInformationEtcd) {
|
||||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
if in.Url != "" {
|
||||
const prefix string = ",\"url\":"
|
||||
first = false
|
||||
out.RawString(prefix[1:])
|
||||
out.String(string(in.Url))
|
||||
}
|
||||
if len(in.Urls) != 0 {
|
||||
const prefix string = ",\"urls\":"
|
||||
if first {
|
||||
first = false
|
||||
out.RawString(prefix[1:])
|
||||
} else {
|
||||
out.RawString(prefix)
|
||||
}
|
||||
{
|
||||
out.RawByte('[')
|
||||
for v5, v6 := range in.Urls {
|
||||
if v5 > 0 {
|
||||
out.RawByte(',')
|
||||
}
|
||||
out.String(string(v6))
|
||||
}
|
||||
out.RawByte(']')
|
||||
}
|
||||
}
|
||||
{
|
||||
const prefix string = ",\"secret\":"
|
||||
if first {
|
||||
first = false
|
||||
out.RawString(prefix[1:])
|
||||
} else {
|
||||
out.RawString(prefix)
|
||||
}
|
||||
out.String(string(in.Secret))
|
||||
}
|
||||
if in.MaxStreamBitrate != 0 {
|
||||
const prefix string = ",\"maxstreambitrate\":"
|
||||
out.RawString(prefix)
|
||||
out.Uint64(uint64(in.MaxStreamBitrate))
|
||||
}
|
||||
if in.MaxScreenBitrate != 0 {
|
||||
const prefix string = ",\"maxscreenbitrate\":"
|
||||
out.RawString(prefix)
|
||||
out.Uint64(uint64(in.MaxScreenBitrate))
|
||||
}
|
||||
if in.SessionLimit != 0 {
|
||||
const prefix string = ",\"sessionlimit\":"
|
||||
out.RawString(prefix)
|
||||
out.Uint64(uint64(in.SessionLimit))
|
||||
}
|
||||
out.RawByte('}')
|
||||
}
|
||||
|
||||
// MarshalJSON supports json.Marshaler interface
|
||||
func (v BackendInformationEtcd) MarshalJSON() ([]byte, error) {
|
||||
w := jwriter.Writer{}
|
||||
easyjsonC1cedd36EncodeGithubComStrukturagNextcloudSpreedSignalingEtcd1(&w, v)
|
||||
return w.Buffer.BuildBytes(), w.Error
|
||||
}
|
||||
|
||||
// MarshalEasyJSON supports easyjson.Marshaler interface
|
||||
func (v BackendInformationEtcd) MarshalEasyJSON(w *jwriter.Writer) {
|
||||
easyjsonC1cedd36EncodeGithubComStrukturagNextcloudSpreedSignalingEtcd1(w, v)
|
||||
}
|
||||
|
||||
// UnmarshalJSON supports json.Unmarshaler interface
|
||||
func (v *BackendInformationEtcd) UnmarshalJSON(data []byte) error {
|
||||
r := jlexer.Lexer{Data: data}
|
||||
easyjsonC1cedd36DecodeGithubComStrukturagNextcloudSpreedSignalingEtcd1(&r, v)
|
||||
return r.Error()
|
||||
}
|
||||
|
||||
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
||||
func (v *BackendInformationEtcd) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
||||
easyjsonC1cedd36DecodeGithubComStrukturagNextcloudSpreedSignalingEtcd1(l, v)
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue