Update generated files.

This commit is contained in:
Joachim Bauch 2025-11-05 16:47:04 +01:00
commit d7252ebd3d
No known key found for this signature in database
GPG key ID: 77C1D22D53E15F02
3 changed files with 417 additions and 6 deletions

229
grpc/room.pb.go Normal file
View file

@ -0,0 +1,229 @@
//*
// Standalone signaling server for the Nextcloud Spreed app.
// Copyright (C) 2025 struktur AG
//
// @author Joachim Bauch <bauch@struktur.de>
//
// @license GNU AGPL version 3 or any later version
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: grpc/room.proto
package grpc
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
unsafe "unsafe"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
type RoomBandwidthRequest struct {
state protoimpl.MessageState `protogen:"open.v1"`
RoomId string `protobuf:"bytes,1,opt,name=roomId,proto3" json:"roomId,omitempty"`
BackendUrls []string `protobuf:"bytes,2,rep,name=backendUrls,proto3" json:"backendUrls,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *RoomBandwidthRequest) Reset() {
*x = RoomBandwidthRequest{}
mi := &file_grpc_room_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *RoomBandwidthRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*RoomBandwidthRequest) ProtoMessage() {}
func (x *RoomBandwidthRequest) ProtoReflect() protoreflect.Message {
mi := &file_grpc_room_proto_msgTypes[0]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use RoomBandwidthRequest.ProtoReflect.Descriptor instead.
func (*RoomBandwidthRequest) Descriptor() ([]byte, []int) {
return file_grpc_room_proto_rawDescGZIP(), []int{0}
}
func (x *RoomBandwidthRequest) GetRoomId() string {
if x != nil {
return x.RoomId
}
return ""
}
func (x *RoomBandwidthRequest) GetBackendUrls() []string {
if x != nil {
return x.BackendUrls
}
return nil
}
type RoomBandwidthReply struct {
state protoimpl.MessageState `protogen:"open.v1"`
Publishers uint32 `protobuf:"varint,1,opt,name=publishers,proto3" json:"publishers,omitempty"`
Subscribers uint32 `protobuf:"varint,2,opt,name=subscribers,proto3" json:"subscribers,omitempty"`
Incoming uint64 `protobuf:"varint,3,opt,name=incoming,proto3" json:"incoming,omitempty"`
Outgoing uint64 `protobuf:"varint,4,opt,name=outgoing,proto3" json:"outgoing,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *RoomBandwidthReply) Reset() {
*x = RoomBandwidthReply{}
mi := &file_grpc_room_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *RoomBandwidthReply) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*RoomBandwidthReply) ProtoMessage() {}
func (x *RoomBandwidthReply) ProtoReflect() protoreflect.Message {
mi := &file_grpc_room_proto_msgTypes[1]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use RoomBandwidthReply.ProtoReflect.Descriptor instead.
func (*RoomBandwidthReply) Descriptor() ([]byte, []int) {
return file_grpc_room_proto_rawDescGZIP(), []int{1}
}
func (x *RoomBandwidthReply) GetPublishers() uint32 {
if x != nil {
return x.Publishers
}
return 0
}
func (x *RoomBandwidthReply) GetSubscribers() uint32 {
if x != nil {
return x.Subscribers
}
return 0
}
func (x *RoomBandwidthReply) GetIncoming() uint64 {
if x != nil {
return x.Incoming
}
return 0
}
func (x *RoomBandwidthReply) GetOutgoing() uint64 {
if x != nil {
return x.Outgoing
}
return 0
}
var File_grpc_room_proto protoreflect.FileDescriptor
const file_grpc_room_proto_rawDesc = "" +
"\n" +
"\x0fgrpc/room.proto\x12\x04grpc\"P\n" +
"\x14RoomBandwidthRequest\x12\x16\n" +
"\x06roomId\x18\x01 \x01(\tR\x06roomId\x12 \n" +
"\vbackendUrls\x18\x02 \x03(\tR\vbackendUrls\"\x8e\x01\n" +
"\x12RoomBandwidthReply\x12\x1e\n" +
"\n" +
"publishers\x18\x01 \x01(\rR\n" +
"publishers\x12 \n" +
"\vsubscribers\x18\x02 \x01(\rR\vsubscribers\x12\x1a\n" +
"\bincoming\x18\x03 \x01(\x04R\bincoming\x12\x1a\n" +
"\boutgoing\x18\x04 \x01(\x04R\boutgoing2V\n" +
"\bRpcRooms\x12J\n" +
"\x10GetRoomBandwidth\x12\x1a.grpc.RoomBandwidthRequest\x1a\x18.grpc.RoomBandwidthReply\"\x00B7Z5github.com/strukturag/nextcloud-spreed-signaling/grpcb\x06proto3"
var (
file_grpc_room_proto_rawDescOnce sync.Once
file_grpc_room_proto_rawDescData []byte
)
func file_grpc_room_proto_rawDescGZIP() []byte {
file_grpc_room_proto_rawDescOnce.Do(func() {
file_grpc_room_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_grpc_room_proto_rawDesc), len(file_grpc_room_proto_rawDesc)))
})
return file_grpc_room_proto_rawDescData
}
var file_grpc_room_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
var file_grpc_room_proto_goTypes = []any{
(*RoomBandwidthRequest)(nil), // 0: grpc.RoomBandwidthRequest
(*RoomBandwidthReply)(nil), // 1: grpc.RoomBandwidthReply
}
var file_grpc_room_proto_depIdxs = []int32{
0, // 0: grpc.RpcRooms.GetRoomBandwidth:input_type -> grpc.RoomBandwidthRequest
1, // 1: grpc.RpcRooms.GetRoomBandwidth:output_type -> grpc.RoomBandwidthReply
1, // [1:2] is the sub-list for method output_type
0, // [0:1] is the sub-list for method input_type
0, // [0:0] is the sub-list for extension type_name
0, // [0:0] is the sub-list for extension extendee
0, // [0:0] is the sub-list for field type_name
}
func init() { file_grpc_room_proto_init() }
func file_grpc_room_proto_init() {
if File_grpc_room_proto != nil {
return
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: unsafe.Slice(unsafe.StringData(file_grpc_room_proto_rawDesc), len(file_grpc_room_proto_rawDesc)),
NumEnums: 0,
NumMessages: 2,
NumExtensions: 0,
NumServices: 1,
},
GoTypes: file_grpc_room_proto_goTypes,
DependencyIndexes: file_grpc_room_proto_depIdxs,
MessageInfos: file_grpc_room_proto_msgTypes,
}.Build()
File_grpc_room_proto = out.File
file_grpc_room_proto_goTypes = nil
file_grpc_room_proto_depIdxs = nil
}

