204 lines
8.2 KiB
Go
204 lines
8.2 KiB
Go
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
|
// versions:
|
|
// - protoc-gen-go-grpc v1.5.1
|
|
// - protoc v5.28.3
|
|
// source: llink/pusher/pusher.proto
|
|
|
|
package pbpusher
|
|
|
|
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 (
|
|
PusherService_GetOnlineHumanIds_FullMethodName = "/llink.pusher.PusherService/GetOnlineHumanIds"
|
|
PusherService_IsOnline_FullMethodName = "/llink.pusher.PusherService/IsOnline"
|
|
PusherService_GetChannelPresence_FullMethodName = "/llink.pusher.PusherService/GetChannelPresence"
|
|
)
|
|
|
|
// PusherServiceClient is the client API for PusherService 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 PusherServiceClient interface {
|
|
// Returns all currently connected human IDs.
|
|
GetOnlineHumanIds(ctx context.Context, in *GetOnlineHumanIdsRequest, opts ...grpc.CallOption) (*GetOnlineHumanIdsResponse, error)
|
|
// Returns whether specific humans are currently online.
|
|
IsOnline(ctx context.Context, in *IsOnlineRequest, opts ...grpc.CallOption) (*IsOnlineResponse, error)
|
|
// Returns presence (human IDs) for specific channels.
|
|
GetChannelPresence(ctx context.Context, in *GetChannelPresenceRequest, opts ...grpc.CallOption) (*GetChannelPresenceResponse, error)
|
|
}
|
|
|
|
type pusherServiceClient struct {
|
|
cc grpc.ClientConnInterface
|
|
}
|
|
|
|
func NewPusherServiceClient(cc grpc.ClientConnInterface) PusherServiceClient {
|
|
return &pusherServiceClient{cc}
|
|
}
|
|
|
|
func (c *pusherServiceClient) GetOnlineHumanIds(ctx context.Context, in *GetOnlineHumanIdsRequest, opts ...grpc.CallOption) (*GetOnlineHumanIdsResponse, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(GetOnlineHumanIdsResponse)
|
|
err := c.cc.Invoke(ctx, PusherService_GetOnlineHumanIds_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *pusherServiceClient) IsOnline(ctx context.Context, in *IsOnlineRequest, opts ...grpc.CallOption) (*IsOnlineResponse, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(IsOnlineResponse)
|
|
err := c.cc.Invoke(ctx, PusherService_IsOnline_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *pusherServiceClient) GetChannelPresence(ctx context.Context, in *GetChannelPresenceRequest, opts ...grpc.CallOption) (*GetChannelPresenceResponse, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(GetChannelPresenceResponse)
|
|
err := c.cc.Invoke(ctx, PusherService_GetChannelPresence_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
// PusherServiceServer is the server API for PusherService service.
|
|
// All implementations must embed UnimplementedPusherServiceServer
|
|
// for forward compatibility.
|
|
type PusherServiceServer interface {
|
|
// Returns all currently connected human IDs.
|
|
GetOnlineHumanIds(context.Context, *GetOnlineHumanIdsRequest) (*GetOnlineHumanIdsResponse, error)
|
|
// Returns whether specific humans are currently online.
|
|
IsOnline(context.Context, *IsOnlineRequest) (*IsOnlineResponse, error)
|
|
// Returns presence (human IDs) for specific channels.
|
|
GetChannelPresence(context.Context, *GetChannelPresenceRequest) (*GetChannelPresenceResponse, error)
|
|
mustEmbedUnimplementedPusherServiceServer()
|
|
}
|
|
|
|
// UnimplementedPusherServiceServer 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 UnimplementedPusherServiceServer struct{}
|
|
|
|
func (UnimplementedPusherServiceServer) GetOnlineHumanIds(context.Context, *GetOnlineHumanIdsRequest) (*GetOnlineHumanIdsResponse, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method GetOnlineHumanIds not implemented")
|
|
}
|
|
func (UnimplementedPusherServiceServer) IsOnline(context.Context, *IsOnlineRequest) (*IsOnlineResponse, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method IsOnline not implemented")
|
|
}
|
|
func (UnimplementedPusherServiceServer) GetChannelPresence(context.Context, *GetChannelPresenceRequest) (*GetChannelPresenceResponse, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method GetChannelPresence not implemented")
|
|
}
|
|
func (UnimplementedPusherServiceServer) mustEmbedUnimplementedPusherServiceServer() {}
|
|
func (UnimplementedPusherServiceServer) testEmbeddedByValue() {}
|
|
|
|
// UnsafePusherServiceServer may be embedded to opt out of forward compatibility for this service.
|
|
// Use of this interface is not recommended, as added methods to PusherServiceServer will
|
|
// result in compilation errors.
|
|
type UnsafePusherServiceServer interface {
|
|
mustEmbedUnimplementedPusherServiceServer()
|
|
}
|
|
|
|
func RegisterPusherServiceServer(s grpc.ServiceRegistrar, srv PusherServiceServer) {
|
|
// If the following call pancis, it indicates UnimplementedPusherServiceServer 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(&PusherService_ServiceDesc, srv)
|
|
}
|
|
|
|
func _PusherService_GetOnlineHumanIds_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(GetOnlineHumanIdsRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(PusherServiceServer).GetOnlineHumanIds(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: PusherService_GetOnlineHumanIds_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(PusherServiceServer).GetOnlineHumanIds(ctx, req.(*GetOnlineHumanIdsRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _PusherService_IsOnline_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(IsOnlineRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(PusherServiceServer).IsOnline(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: PusherService_IsOnline_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(PusherServiceServer).IsOnline(ctx, req.(*IsOnlineRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _PusherService_GetChannelPresence_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(GetChannelPresenceRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(PusherServiceServer).GetChannelPresence(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: PusherService_GetChannelPresence_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(PusherServiceServer).GetChannelPresence(ctx, req.(*GetChannelPresenceRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
// PusherService_ServiceDesc is the grpc.ServiceDesc for PusherService service.
|
|
// It's only intended for direct use with grpc.RegisterService,
|
|
// and not to be introspected or modified (even as a copy)
|
|
var PusherService_ServiceDesc = grpc.ServiceDesc{
|
|
ServiceName: "llink.pusher.PusherService",
|
|
HandlerType: (*PusherServiceServer)(nil),
|
|
Methods: []grpc.MethodDesc{
|
|
{
|
|
MethodName: "GetOnlineHumanIds",
|
|
Handler: _PusherService_GetOnlineHumanIds_Handler,
|
|
},
|
|
{
|
|
MethodName: "IsOnline",
|
|
Handler: _PusherService_IsOnline_Handler,
|
|
},
|
|
{
|
|
MethodName: "GetChannelPresence",
|
|
Handler: _PusherService_GetChannelPresence_Handler,
|
|
},
|
|
},
|
|
Streams: []grpc.StreamDesc{},
|
|
Metadata: "llink/pusher/pusher.proto",
|
|
}
|