518 lines
20 KiB
Go
518 lines
20 KiB
Go
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||
// versions:
|
||
// - protoc-gen-go-grpc v1.5.1
|
||
// - protoc (unknown)
|
||
// source: live_sfu.proto
|
||
|
||
package gen
|
||
|
||
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 (
|
||
LiveSFU_GetConfig_FullMethodName = "/gospeak.livedemo.v1.LiveSFU/GetConfig"
|
||
LiveSFU_ListRooms_FullMethodName = "/gospeak.livedemo.v1.LiveSFU/ListRooms"
|
||
LiveSFU_Publish_FullMethodName = "/gospeak.livedemo.v1.LiveSFU/Publish"
|
||
LiveSFU_Subscribe_FullMethodName = "/gospeak.livedemo.v1.LiveSFU/Subscribe"
|
||
LiveSFU_StopStream_FullMethodName = "/gospeak.livedemo.v1.LiveSFU/StopStream"
|
||
LiveSFU_WatchRoom_FullMethodName = "/gospeak.livedemo.v1.LiveSFU/WatchRoom"
|
||
LiveSFU_Login_FullMethodName = "/gospeak.livedemo.v1.LiveSFU/Login"
|
||
LiveSFU_Register_FullMethodName = "/gospeak.livedemo.v1.LiveSFU/Register"
|
||
LiveSFU_GetMe_FullMethodName = "/gospeak.livedemo.v1.LiveSFU/GetMe"
|
||
LiveSFU_ListUsers_FullMethodName = "/gospeak.livedemo.v1.LiveSFU/ListUsers"
|
||
LiveSFU_UpdateUserRole_FullMethodName = "/gospeak.livedemo.v1.LiveSFU/UpdateUserRole"
|
||
)
|
||
|
||
// LiveSFUClient is the client API for LiveSFU 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.
|
||
//
|
||
// LiveSFU 是直播 SFU 分流 Demo 的控制面契约(protobuf / gRPC)。
|
||
//
|
||
// 媒体面(WebRTC SDP 交换)不在此契约内:浏览器与 Cloudflare Realtime / SRS
|
||
// 直连,经本服务反向代理转发(服务端注入 AppSecret / stream token)。
|
||
// 本契约只负责房间、后端、发布/订阅拓扑的协调与扇出状态广播。
|
||
type LiveSFUClient interface {
|
||
GetConfig(ctx context.Context, in *GetConfigRequest, opts ...grpc.CallOption) (*GetConfigResponse, error)
|
||
ListRooms(ctx context.Context, in *ListRoomsRequest, opts ...grpc.CallOption) (*ListRoomsResponse, error)
|
||
Publish(ctx context.Context, in *PublishRequest, opts ...grpc.CallOption) (*PublishResponse, error)
|
||
Subscribe(ctx context.Context, in *SubscribeRequest, opts ...grpc.CallOption) (*SubscribeResponse, error)
|
||
StopStream(ctx context.Context, in *StopStreamRequest, opts ...grpc.CallOption) (*StopStreamResponse, error)
|
||
WatchRoom(ctx context.Context, in *WatchRoomRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[RoomEvent], error)
|
||
// ---- Auth & Casbin ----
|
||
Login(ctx context.Context, in *LoginRequest, opts ...grpc.CallOption) (*LoginResponse, error)
|
||
Register(ctx context.Context, in *RegisterRequest, opts ...grpc.CallOption) (*RegisterResponse, error)
|
||
GetMe(ctx context.Context, in *GetMeRequest, opts ...grpc.CallOption) (*GetMeResponse, error)
|
||
ListUsers(ctx context.Context, in *ListUsersRequest, opts ...grpc.CallOption) (*ListUsersResponse, error)
|
||
UpdateUserRole(ctx context.Context, in *UpdateUserRoleRequest, opts ...grpc.CallOption) (*UpdateUserRoleResponse, error)
|
||
}
|
||
|
||
type liveSFUClient struct {
|
||
cc grpc.ClientConnInterface
|
||
}
|
||
|
||
func NewLiveSFUClient(cc grpc.ClientConnInterface) LiveSFUClient {
|
||
return &liveSFUClient{cc}
|
||
}
|
||
|
||
func (c *liveSFUClient) GetConfig(ctx context.Context, in *GetConfigRequest, opts ...grpc.CallOption) (*GetConfigResponse, error) {
|
||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||
out := new(GetConfigResponse)
|
||
err := c.cc.Invoke(ctx, LiveSFU_GetConfig_FullMethodName, in, out, cOpts...)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
return out, nil
|
||
}
|
||
|
||
func (c *liveSFUClient) ListRooms(ctx context.Context, in *ListRoomsRequest, opts ...grpc.CallOption) (*ListRoomsResponse, error) {
|
||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||
out := new(ListRoomsResponse)
|
||
err := c.cc.Invoke(ctx, LiveSFU_ListRooms_FullMethodName, in, out, cOpts...)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
return out, nil
|
||
}
|
||
|
||
func (c *liveSFUClient) Publish(ctx context.Context, in *PublishRequest, opts ...grpc.CallOption) (*PublishResponse, error) {
|
||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||
out := new(PublishResponse)
|
||
err := c.cc.Invoke(ctx, LiveSFU_Publish_FullMethodName, in, out, cOpts...)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
return out, nil
|
||
}
|
||
|
||
func (c *liveSFUClient) Subscribe(ctx context.Context, in *SubscribeRequest, opts ...grpc.CallOption) (*SubscribeResponse, error) {
|
||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||
out := new(SubscribeResponse)
|
||
err := c.cc.Invoke(ctx, LiveSFU_Subscribe_FullMethodName, in, out, cOpts...)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
return out, nil
|
||
}
|
||
|
||
func (c *liveSFUClient) StopStream(ctx context.Context, in *StopStreamRequest, opts ...grpc.CallOption) (*StopStreamResponse, error) {
|
||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||
out := new(StopStreamResponse)
|
||
err := c.cc.Invoke(ctx, LiveSFU_StopStream_FullMethodName, in, out, cOpts...)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
return out, nil
|
||
}
|
||
|
||
func (c *liveSFUClient) WatchRoom(ctx context.Context, in *WatchRoomRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[RoomEvent], error) {
|
||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||
stream, err := c.cc.NewStream(ctx, &LiveSFU_ServiceDesc.Streams[0], LiveSFU_WatchRoom_FullMethodName, cOpts...)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
x := &grpc.GenericClientStream[WatchRoomRequest, RoomEvent]{ClientStream: stream}
|
||
if err := x.ClientStream.SendMsg(in); err != nil {
|
||
return nil, err
|
||
}
|
||
if err := x.ClientStream.CloseSend(); err != nil {
|
||
return nil, err
|
||
}
|
||
return x, nil
|
||
}
|
||
|
||
// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
|
||
type LiveSFU_WatchRoomClient = grpc.ServerStreamingClient[RoomEvent]
|
||
|
||
func (c *liveSFUClient) Login(ctx context.Context, in *LoginRequest, opts ...grpc.CallOption) (*LoginResponse, error) {
|
||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||
out := new(LoginResponse)
|
||
err := c.cc.Invoke(ctx, LiveSFU_Login_FullMethodName, in, out, cOpts...)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
return out, nil
|
||
}
|
||
|
||
func (c *liveSFUClient) Register(ctx context.Context, in *RegisterRequest, opts ...grpc.CallOption) (*RegisterResponse, error) {
|
||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||
out := new(RegisterResponse)
|
||
err := c.cc.Invoke(ctx, LiveSFU_Register_FullMethodName, in, out, cOpts...)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
return out, nil
|
||
}
|
||
|
||
func (c *liveSFUClient) GetMe(ctx context.Context, in *GetMeRequest, opts ...grpc.CallOption) (*GetMeResponse, error) {
|
||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||
out := new(GetMeResponse)
|
||
err := c.cc.Invoke(ctx, LiveSFU_GetMe_FullMethodName, in, out, cOpts...)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
return out, nil
|
||
}
|
||
|
||
func (c *liveSFUClient) ListUsers(ctx context.Context, in *ListUsersRequest, opts ...grpc.CallOption) (*ListUsersResponse, error) {
|
||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||
out := new(ListUsersResponse)
|
||
err := c.cc.Invoke(ctx, LiveSFU_ListUsers_FullMethodName, in, out, cOpts...)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
return out, nil
|
||
}
|
||
|
||
func (c *liveSFUClient) UpdateUserRole(ctx context.Context, in *UpdateUserRoleRequest, opts ...grpc.CallOption) (*UpdateUserRoleResponse, error) {
|
||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||
out := new(UpdateUserRoleResponse)
|
||
err := c.cc.Invoke(ctx, LiveSFU_UpdateUserRole_FullMethodName, in, out, cOpts...)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
return out, nil
|
||
}
|
||
|
||
// LiveSFUServer is the server API for LiveSFU service.
|
||
// All implementations should embed UnimplementedLiveSFUServer
|
||
// for forward compatibility.
|
||
//
|
||
// LiveSFU 是直播 SFU 分流 Demo 的控制面契约(protobuf / gRPC)。
|
||
//
|
||
// 媒体面(WebRTC SDP 交换)不在此契约内:浏览器与 Cloudflare Realtime / SRS
|
||
// 直连,经本服务反向代理转发(服务端注入 AppSecret / stream token)。
|
||
// 本契约只负责房间、后端、发布/订阅拓扑的协调与扇出状态广播。
|
||
type LiveSFUServer interface {
|
||
GetConfig(context.Context, *GetConfigRequest) (*GetConfigResponse, error)
|
||
ListRooms(context.Context, *ListRoomsRequest) (*ListRoomsResponse, error)
|
||
Publish(context.Context, *PublishRequest) (*PublishResponse, error)
|
||
Subscribe(context.Context, *SubscribeRequest) (*SubscribeResponse, error)
|
||
StopStream(context.Context, *StopStreamRequest) (*StopStreamResponse, error)
|
||
WatchRoom(*WatchRoomRequest, grpc.ServerStreamingServer[RoomEvent]) error
|
||
// ---- Auth & Casbin ----
|
||
Login(context.Context, *LoginRequest) (*LoginResponse, error)
|
||
Register(context.Context, *RegisterRequest) (*RegisterResponse, error)
|
||
GetMe(context.Context, *GetMeRequest) (*GetMeResponse, error)
|
||
ListUsers(context.Context, *ListUsersRequest) (*ListUsersResponse, error)
|
||
UpdateUserRole(context.Context, *UpdateUserRoleRequest) (*UpdateUserRoleResponse, error)
|
||
}
|
||
|
||
// UnimplementedLiveSFUServer should 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 UnimplementedLiveSFUServer struct{}
|
||
|
||
func (UnimplementedLiveSFUServer) GetConfig(context.Context, *GetConfigRequest) (*GetConfigResponse, error) {
|
||
return nil, status.Errorf(codes.Unimplemented, "method GetConfig not implemented")
|
||
}
|
||
func (UnimplementedLiveSFUServer) ListRooms(context.Context, *ListRoomsRequest) (*ListRoomsResponse, error) {
|
||
return nil, status.Errorf(codes.Unimplemented, "method ListRooms not implemented")
|
||
}
|
||
func (UnimplementedLiveSFUServer) Publish(context.Context, *PublishRequest) (*PublishResponse, error) {
|
||
return nil, status.Errorf(codes.Unimplemented, "method Publish not implemented")
|
||
}
|
||
func (UnimplementedLiveSFUServer) Subscribe(context.Context, *SubscribeRequest) (*SubscribeResponse, error) {
|
||
return nil, status.Errorf(codes.Unimplemented, "method Subscribe not implemented")
|
||
}
|
||
func (UnimplementedLiveSFUServer) StopStream(context.Context, *StopStreamRequest) (*StopStreamResponse, error) {
|
||
return nil, status.Errorf(codes.Unimplemented, "method StopStream not implemented")
|
||
}
|
||
func (UnimplementedLiveSFUServer) WatchRoom(*WatchRoomRequest, grpc.ServerStreamingServer[RoomEvent]) error {
|
||
return status.Errorf(codes.Unimplemented, "method WatchRoom not implemented")
|
||
}
|
||
func (UnimplementedLiveSFUServer) Login(context.Context, *LoginRequest) (*LoginResponse, error) {
|
||
return nil, status.Errorf(codes.Unimplemented, "method Login not implemented")
|
||
}
|
||
func (UnimplementedLiveSFUServer) Register(context.Context, *RegisterRequest) (*RegisterResponse, error) {
|
||
return nil, status.Errorf(codes.Unimplemented, "method Register not implemented")
|
||
}
|
||
func (UnimplementedLiveSFUServer) GetMe(context.Context, *GetMeRequest) (*GetMeResponse, error) {
|
||
return nil, status.Errorf(codes.Unimplemented, "method GetMe not implemented")
|
||
}
|
||
func (UnimplementedLiveSFUServer) ListUsers(context.Context, *ListUsersRequest) (*ListUsersResponse, error) {
|
||
return nil, status.Errorf(codes.Unimplemented, "method ListUsers not implemented")
|
||
}
|
||
func (UnimplementedLiveSFUServer) UpdateUserRole(context.Context, *UpdateUserRoleRequest) (*UpdateUserRoleResponse, error) {
|
||
return nil, status.Errorf(codes.Unimplemented, "method UpdateUserRole not implemented")
|
||
}
|
||
func (UnimplementedLiveSFUServer) testEmbeddedByValue() {}
|
||
|
||
// UnsafeLiveSFUServer may be embedded to opt out of forward compatibility for this service.
|
||
// Use of this interface is not recommended, as added methods to LiveSFUServer will
|
||
// result in compilation errors.
|
||
type UnsafeLiveSFUServer interface {
|
||
mustEmbedUnimplementedLiveSFUServer()
|
||
}
|
||
|
||
func RegisterLiveSFUServer(s grpc.ServiceRegistrar, srv LiveSFUServer) {
|
||
// If the following call pancis, it indicates UnimplementedLiveSFUServer 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(&LiveSFU_ServiceDesc, srv)
|
||
}
|
||
|
||
func _LiveSFU_GetConfig_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||
in := new(GetConfigRequest)
|
||
if err := dec(in); err != nil {
|
||
return nil, err
|
||
}
|
||
if interceptor == nil {
|
||
return srv.(LiveSFUServer).GetConfig(ctx, in)
|
||
}
|
||
info := &grpc.UnaryServerInfo{
|
||
Server: srv,
|
||
FullMethod: LiveSFU_GetConfig_FullMethodName,
|
||
}
|
||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||
return srv.(LiveSFUServer).GetConfig(ctx, req.(*GetConfigRequest))
|
||
}
|
||
return interceptor(ctx, in, info, handler)
|
||
}
|
||
|
||
func _LiveSFU_ListRooms_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||
in := new(ListRoomsRequest)
|
||
if err := dec(in); err != nil {
|
||
return nil, err
|
||
}
|
||
if interceptor == nil {
|
||
return srv.(LiveSFUServer).ListRooms(ctx, in)
|
||
}
|
||
info := &grpc.UnaryServerInfo{
|
||
Server: srv,
|
||
FullMethod: LiveSFU_ListRooms_FullMethodName,
|
||
}
|
||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||
return srv.(LiveSFUServer).ListRooms(ctx, req.(*ListRoomsRequest))
|
||
}
|
||
return interceptor(ctx, in, info, handler)
|
||
}
|
||
|
||
func _LiveSFU_Publish_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||
in := new(PublishRequest)
|
||
if err := dec(in); err != nil {
|
||
return nil, err
|
||
}
|
||
if interceptor == nil {
|
||
return srv.(LiveSFUServer).Publish(ctx, in)
|
||
}
|
||
info := &grpc.UnaryServerInfo{
|
||
Server: srv,
|
||
FullMethod: LiveSFU_Publish_FullMethodName,
|
||
}
|
||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||
return srv.(LiveSFUServer).Publish(ctx, req.(*PublishRequest))
|
||
}
|
||
return interceptor(ctx, in, info, handler)
|
||
}
|
||
|
||
func _LiveSFU_Subscribe_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||
in := new(SubscribeRequest)
|
||
if err := dec(in); err != nil {
|
||
return nil, err
|
||
}
|
||
if interceptor == nil {
|
||
return srv.(LiveSFUServer).Subscribe(ctx, in)
|
||
}
|
||
info := &grpc.UnaryServerInfo{
|
||
Server: srv,
|
||
FullMethod: LiveSFU_Subscribe_FullMethodName,
|
||
}
|
||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||
return srv.(LiveSFUServer).Subscribe(ctx, req.(*SubscribeRequest))
|
||
}
|
||
return interceptor(ctx, in, info, handler)
|
||
}
|
||
|
||
func _LiveSFU_StopStream_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||
in := new(StopStreamRequest)
|
||
if err := dec(in); err != nil {
|
||
return nil, err
|
||
}
|
||
if interceptor == nil {
|
||
return srv.(LiveSFUServer).StopStream(ctx, in)
|
||
}
|
||
info := &grpc.UnaryServerInfo{
|
||
Server: srv,
|
||
FullMethod: LiveSFU_StopStream_FullMethodName,
|
||
}
|
||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||
return srv.(LiveSFUServer).StopStream(ctx, req.(*StopStreamRequest))
|
||
}
|
||
return interceptor(ctx, in, info, handler)
|
||
}
|
||
|
||
func _LiveSFU_WatchRoom_Handler(srv interface{}, stream grpc.ServerStream) error {
|
||
m := new(WatchRoomRequest)
|
||
if err := stream.RecvMsg(m); err != nil {
|
||
return err
|
||
}
|
||
return srv.(LiveSFUServer).WatchRoom(m, &grpc.GenericServerStream[WatchRoomRequest, RoomEvent]{ServerStream: stream})
|
||
}
|
||
|
||
// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
|
||
type LiveSFU_WatchRoomServer = grpc.ServerStreamingServer[RoomEvent]
|
||
|
||
func _LiveSFU_Login_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||
in := new(LoginRequest)
|
||
if err := dec(in); err != nil {
|
||
return nil, err
|
||
}
|
||
if interceptor == nil {
|
||
return srv.(LiveSFUServer).Login(ctx, in)
|
||
}
|
||
info := &grpc.UnaryServerInfo{
|
||
Server: srv,
|
||
FullMethod: LiveSFU_Login_FullMethodName,
|
||
}
|
||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||
return srv.(LiveSFUServer).Login(ctx, req.(*LoginRequest))
|
||
}
|
||
return interceptor(ctx, in, info, handler)
|
||
}
|
||
|
||
func _LiveSFU_Register_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||
in := new(RegisterRequest)
|
||
if err := dec(in); err != nil {
|
||
return nil, err
|
||
}
|
||
if interceptor == nil {
|
||
return srv.(LiveSFUServer).Register(ctx, in)
|
||
}
|
||
info := &grpc.UnaryServerInfo{
|
||
Server: srv,
|
||
FullMethod: LiveSFU_Register_FullMethodName,
|
||
}
|
||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||
return srv.(LiveSFUServer).Register(ctx, req.(*RegisterRequest))
|
||
}
|
||
return interceptor(ctx, in, info, handler)
|
||
}
|
||
|
||
func _LiveSFU_GetMe_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||
in := new(GetMeRequest)
|
||
if err := dec(in); err != nil {
|
||
return nil, err
|
||
}
|
||
if interceptor == nil {
|
||
return srv.(LiveSFUServer).GetMe(ctx, in)
|
||
}
|
||
info := &grpc.UnaryServerInfo{
|
||
Server: srv,
|
||
FullMethod: LiveSFU_GetMe_FullMethodName,
|
||
}
|
||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||
return srv.(LiveSFUServer).GetMe(ctx, req.(*GetMeRequest))
|
||
}
|
||
return interceptor(ctx, in, info, handler)
|
||
}
|
||
|
||
func _LiveSFU_ListUsers_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||
in := new(ListUsersRequest)
|
||
if err := dec(in); err != nil {
|
||
return nil, err
|
||
}
|
||
if interceptor == nil {
|
||
return srv.(LiveSFUServer).ListUsers(ctx, in)
|
||
}
|
||
info := &grpc.UnaryServerInfo{
|
||
Server: srv,
|
||
FullMethod: LiveSFU_ListUsers_FullMethodName,
|
||
}
|
||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||
return srv.(LiveSFUServer).ListUsers(ctx, req.(*ListUsersRequest))
|
||
}
|
||
return interceptor(ctx, in, info, handler)
|
||
}
|
||
|
||
func _LiveSFU_UpdateUserRole_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||
in := new(UpdateUserRoleRequest)
|
||
if err := dec(in); err != nil {
|
||
return nil, err
|
||
}
|
||
if interceptor == nil {
|
||
return srv.(LiveSFUServer).UpdateUserRole(ctx, in)
|
||
}
|
||
info := &grpc.UnaryServerInfo{
|
||
Server: srv,
|
||
FullMethod: LiveSFU_UpdateUserRole_FullMethodName,
|
||
}
|
||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||
return srv.(LiveSFUServer).UpdateUserRole(ctx, req.(*UpdateUserRoleRequest))
|
||
}
|
||
return interceptor(ctx, in, info, handler)
|
||
}
|
||
|
||
// LiveSFU_ServiceDesc is the grpc.ServiceDesc for LiveSFU service.
|
||
// It's only intended for direct use with grpc.RegisterService,
|
||
// and not to be introspected or modified (even as a copy)
|
||
var LiveSFU_ServiceDesc = grpc.ServiceDesc{
|
||
ServiceName: "gospeak.livedemo.v1.LiveSFU",
|
||
HandlerType: (*LiveSFUServer)(nil),
|
||
Methods: []grpc.MethodDesc{
|
||
{
|
||
MethodName: "GetConfig",
|
||
Handler: _LiveSFU_GetConfig_Handler,
|
||
},
|
||
{
|
||
MethodName: "ListRooms",
|
||
Handler: _LiveSFU_ListRooms_Handler,
|
||
},
|
||
{
|
||
MethodName: "Publish",
|
||
Handler: _LiveSFU_Publish_Handler,
|
||
},
|
||
{
|
||
MethodName: "Subscribe",
|
||
Handler: _LiveSFU_Subscribe_Handler,
|
||
},
|
||
{
|
||
MethodName: "StopStream",
|
||
Handler: _LiveSFU_StopStream_Handler,
|
||
},
|
||
{
|
||
MethodName: "Login",
|
||
Handler: _LiveSFU_Login_Handler,
|
||
},
|
||
{
|
||
MethodName: "Register",
|
||
Handler: _LiveSFU_Register_Handler,
|
||
},
|
||
{
|
||
MethodName: "GetMe",
|
||
Handler: _LiveSFU_GetMe_Handler,
|
||
},
|
||
{
|
||
MethodName: "ListUsers",
|
||
Handler: _LiveSFU_ListUsers_Handler,
|
||
},
|
||
{
|
||
MethodName: "UpdateUserRole",
|
||
Handler: _LiveSFU_UpdateUserRole_Handler,
|
||
},
|
||
},
|
||
Streams: []grpc.StreamDesc{
|
||
{
|
||
StreamName: "WatchRoom",
|
||
Handler: _LiveSFU_WatchRoom_Handler,
|
||
ServerStreams: true,
|
||
},
|
||
},
|
||
Metadata: "live_sfu.proto",
|
||
}
|