client/golnag/passport/push_xiaomi_grpc.pb.go

284 lines
10 KiB
Go
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.5.1
// - protoc (unknown)
// source: push_xiaomi.proto
package notify
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 (
Xiaomi_Regid_FullMethodName = "/notify.Xiaomi/Regid"
Xiaomi_Alias_FullMethodName = "/notify.Xiaomi/Alias"
Xiaomi_Topic_FullMethodName = "/notify.Xiaomi/Topic"
Xiaomi_MultiTopic_FullMethodName = "/notify.Xiaomi/MultiTopic"
Xiaomi_All_FullMethodName = "/notify.Xiaomi/All"
)
// XiaomiClient is the client API for Xiaomi 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 XiaomiClient interface {
// 向一组regid列表或alias列表推送单条消息这些regId可以属于不同的包名
Regid(ctx context.Context, in *ARequest, opts ...grpc.CallOption) (*StatusReply, error)
// 向某个alias或一组alias列表推送某条消息这些alias可以属于不同的包名
Alias(ctx context.Context, in *ARequest, opts ...grpc.CallOption) (*StatusReply, error)
// 向某个topic推送单条消息
Topic(ctx context.Context, in *TopicRequest, opts ...grpc.CallOption) (*StatusReply, error)
// 向多个topic推送单条消息可以指定一个或多个包名
MultiTopic(ctx context.Context, in *MultiTopicRequest, opts ...grpc.CallOption) (*StatusReply, error)
// 向所有设备推送某条消息(可以指定一个或多个包名)
All(ctx context.Context, in *BaseItem, opts ...grpc.CallOption) (*StatusReply, error)
}
type xiaomiClient struct {
cc grpc.ClientConnInterface
}
func NewXiaomiClient(cc grpc.ClientConnInterface) XiaomiClient {
return &xiaomiClient{cc}
}
func (c *xiaomiClient) Regid(ctx context.Context, in *ARequest, opts ...grpc.CallOption) (*StatusReply, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(StatusReply)
err := c.cc.Invoke(ctx, Xiaomi_Regid_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *xiaomiClient) Alias(ctx context.Context, in *ARequest, opts ...grpc.CallOption) (*StatusReply, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(StatusReply)
err := c.cc.Invoke(ctx, Xiaomi_Alias_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *xiaomiClient) Topic(ctx context.Context, in *TopicRequest, opts ...grpc.CallOption) (*StatusReply, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(StatusReply)
err := c.cc.Invoke(ctx, Xiaomi_Topic_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *xiaomiClient) MultiTopic(ctx context.Context, in *MultiTopicRequest, opts ...grpc.CallOption) (*StatusReply, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(StatusReply)
err := c.cc.Invoke(ctx, Xiaomi_MultiTopic_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *xiaomiClient) All(ctx context.Context, in *BaseItem, opts ...grpc.CallOption) (*StatusReply, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(StatusReply)
err := c.cc.Invoke(ctx, Xiaomi_All_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
// XiaomiServer is the server API for Xiaomi service.
// All implementations must embed UnimplementedXiaomiServer
// for forward compatibility.
type XiaomiServer interface {
// 向一组regid列表或alias列表推送单条消息这些regId可以属于不同的包名
Regid(context.Context, *ARequest) (*StatusReply, error)
// 向某个alias或一组alias列表推送某条消息这些alias可以属于不同的包名
Alias(context.Context, *ARequest) (*StatusReply, error)
// 向某个topic推送单条消息
Topic(context.Context, *TopicRequest) (*StatusReply, error)
// 向多个topic推送单条消息可以指定一个或多个包名
MultiTopic(context.Context, *MultiTopicRequest) (*StatusReply, error)
// 向所有设备推送某条消息(可以指定一个或多个包名)
All(context.Context, *BaseItem) (*StatusReply, error)
mustEmbedUnimplementedXiaomiServer()
}
// UnimplementedXiaomiServer 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 UnimplementedXiaomiServer struct{}
func (UnimplementedXiaomiServer) Regid(context.Context, *ARequest) (*StatusReply, error) {
return nil, status.Errorf(codes.Unimplemented, "method Regid not implemented")
}
func (UnimplementedXiaomiServer) Alias(context.Context, *ARequest) (*StatusReply, error) {
return nil, status.Errorf(codes.Unimplemented, "method Alias not implemented")
}
func (UnimplementedXiaomiServer) Topic(context.Context, *TopicRequest) (*StatusReply, error) {
return nil, status.Errorf(codes.Unimplemented, "method Topic not implemented")
}
func (UnimplementedXiaomiServer) MultiTopic(context.Context, *MultiTopicRequest) (*StatusReply, error) {
return nil, status.Errorf(codes.Unimplemented, "method MultiTopic not implemented")
}
func (UnimplementedXiaomiServer) All(context.Context, *BaseItem) (*StatusReply, error) {
return nil, status.Errorf(codes.Unimplemented, "method All not implemented")
}
func (UnimplementedXiaomiServer) mustEmbedUnimplementedXiaomiServer() {}
func (UnimplementedXiaomiServer) testEmbeddedByValue() {}
// UnsafeXiaomiServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to XiaomiServer will
// result in compilation errors.
type UnsafeXiaomiServer interface {
mustEmbedUnimplementedXiaomiServer()
}
func RegisterXiaomiServer(s grpc.ServiceRegistrar, srv XiaomiServer) {
// If the following call pancis, it indicates UnimplementedXiaomiServer 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(&Xiaomi_ServiceDesc, srv)
}
func _Xiaomi_Regid_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ARequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(XiaomiServer).Regid(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Xiaomi_Regid_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(XiaomiServer).Regid(ctx, req.(*ARequest))
}
return interceptor(ctx, in, info, handler)
}
func _Xiaomi_Alias_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ARequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(XiaomiServer).Alias(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Xiaomi_Alias_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(XiaomiServer).Alias(ctx, req.(*ARequest))
}
return interceptor(ctx, in, info, handler)
}
func _Xiaomi_Topic_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(TopicRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(XiaomiServer).Topic(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Xiaomi_Topic_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(XiaomiServer).Topic(ctx, req.(*TopicRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Xiaomi_MultiTopic_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(MultiTopicRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(XiaomiServer).MultiTopic(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Xiaomi_MultiTopic_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(XiaomiServer).MultiTopic(ctx, req.(*MultiTopicRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Xiaomi_All_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(BaseItem)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(XiaomiServer).All(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Xiaomi_All_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(XiaomiServer).All(ctx, req.(*BaseItem))
}
return interceptor(ctx, in, info, handler)
}
// Xiaomi_ServiceDesc is the grpc.ServiceDesc for Xiaomi service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var Xiaomi_ServiceDesc = grpc.ServiceDesc{
ServiceName: "notify.Xiaomi",
HandlerType: (*XiaomiServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "Regid",
Handler: _Xiaomi_Regid_Handler,
},
{
MethodName: "Alias",
Handler: _Xiaomi_Alias_Handler,
},
{
MethodName: "Topic",
Handler: _Xiaomi_Topic_Handler,
},
{
MethodName: "MultiTopic",
Handler: _Xiaomi_MultiTopic_Handler,
},
{
MethodName: "All",
Handler: _Xiaomi_All_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "push_xiaomi.proto",
}