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.6.2
|
||
// - protoc v7.35.1
|
||
// source: sync_live.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 (
|
||
SyncLive_GetConfig_FullMethodName = "/synclive.v1.SyncLive/GetConfig"
|
||
SyncLive_ListRooms_FullMethodName = "/synclive.v1.SyncLive/ListRooms"
|
||
SyncLive_Publish_FullMethodName = "/synclive.v1.SyncLive/Publish"
|
||
SyncLive_Subscribe_FullMethodName = "/synclive.v1.SyncLive/Subscribe"
|
||
SyncLive_StopStream_FullMethodName = "/synclive.v1.SyncLive/StopStream"
|
||
SyncLive_WatchRoom_FullMethodName = "/synclive.v1.SyncLive/WatchRoom"
|
||
SyncLive_Login_FullMethodName = "/synclive.v1.SyncLive/Login"
|
||
SyncLive_Register_FullMethodName = "/synclive.v1.SyncLive/Register"
|
||
SyncLive_GetMe_FullMethodName = "/synclive.v1.SyncLive/GetMe"
|
||
SyncLive_ListUsers_FullMethodName = "/synclive.v1.SyncLive/ListUsers"
|
||
SyncLive_UpdateUserRole_FullMethodName = "/synclive.v1.SyncLive/UpdateUserRole"
|
||
)
|
||
|
||
// SyncLiveClient is the client API for SyncLive 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.
|
||
//
|
||
// SyncLive 是直播 SFU 分流服务的控制面契约(protobuf / gRPC)。
|
||
//
|
||
// 媒体面(WebRTC SDP 交换)不在此契约内:浏览器与 Cloudflare Realtime / SRS
|
||
// 直连,经本服务反向代理转发(服务端注入 AppSecret / stream token)。
|
||
// 本契约只负责房间、后端、发布/订阅拓扑的协调与扇出状态广播。
|
||
type SyncLiveClient 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 syncLiveClient struct {
|
||
cc grpc.ClientConnInterface
|
||
}
|
||
|
||
func NewSyncLiveClient(cc grpc.ClientConnInterface) SyncLiveClient {
|
||
return &syncLiveClient{cc}
|
||
}
|
||
|
||
func (c *syncLiveClient) 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, SyncLive_GetConfig_FullMethodName, in, out, cOpts...)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
return out, nil
|
||
}
|
||
|
||
func (c *syncLiveClient) 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, SyncLive_ListRooms_FullMethodName, in, out, cOpts...)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
return out, nil
|
||
}
|
||
|
||
func (c *syncLiveClient) 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, SyncLive_Publish_FullMethodName, in, out, cOpts...)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
return out, nil
|
||
}
|
||
|
||
func (c *syncLiveClient) 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, SyncLive_Subscribe_FullMethodName, in, out, cOpts...)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
return out, nil
|
||
}
|
||
|
||
func (c *syncLiveClient) 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, SyncLive_StopStream_FullMethodName, in, out, cOpts...)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
return out, nil
|
||
}
|
||
|
||
func (c *syncLiveClient) 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, &SyncLive_ServiceDesc.Streams[0], SyncLive_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 SyncLive_WatchRoomClient = grpc.ServerStreamingClient[RoomEvent]
|
||
|
||
func (c *syncLiveClient) 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, SyncLive_Login_FullMethodName, in, out, cOpts...)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
return out, nil
|
||
}
|
||
|
||
func (c *syncLiveClient) 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, SyncLive_Register_FullMethodName, in, out, cOpts...)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
return out, nil
|
||
}
|
||
|
||
func (c *syncLiveClient) 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, SyncLive_GetMe_FullMethodName, in, out, cOpts...)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
return out, nil
|
||
}
|
||
|
||
func (c *syncLiveClient) 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, SyncLive_ListUsers_FullMethodName, in, out, cOpts...)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
return out, nil
|
||
}
|
||
|
||
func (c *syncLiveClient) 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, SyncLive_UpdateUserRole_FullMethodName, in, out, cOpts...)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
return out, nil
|
||
}
|
||
|
||
// SyncLiveServer is the server API for SyncLive service.
|
||
// All implementations should embed UnimplementedSyncLiveServer
|
||
// for forward compatibility.
|
||
//
|
||
// SyncLive 是直播 SFU 分流服务的控制面契约(protobuf / gRPC)。
|
||
//
|
||
// 媒体面(WebRTC SDP 交换)不在此契约内:浏览器与 Cloudflare Realtime / SRS
|
||
// 直连,经本服务反向代理转发(服务端注入 AppSecret / stream token)。
|
||
// 本契约只负责房间、后端、发布/订阅拓扑的协调与扇出状态广播。
|
||
type SyncLiveServer 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)
|
||
}
|
||
|
||
// UnimplementedSyncLiveServer 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 UnimplementedSyncLiveServer struct{}
|
||
|
||
func (UnimplementedSyncLiveServer) GetConfig(context.Context, *GetConfigRequest) (*GetConfigResponse, error) {
|
||
return nil, status.Error(codes.Unimplemented, "method GetConfig not implemented")
|
||
}
|
||
func (UnimplementedSyncLiveServer) ListRooms(context.Context, *ListRoomsRequest) (*ListRoomsResponse, error) {
|
||
return nil, status.Error(codes.Unimplemented, "method ListRooms not implemented")
|
||
}
|
||
func (UnimplementedSyncLiveServer) Publish(context.Context, *PublishRequest) (*PublishResponse, error) {
|
||
return nil, status.Error(codes.Unimplemented, "method Publish not implemented")
|
||
}
|
||
func (UnimplementedSyncLiveServer) Subscribe(context.Context, *SubscribeRequest) (*SubscribeResponse, error) {
|
||
return nil, status.Error(codes.Unimplemented, "method Subscribe not implemented")
|
||
}
|
||
func (UnimplementedSyncLiveServer) StopStream(context.Context, *StopStreamRequest) (*StopStreamResponse, error) {
|
||
return nil, status.Error(codes.Unimplemented, "method StopStream not implemented")
|
||
}
|
||
func (UnimplementedSyncLiveServer) WatchRoom(*WatchRoomRequest, grpc.ServerStreamingServer[RoomEvent]) error {
|
||
return status.Error(codes.Unimplemented, "method WatchRoom not implemented")
|
||
}
|
||
func (UnimplementedSyncLiveServer) Login(context.Context, *LoginRequest) (*LoginResponse, error) {
|
||
return nil, status.Error(codes.Unimplemented, "method Login not implemented")
|
||
}
|
||
func (UnimplementedSyncLiveServer) Register(context.Context, *RegisterRequest) (*RegisterResponse, error) {
|
||
return nil, status.Error(codes.Unimplemented, "method Register not implemented")
|
||
}
|
||
func (UnimplementedSyncLiveServer) GetMe(context.Context, *GetMeRequest) (*GetMeResponse, error) {
|
||
return nil, status.Error(codes.Unimplemented, "method GetMe not implemented")
|
||
}
|
||
func (UnimplementedSyncLiveServer) ListUsers(context.Context, *ListUsersRequest) (*ListUsersResponse, error) {
|
||
return nil, status.Error(codes.Unimplemented, "method ListUsers not implemented")
|
||
}
|
||
func (UnimplementedSyncLiveServer) UpdateUserRole(context.Context, *UpdateUserRoleRequest) (*UpdateUserRoleResponse, error) {
|
||
return nil, status.Error(codes.Unimplemented, "method UpdateUserRole not implemented")
|
||
}
|
||
func (UnimplementedSyncLiveServer) testEmbeddedByValue() {}
|
||
|
||
// UnsafeSyncLiveServer may be embedded to opt out of forward compatibility for this service.
|
||
// Use of this interface is not recommended, as added methods to SyncLiveServer will
|
||
// result in compilation errors.
|
||
type UnsafeSyncLiveServer interface {
|
||
mustEmbedUnimplementedSyncLiveServer()
|
||
}
|
||
|
||
func RegisterSyncLiveServer(s grpc.ServiceRegistrar, srv SyncLiveServer) {
|
||
// If the following call panics, it indicates UnimplementedSyncLiveServer 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(&SyncLive_ServiceDesc, srv)
|
||
}
|
||
|
||
func _SyncLive_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.(SyncLiveServer).GetConfig(ctx, in)
|
||
}
|
||
info := &grpc.UnaryServerInfo{
|
||
Server: srv,
|
||
FullMethod: SyncLive_GetConfig_FullMethodName,
|
||
}
|
||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||
return srv.(SyncLiveServer).GetConfig(ctx, req.(*GetConfigRequest))
|
||
}
|
||
return interceptor(ctx, in, info, handler)
|
||
}
|
||
|
||
func _SyncLive_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.(SyncLiveServer).ListRooms(ctx, in)
|
||
}
|
||
info := &grpc.UnaryServerInfo{
|
||
Server: srv,
|
||
FullMethod: SyncLive_ListRooms_FullMethodName,
|
||
}
|
||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||
return srv.(SyncLiveServer).ListRooms(ctx, req.(*ListRoomsRequest))
|
||
}
|
||
return interceptor(ctx, in, info, handler)
|
||
}
|
||
|
||
func _SyncLive_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.(SyncLiveServer).Publish(ctx, in)
|
||
}
|
||
info := &grpc.UnaryServerInfo{
|
||
Server: srv,
|
||
FullMethod: SyncLive_Publish_FullMethodName,
|
||
}
|
||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||
return srv.(SyncLiveServer).Publish(ctx, req.(*PublishRequest))
|
||
}
|
||
return interceptor(ctx, in, info, handler)
|
||
}
|
||
|
||
func _SyncLive_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.(SyncLiveServer).Subscribe(ctx, in)
|
||
}
|
||
info := &grpc.UnaryServerInfo{
|
||
Server: srv,
|
||
FullMethod: SyncLive_Subscribe_FullMethodName,
|
||
}
|
||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||
return srv.(SyncLiveServer).Subscribe(ctx, req.(*SubscribeRequest))
|
||
}
|
||
return interceptor(ctx, in, info, handler)
|
||
}
|
||
|
||
func _SyncLive_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.(SyncLiveServer).StopStream(ctx, in)
|
||
}
|
||
info := &grpc.UnaryServerInfo{
|
||
Server: srv,
|
||
FullMethod: SyncLive_StopStream_FullMethodName,
|
||
}
|
||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||
return srv.(SyncLiveServer).StopStream(ctx, req.(*StopStreamRequest))
|
||
}
|
||
return interceptor(ctx, in, info, handler)
|
||
}
|
||
|
||
func _SyncLive_WatchRoom_Handler(srv interface{}, stream grpc.ServerStream) error {
|
||
m := new(WatchRoomRequest)
|
||
if err := stream.RecvMsg(m); err != nil {
|
||
return err
|
||
}
|
||
return srv.(SyncLiveServer).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 SyncLive_WatchRoomServer = grpc.ServerStreamingServer[RoomEvent]
|
||
|
||
func _SyncLive_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.(SyncLiveServer).Login(ctx, in)
|
||
}
|
||
info := &grpc.UnaryServerInfo{
|
||
Server: srv,
|
||
FullMethod: SyncLive_Login_FullMethodName,
|
||
}
|
||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||
return srv.(SyncLiveServer).Login(ctx, req.(*LoginRequest))
|
||
}
|
||
return interceptor(ctx, in, info, handler)
|
||
}
|
||
|
||
func _SyncLive_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.(SyncLiveServer).Register(ctx, in)
|
||
}
|
||
info := &grpc.UnaryServerInfo{
|
||
Server: srv,
|
||
FullMethod: SyncLive_Register_FullMethodName,
|
||
}
|
||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||
return srv.(SyncLiveServer).Register(ctx, req.(*RegisterRequest))
|
||
}
|
||
return interceptor(ctx, in, info, handler)
|
||
}
|
||
|
||
func _SyncLive_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.(SyncLiveServer).GetMe(ctx, in)
|
||
}
|
||
info := &grpc.UnaryServerInfo{
|
||
Server: srv,
|
||
FullMethod: SyncLive_GetMe_FullMethodName,
|
||
}
|
||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||
return srv.(SyncLiveServer).GetMe(ctx, req.(*GetMeRequest))
|
||
}
|
||
return interceptor(ctx, in, info, handler)
|
||
}
|
||
|
||
func _SyncLive_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.(SyncLiveServer).ListUsers(ctx, in)
|
||
}
|
||
info := &grpc.UnaryServerInfo{
|
||
Server: srv,
|
||
FullMethod: SyncLive_ListUsers_FullMethodName,
|
||
}
|
||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||
return srv.(SyncLiveServer).ListUsers(ctx, req.(*ListUsersRequest))
|
||
}
|
||
return interceptor(ctx, in, info, handler)
|
||
}
|
||
|
||
func _SyncLive_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.(SyncLiveServer).UpdateUserRole(ctx, in)
|
||
}
|
||
info := &grpc.UnaryServerInfo{
|
||
Server: srv,
|
||
FullMethod: SyncLive_UpdateUserRole_FullMethodName,
|
||
}
|
||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||
return srv.(SyncLiveServer).UpdateUserRole(ctx, req.(*UpdateUserRoleRequest))
|
||
}
|
||
return interceptor(ctx, in, info, handler)
|
||
}
|
||
|
||
// SyncLive_ServiceDesc is the grpc.ServiceDesc for SyncLive service.
|
||
// It's only intended for direct use with grpc.RegisterService,
|
||
// and not to be introspected or modified (even as a copy)
|
||
var SyncLive_ServiceDesc = grpc.ServiceDesc{
|
||
ServiceName: "synclive.v1.SyncLive",
|
||
HandlerType: (*SyncLiveServer)(nil),
|
||
Methods: []grpc.MethodDesc{
|
||
{
|
||
MethodName: "GetConfig",
|
||
Handler: _SyncLive_GetConfig_Handler,
|
||
},
|
||
{
|
||
MethodName: "ListRooms",
|
||
Handler: _SyncLive_ListRooms_Handler,
|
||
},
|
||
{
|
||
MethodName: "Publish",
|
||
Handler: _SyncLive_Publish_Handler,
|
||
},
|
||
{
|
||
MethodName: "Subscribe",
|
||
Handler: _SyncLive_Subscribe_Handler,
|
||
},
|
||
{
|
||
MethodName: "StopStream",
|
||
Handler: _SyncLive_StopStream_Handler,
|
||
},
|
||
{
|
||
MethodName: "Login",
|
||
Handler: _SyncLive_Login_Handler,
|
||
},
|
||
{
|
||
MethodName: "Register",
|
||
Handler: _SyncLive_Register_Handler,
|
||
},
|
||
{
|
||
MethodName: "GetMe",
|
||
Handler: _SyncLive_GetMe_Handler,
|
||
},
|
||
{
|
||
MethodName: "ListUsers",
|
||
Handler: _SyncLive_ListUsers_Handler,
|
||
},
|
||
{
|
||
MethodName: "UpdateUserRole",
|
||
Handler: _SyncLive_UpdateUserRole_Handler,
|
||
},
|
||
},
|
||
Streams: []grpc.StreamDesc{
|
||
{
|
||
StreamName: "WatchRoom",
|
||
Handler: _SyncLive_WatchRoom_Handler,
|
||
ServerStreams: true,
|
||
},
|
||
},
|
||
Metadata: "sync_live.proto",
|
||
}
|