139
grpc/room_grpc.pb.go Normal file
View file

@ -0,0 +1,139 @@
//*
// Standalone signaling server for the Nextcloud Spreed app.
// Copyright (C) 2025 struktur AG
//
// @author Joachim Bauch <bauch@struktur.de>
//
// @license GNU AGPL version 3 or any later version
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// source: grpc/room.proto
package grpc
import (
context "context"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
)
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
// Requires gRPC-Go v1.64.0 or later.
const _ = grpc.SupportPackageIsVersion9
const (
RpcRooms_GetRoomBandwidth_FullMethodName = "/grpc.RpcRooms/GetRoomBandwidth"
)
// RpcRoomsClient is the client API for RpcRooms service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
type RpcRoomsClient interface {
GetRoomBandwidth(ctx context.Context, in *RoomBandwidthRequest, opts ...grpc.CallOption) (*RoomBandwidthReply, error)
}
type rpcRoomsClient struct {
cc grpc.ClientConnInterface
}
func NewRpcRoomsClient(cc grpc.ClientConnInterface) RpcRoomsClient {
return &rpcRoomsClient{cc}
}
func (c *rpcRoomsClient) GetRoomBandwidth(ctx context.Context, in *RoomBandwidthRequest, opts ...grpc.CallOption) (*RoomBandwidthReply, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(RoomBandwidthReply)
err := c.cc.Invoke(ctx, RpcRooms_GetRoomBandwidth_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
// RpcRoomsServer is the server API for RpcRooms service.
// All implementations must embed UnimplementedRpcRoomsServer
// for forward compatibility.
type RpcRoomsServer interface {
GetRoomBandwidth(context.Context, *RoomBandwidthRequest) (*RoomBandwidthReply, error)
mustEmbedUnimplementedRpcRoomsServer()
}
// UnimplementedRpcRoomsServer must be embedded to have
// forward compatible implementations.
//
// NOTE: this should be embedded by value instead of pointer to avoid a nil
// pointer dereference when methods are called.
type UnimplementedRpcRoomsServer struct{}
func (UnimplementedRpcRoomsServer) GetRoomBandwidth(context.Context, *RoomBandwidthRequest) (*RoomBandwidthReply, error) {
return nil, status.Error(codes.Unimplemented, "method GetRoomBandwidth not implemented")
}
func (UnimplementedRpcRoomsServer) mustEmbedUnimplementedRpcRoomsServer() {}
func (UnimplementedRpcRoomsServer) testEmbeddedByValue() {}
// UnsafeRpcRoomsServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to RpcRoomsServer will
// result in compilation errors.
type UnsafeRpcRoomsServer interface {
mustEmbedUnimplementedRpcRoomsServer()
}
func RegisterRpcRoomsServer(s grpc.ServiceRegistrar, srv RpcRoomsServer) {
// If the following call panics, it indicates UnimplementedRpcRoomsServer was
// embedded by pointer and is nil. This will cause panics if an
// unimplemented method is ever invoked, so we test this at initialization
// time to prevent it from happening at runtime later due to I/O.
if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
t.testEmbeddedByValue()
}
s.RegisterService(&RpcRooms_ServiceDesc, srv)
}
func _RpcRooms_GetRoomBandwidth_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(RoomBandwidthRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(RpcRoomsServer).GetRoomBandwidth(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: RpcRooms_GetRoomBandwidth_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(RpcRoomsServer).GetRoomBandwidth(ctx, req.(*RoomBandwidthRequest))
}
return interceptor(ctx, in, info, handler)
}
// RpcRooms_ServiceDesc is the grpc.ServiceDesc for RpcRooms service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var RpcRooms_ServiceDesc = grpc.ServiceDesc{
ServiceName: "grpc.RpcRooms",
HandlerType: (*RpcRoomsServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "GetRoomBandwidth",
Handler: _RpcRooms_GetRoomBandwidth_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "grpc/room.proto",
}

View file

@ -1013,6 +1013,30 @@ func easyjsonC1cedd36DecodeGithubComStrukturagNextcloudSpreedSignalingProxy7(in
(*out.Bandwidth).UnmarshalEasyJSON(in)
}
}
case "clientBandwidths":
if in.IsNull() {
in.Skip()
} else {
in.Delim('{')
if !in.IsDelim('}') {
out.ClientBandwidths = make(map[string]EventServerBandwidth)
} else {
out.ClientBandwidths = nil
}
for !in.IsDelim('}') {
key := string(in.String())
in.WantColon()
var v8 EventServerBandwidth
if in.IsNull() {
in.Skip()
} else {
(v8).UnmarshalEasyJSON(in)
}
(out.ClientBandwidths)[key] = v8
in.WantComma()
}
in.Delim('}')
}
default:
in.SkipRecursive()
}
@ -1052,6 +1076,25 @@ func easyjsonC1cedd36EncodeGithubComStrukturagNextcloudSpreedSignalingProxy7(out
out.RawString(prefix)
(*in.Bandwidth).MarshalEasyJSON(out)
}
if len(in.ClientBandwidths) != 0 {
const prefix string = ",\"clientBandwidths\":"
out.RawString(prefix)
{
out.RawByte('{')
v9First := true
for v9Name, v9Value := range in.ClientBandwidths {
if v9First {
v9First = false
} else {
out.RawByte(',')
}
out.String(string(v9Name))
out.RawByte(':')
(v9Value).MarshalEasyJSON(out)
}
out.RawByte('}')
}
}
out.RawByte('}')
}
@ -1256,9 +1299,9 @@ func easyjsonC1cedd36DecodeGithubComStrukturagNextcloudSpreedSignalingProxy9(in
out.Streams = (out.Streams)[:0]
}
for !in.IsDelim(']') {
var v8 sfu.PublisherStream
easyjsonC1cedd36DecodeGithubComStrukturagNextcloudSpreedSignalingSfu(in, &v8)
out.Streams = append(out.Streams, v8)
var v10 sfu.PublisherStream
easyjsonC1cedd36DecodeGithubComStrukturagNextcloudSpreedSignalingSfu(in, &v10)
out.Streams = append(out.Streams, v10)
in.WantComma()
}
in.Delim(']')
@ -1313,11 +1356,11 @@ func easyjsonC1cedd36EncodeGithubComStrukturagNextcloudSpreedSignalingProxy9(out
}
{
out.RawByte('[')
for v9, v10 := range in.Streams {
if v9 > 0 {
for v11, v12 := range in.Streams {
if v11 > 0 {
out.RawByte(',')
}
easyjsonC1cedd36EncodeGithubComStrukturagNextcloudSpreedSignalingSfu(out, v10)
easyjsonC1cedd36EncodeGithubComStrukturagNextcloudSpreedSignalingSfu(out, v12)
}
out.RawByte(']')
}