gorush/rpc/proto/gorush.pb.go

2178 lines
52 KiB
Go

// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: gorush.proto
package proto
import proto "github.com/gogo/protobuf/proto"
import fmt "fmt"
import math "math"
import (
context "golang.org/x/net/context"
grpc "google.golang.org/grpc"
)
import io "io"
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package
type HealthCheckResponse_ServingStatus int32
const (
HealthCheckResponse_UNKNOWN HealthCheckResponse_ServingStatus = 0
HealthCheckResponse_SERVING HealthCheckResponse_ServingStatus = 1
HealthCheckResponse_NOT_SERVING HealthCheckResponse_ServingStatus = 2
)
var HealthCheckResponse_ServingStatus_name = map[int32]string{
0: "UNKNOWN",
1: "SERVING",
2: "NOT_SERVING",
}
var HealthCheckResponse_ServingStatus_value = map[string]int32{
"UNKNOWN": 0,
"SERVING": 1,
"NOT_SERVING": 2,
}
func (x HealthCheckResponse_ServingStatus) String() string {
return proto.EnumName(HealthCheckResponse_ServingStatus_name, int32(x))
}
func (HealthCheckResponse_ServingStatus) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_gorush_55c8edc1f352690b, []int{4, 0}
}
type Alert struct {
Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"`
Body string `protobuf:"bytes,2,opt,name=body,proto3" json:"body,omitempty"`
Subtitle string `protobuf:"bytes,3,opt,name=subtitle,proto3" json:"subtitle,omitempty"`
Action string `protobuf:"bytes,4,opt,name=action,proto3" json:"action,omitempty"`
ActionLocKey string `protobuf:"bytes,5,opt,name=actionLocKey,proto3" json:"actionLocKey,omitempty"`
LaunchImage string `protobuf:"bytes,6,opt,name=launchImage,proto3" json:"launchImage,omitempty"`
LocKey string `protobuf:"bytes,7,opt,name=locKey,proto3" json:"locKey,omitempty"`
TitleLocKey string `protobuf:"bytes,8,opt,name=titleLocKey,proto3" json:"titleLocKey,omitempty"`
LocArgs []string `protobuf:"bytes,9,rep,name=locArgs" json:"locArgs,omitempty"`
TitleLocArgs []string `protobuf:"bytes,10,rep,name=titleLocArgs" json:"titleLocArgs,omitempty"`
}
func (m *Alert) Reset() { *m = Alert{} }
func (m *Alert) String() string { return proto.CompactTextString(m) }
func (*Alert) ProtoMessage() {}
func (*Alert) Descriptor() ([]byte, []int) {
return fileDescriptor_gorush_55c8edc1f352690b, []int{0}
}
func (m *Alert) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *Alert) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_Alert.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalTo(b)
if err != nil {
return nil, err
}
return b[:n], nil
}
}
func (dst *Alert) XXX_Merge(src proto.Message) {
xxx_messageInfo_Alert.Merge(dst, src)
}
func (m *Alert) XXX_Size() int {
return m.Size()
}
func (m *Alert) XXX_DiscardUnknown() {
xxx_messageInfo_Alert.DiscardUnknown(m)
}
var xxx_messageInfo_Alert proto.InternalMessageInfo
func (m *Alert) GetTitle() string {
if m != nil {
return m.Title
}
return ""
}
func (m *Alert) GetBody() string {
if m != nil {
return m.Body
}
return ""
}
func (m *Alert) GetSubtitle() string {
if m != nil {
return m.Subtitle
}
return ""
}
func (m *Alert) GetAction() string {
if m != nil {
return m.Action
}
return ""
}
func (m *Alert) GetActionLocKey() string {
if m != nil {
return m.ActionLocKey
}
return ""
}
func (m *Alert) GetLaunchImage() string {
if m != nil {
return m.LaunchImage
}
return ""
}
func (m *Alert) GetLocKey() string {
if m != nil {
return m.LocKey
}
return ""
}
func (m *Alert) GetTitleLocKey() string {
if m != nil {
return m.TitleLocKey
}
return ""
}
func (m *Alert) GetLocArgs() []string {
if m != nil {
return m.LocArgs
}
return nil
}
func (m *Alert) GetTitleLocArgs() []string {
if m != nil {
return m.TitleLocArgs
}
return nil
}
type NotificationRequest struct {
Tokens []string `protobuf:"bytes,1,rep,name=tokens" json:"tokens,omitempty"`
Platform int32 `protobuf:"varint,2,opt,name=platform,proto3" json:"platform,omitempty"`
Message string `protobuf:"bytes,3,opt,name=message,proto3" json:"message,omitempty"`
Title string `protobuf:"bytes,4,opt,name=title,proto3" json:"title,omitempty"`
Topic string `protobuf:"bytes,5,opt,name=topic,proto3" json:"topic,omitempty"`
Key string `protobuf:"bytes,6,opt,name=key,proto3" json:"key,omitempty"`
Badge int32 `protobuf:"varint,7,opt,name=badge,proto3" json:"badge,omitempty"`
Category string `protobuf:"bytes,8,opt,name=category,proto3" json:"category,omitempty"`
Alert *Alert `protobuf:"bytes,9,opt,name=alert" json:"alert,omitempty"`
Sound string `protobuf:"bytes,10,opt,name=sound,proto3" json:"sound,omitempty"`
ContentAvailable bool `protobuf:"varint,11,opt,name=contentAvailable,proto3" json:"contentAvailable,omitempty"`
ThreadID string `protobuf:"bytes,12,opt,name=threadID,proto3" json:"threadID,omitempty"`
MutableContent bool `protobuf:"varint,13,opt,name=mutableContent,proto3" json:"mutableContent,omitempty"`
}
func (m *NotificationRequest) Reset() { *m = NotificationRequest{} }
func (m *NotificationRequest) String() string { return proto.CompactTextString(m) }
func (*NotificationRequest) ProtoMessage() {}
func (*NotificationRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_gorush_55c8edc1f352690b, []int{1}
}
func (m *NotificationRequest) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *NotificationRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_NotificationRequest.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalTo(b)
if err != nil {
return nil, err
}
return b[:n], nil
}
}
func (dst *NotificationRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_NotificationRequest.Merge(dst, src)
}
func (m *NotificationRequest) XXX_Size() int {
return m.Size()
}
func (m *NotificationRequest) XXX_DiscardUnknown() {
xxx_messageInfo_NotificationRequest.DiscardUnknown(m)
}
var xxx_messageInfo_NotificationRequest proto.InternalMessageInfo
func (m *NotificationRequest) GetTokens() []string {
if m != nil {
return m.Tokens
}
return nil
}
func (m *NotificationRequest) GetPlatform() int32 {
if m != nil {
return m.Platform
}
return 0
}
func (m *NotificationRequest) GetMessage() string {
if m != nil {
return m.Message
}
return ""
}
func (m *NotificationRequest) GetTitle() string {
if m != nil {
return m.Title
}
return ""
}
func (m *NotificationRequest) GetTopic() string {
if m != nil {
return m.Topic
}
return ""
}
func (m *NotificationRequest) GetKey() string {
if m != nil {
return m.Key
}
return ""
}
func (m *NotificationRequest) GetBadge() int32 {
if m != nil {
return m.Badge
}
return 0
}
func (m *NotificationRequest) GetCategory() string {
if m != nil {
return m.Category
}
return ""
}
func (m *NotificationRequest) GetAlert() *Alert {
if m != nil {
return m.Alert
}
return nil
}
func (m *NotificationRequest) GetSound() string {
if m != nil {
return m.Sound
}
return ""
}
func (m *NotificationRequest) GetContentAvailable() bool {
if m != nil {
return m.ContentAvailable
}
return false
}
func (m *NotificationRequest) GetThreadID() string {
if m != nil {
return m.ThreadID
}
return ""
}
func (m *NotificationRequest) GetMutableContent() bool {
if m != nil {
return m.MutableContent
}
return false
}
type NotificationReply struct {
Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"`
Counts int32 `protobuf:"varint,2,opt,name=counts,proto3" json:"counts,omitempty"`
}
func (m *NotificationReply) Reset() { *m = NotificationReply{} }
func (m *NotificationReply) String() string { return proto.CompactTextString(m) }
func (*NotificationReply) ProtoMessage() {}
func (*NotificationReply) Descriptor() ([]byte, []int) {
return fileDescriptor_gorush_55c8edc1f352690b, []int{2}
}
func (m *NotificationReply) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *NotificationReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_NotificationReply.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalTo(b)
if err != nil {
return nil, err
}
return b[:n], nil
}
}
func (dst *NotificationReply) XXX_Merge(src proto.Message) {
xxx_messageInfo_NotificationReply.Merge(dst, src)
}
func (m *NotificationReply) XXX_Size() int {
return m.Size()
}
func (m *NotificationReply) XXX_DiscardUnknown() {
xxx_messageInfo_NotificationReply.DiscardUnknown(m)
}
var xxx_messageInfo_NotificationReply proto.InternalMessageInfo
func (m *NotificationReply) GetSuccess() bool {
if m != nil {
return m.Success
}
return false
}
func (m *NotificationReply) GetCounts() int32 {
if m != nil {
return m.Counts
}
return 0
}
type HealthCheckRequest struct {
Service string `protobuf:"bytes,1,opt,name=service,proto3" json:"service,omitempty"`
}
func (m *HealthCheckRequest) Reset() { *m = HealthCheckRequest{} }
func (m *HealthCheckRequest) String() string { return proto.CompactTextString(m) }
func (*HealthCheckRequest) ProtoMessage() {}
func (*HealthCheckRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_gorush_55c8edc1f352690b, []int{3}
}
func (m *HealthCheckRequest) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *HealthCheckRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_HealthCheckRequest.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalTo(b)
if err != nil {
return nil, err
}
return b[:n], nil
}
}
func (dst *HealthCheckRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_HealthCheckRequest.Merge(dst, src)
}
func (m *HealthCheckRequest) XXX_Size() int {
return m.Size()
}
func (m *HealthCheckRequest) XXX_DiscardUnknown() {
xxx_messageInfo_HealthCheckRequest.DiscardUnknown(m)
}
var xxx_messageInfo_HealthCheckRequest proto.InternalMessageInfo
func (m *HealthCheckRequest) GetService() string {
if m != nil {
return m.Service
}
return ""
}
type HealthCheckResponse struct {
Status HealthCheckResponse_ServingStatus `protobuf:"varint,1,opt,name=status,proto3,enum=proto.HealthCheckResponse_ServingStatus" json:"status,omitempty"`
}
func (m *HealthCheckResponse) Reset() { *m = HealthCheckResponse{} }
func (m *HealthCheckResponse) String() string { return proto.CompactTextString(m) }
func (*HealthCheckResponse) ProtoMessage() {}
func (*HealthCheckResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_gorush_55c8edc1f352690b, []int{4}
}
func (m *HealthCheckResponse) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *HealthCheckResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_HealthCheckResponse.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalTo(b)
if err != nil {
return nil, err
}
return b[:n], nil
}
}
func (dst *HealthCheckResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_HealthCheckResponse.Merge(dst, src)
}
func (m *HealthCheckResponse) XXX_Size() int {
return m.Size()
}
func (m *HealthCheckResponse) XXX_DiscardUnknown() {
xxx_messageInfo_HealthCheckResponse.DiscardUnknown(m)
}
var xxx_messageInfo_HealthCheckResponse proto.InternalMessageInfo
func (m *HealthCheckResponse) GetStatus() HealthCheckResponse_ServingStatus {
if m != nil {
return m.Status
}
return HealthCheckResponse_UNKNOWN
}
func init() {
proto.RegisterType((*Alert)(nil), "proto.Alert")
proto.RegisterType((*NotificationRequest)(nil), "proto.NotificationRequest")
proto.RegisterType((*NotificationReply)(nil), "proto.NotificationReply")
proto.RegisterType((*HealthCheckRequest)(nil), "proto.HealthCheckRequest")
proto.RegisterType((*HealthCheckResponse)(nil), "proto.HealthCheckResponse")
proto.RegisterEnum("proto.HealthCheckResponse_ServingStatus", HealthCheckResponse_ServingStatus_name, HealthCheckResponse_ServingStatus_value)
}
// Reference imports to suppress errors if they are not otherwise used.
var _ context.Context
var _ grpc.ClientConn
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
const _ = grpc.SupportPackageIsVersion4
// GorushClient is the client API for Gorush service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
type GorushClient interface {
Send(ctx context.Context, in *NotificationRequest, opts ...grpc.CallOption) (*NotificationReply, error)
}
type gorushClient struct {
cc *grpc.ClientConn
}
func NewGorushClient(cc *grpc.ClientConn) GorushClient {
return &gorushClient{cc}
}
func (c *gorushClient) Send(ctx context.Context, in *NotificationRequest, opts ...grpc.CallOption) (*NotificationReply, error) {
out := new(NotificationReply)
err := c.cc.Invoke(ctx, "/proto.Gorush/Send", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// GorushServer is the server API for Gorush service.
type GorushServer interface {
Send(context.Context, *NotificationRequest) (*NotificationReply, error)
}
func RegisterGorushServer(s *grpc.Server, srv GorushServer) {
s.RegisterService(&_Gorush_serviceDesc, srv)
}
func _Gorush_Send_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(NotificationRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(GorushServer).Send(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/proto.Gorush/Send",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(GorushServer).Send(ctx, req.(*NotificationRequest))
}
return interceptor(ctx, in, info, handler)
}
var _Gorush_serviceDesc = grpc.ServiceDesc{
ServiceName: "proto.Gorush",
HandlerType: (*GorushServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "Send",
Handler: _Gorush_Send_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "gorush.proto",
}
// HealthClient is the client API for Health service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
type HealthClient interface {
Check(ctx context.Context, in *HealthCheckRequest, opts ...grpc.CallOption) (*HealthCheckResponse, error)
}
type healthClient struct {
cc *grpc.ClientConn
}
func NewHealthClient(cc *grpc.ClientConn) HealthClient {
return &healthClient{cc}
}
func (c *healthClient) Check(ctx context.Context, in *HealthCheckRequest, opts ...grpc.CallOption) (*HealthCheckResponse, error) {
out := new(HealthCheckResponse)
err := c.cc.Invoke(ctx, "/proto.Health/Check", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// HealthServer is the server API for Health service.
type HealthServer interface {
Check(context.Context, *HealthCheckRequest) (*HealthCheckResponse, error)
}
func RegisterHealthServer(s *grpc.Server, srv HealthServer) {
s.RegisterService(&_Health_serviceDesc, srv)
}
func _Health_Check_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(HealthCheckRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(HealthServer).Check(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/proto.Health/Check",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(HealthServer).Check(ctx, req.(*HealthCheckRequest))
}
return interceptor(ctx, in, info, handler)
}
var _Health_serviceDesc = grpc.ServiceDesc{
ServiceName: "proto.Health",
HandlerType: (*HealthServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "Check",
Handler: _Health_Check_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "gorush.proto",
}
func (m *Alert) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalTo(dAtA)
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *Alert) MarshalTo(dAtA []byte) (int, error) {
var i int
_ = i
var l int
_ = l
if len(m.Title) > 0 {
dAtA[i] = 0xa
i++
i = encodeVarintGorush(dAtA, i, uint64(len(m.Title)))
i += copy(dAtA[i:], m.Title)
}
if len(m.Body) > 0 {
dAtA[i] = 0x12
i++
i = encodeVarintGorush(dAtA, i, uint64(len(m.Body)))
i += copy(dAtA[i:], m.Body)
}
if len(m.Subtitle) > 0 {
dAtA[i] = 0x1a
i++
i = encodeVarintGorush(dAtA, i, uint64(len(m.Subtitle)))
i += copy(dAtA[i:], m.Subtitle)
}
if len(m.Action) > 0 {
dAtA[i] = 0x22
i++
i = encodeVarintGorush(dAtA, i, uint64(len(m.Action)))
i += copy(dAtA[i:], m.Action)
}
if len(m.ActionLocKey) > 0 {
dAtA[i] = 0x2a
i++
i = encodeVarintGorush(dAtA, i, uint64(len(m.ActionLocKey)))
i += copy(dAtA[i:], m.ActionLocKey)
}
if len(m.LaunchImage) > 0 {
dAtA[i] = 0x32
i++
i = encodeVarintGorush(dAtA, i, uint64(len(m.LaunchImage)))
i += copy(dAtA[i:], m.LaunchImage)
}
if len(m.LocKey) > 0 {
dAtA[i] = 0x3a
i++
i = encodeVarintGorush(dAtA, i, uint64(len(m.LocKey)))
i += copy(dAtA[i:], m.LocKey)
}
if len(m.TitleLocKey) > 0 {
dAtA[i] = 0x42
i++
i = encodeVarintGorush(dAtA, i, uint64(len(m.TitleLocKey)))
i += copy(dAtA[i:], m.TitleLocKey)
}
if len(m.LocArgs) > 0 {
for _, s := range m.LocArgs {
dAtA[i] = 0x4a
i++
l = len(s)
for l >= 1<<7 {
dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
l >>= 7
i++
}
dAtA[i] = uint8(l)
i++
i += copy(dAtA[i:], s)
}
}
if len(m.TitleLocArgs) > 0 {
for _, s := range m.TitleLocArgs {
dAtA[i] = 0x52
i++
l = len(s)
for l >= 1<<7 {
dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
l >>= 7
i++
}
dAtA[i] = uint8(l)
i++
i += copy(dAtA[i:], s)
}
}
return i, nil
}
func (m *NotificationRequest) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalTo(dAtA)
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *NotificationRequest) MarshalTo(dAtA []byte) (int, error) {
var i int
_ = i
var l int
_ = l
if len(m.Tokens) > 0 {
for _, s := range m.Tokens {
dAtA[i] = 0xa
i++
l = len(s)
for l >= 1<<7 {
dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
l >>= 7
i++
}
dAtA[i] = uint8(l)
i++
i += copy(dAtA[i:], s)
}
}
if m.Platform != 0 {
dAtA[i] = 0x10
i++
i = encodeVarintGorush(dAtA, i, uint64(m.Platform))
}
if len(m.Message) > 0 {
dAtA[i] = 0x1a
i++
i = encodeVarintGorush(dAtA, i, uint64(len(m.Message)))
i += copy(dAtA[i:], m.Message)
}
if len(m.Title) > 0 {
dAtA[i] = 0x22
i++
i = encodeVarintGorush(dAtA, i, uint64(len(m.Title)))
i += copy(dAtA[i:], m.Title)
}
if len(m.Topic) > 0 {
dAtA[i] = 0x2a
i++
i = encodeVarintGorush(dAtA, i, uint64(len(m.Topic)))
i += copy(dAtA[i:], m.Topic)
}
if len(m.Key) > 0 {
dAtA[i] = 0x32
i++
i = encodeVarintGorush(dAtA, i, uint64(len(m.Key)))
i += copy(dAtA[i:], m.Key)
}
if m.Badge != 0 {
dAtA[i] = 0x38
i++
i = encodeVarintGorush(dAtA, i, uint64(m.Badge))
}
if len(m.Category) > 0 {
dAtA[i] = 0x42
i++
i = encodeVarintGorush(dAtA, i, uint64(len(m.Category)))
i += copy(dAtA[i:], m.Category)
}
if m.Alert != nil {
dAtA[i] = 0x4a
i++
i = encodeVarintGorush(dAtA, i, uint64(m.Alert.Size()))
n1, err := m.Alert.MarshalTo(dAtA[i:])
if err != nil {
return 0, err
}
i += n1
}
if len(m.Sound) > 0 {
dAtA[i] = 0x52
i++
i = encodeVarintGorush(dAtA, i, uint64(len(m.Sound)))
i += copy(dAtA[i:], m.Sound)
}
if m.ContentAvailable {
dAtA[i] = 0x58
i++
if m.ContentAvailable {
dAtA[i] = 1
} else {
dAtA[i] = 0
}
i++
}
if len(m.ThreadID) > 0 {
dAtA[i] = 0x62
i++
i = encodeVarintGorush(dAtA, i, uint64(len(m.ThreadID)))
i += copy(dAtA[i:], m.ThreadID)
}
if m.MutableContent {
dAtA[i] = 0x68
i++
if m.MutableContent {
dAtA[i] = 1
} else {
dAtA[i] = 0
}
i++
}
return i, nil
}
func (m *NotificationReply) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalTo(dAtA)
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *NotificationReply) MarshalTo(dAtA []byte) (int, error) {
var i int
_ = i
var l int
_ = l
if m.Success {
dAtA[i] = 0x8
i++
if m.Success {
dAtA[i] = 1
} else {
dAtA[i] = 0
}
i++
}
if m.Counts != 0 {
dAtA[i] = 0x10
i++
i = encodeVarintGorush(dAtA, i, uint64(m.Counts))
}
return i, nil
}
func (m *HealthCheckRequest) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalTo(dAtA)
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *HealthCheckRequest) MarshalTo(dAtA []byte) (int, error) {
var i int
_ = i
var l int
_ = l
if len(m.Service) > 0 {
dAtA[i] = 0xa
i++
i = encodeVarintGorush(dAtA, i, uint64(len(m.Service)))
i += copy(dAtA[i:], m.Service)
}
return i, nil
}
func (m *HealthCheckResponse) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalTo(dAtA)
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *HealthCheckResponse) MarshalTo(dAtA []byte) (int, error) {
var i int
_ = i
var l int
_ = l
if m.Status != 0 {
dAtA[i] = 0x8
i++
i = encodeVarintGorush(dAtA, i, uint64(m.Status))
}
return i, nil
}
func encodeVarintGorush(dAtA []byte, offset int, v uint64) int {
for v >= 1<<7 {
dAtA[offset] = uint8(v&0x7f | 0x80)
v >>= 7
offset++
}
dAtA[offset] = uint8(v)
return offset + 1
}
func (m *Alert) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
l = len(m.Title)
if l > 0 {
n += 1 + l + sovGorush(uint64(l))
}
l = len(m.Body)
if l > 0 {
n += 1 + l + sovGorush(uint64(l))
}
l = len(m.Subtitle)
if l > 0 {
n += 1 + l + sovGorush(uint64(l))
}
l = len(m.Action)
if l > 0 {
n += 1 + l + sovGorush(uint64(l))
}
l = len(m.ActionLocKey)
if l > 0 {
n += 1 + l + sovGorush(uint64(l))
}
l = len(m.LaunchImage)
if l > 0 {
n += 1 + l + sovGorush(uint64(l))
}
l = len(m.LocKey)
if l > 0 {
n += 1 + l + sovGorush(uint64(l))
}
l = len(m.TitleLocKey)
if l > 0 {
n += 1 + l + sovGorush(uint64(l))
}
if len(m.LocArgs) > 0 {
for _, s := range m.LocArgs {
l = len(s)
n += 1 + l + sovGorush(uint64(l))
}
}
if len(m.TitleLocArgs) > 0 {
for _, s := range m.TitleLocArgs {
l = len(s)
n += 1 + l + sovGorush(uint64(l))
}
}
return n
}
func (m *NotificationRequest) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
if len(m.Tokens) > 0 {
for _, s := range m.Tokens {
l = len(s)
n += 1 + l + sovGorush(uint64(l))
}
}
if m.Platform != 0 {
n += 1 + sovGorush(uint64(m.Platform))
}
l = len(m.Message)
if l > 0 {
n += 1 + l + sovGorush(uint64(l))
}
l = len(m.Title)
if l > 0 {
n += 1 + l + sovGorush(uint64(l))
}
l = len(m.Topic)
if l > 0 {
n += 1 + l + sovGorush(uint64(l))
}
l = len(m.Key)
if l > 0 {
n += 1 + l + sovGorush(uint64(l))
}
if m.Badge != 0 {
n += 1 + sovGorush(uint64(m.Badge))
}
l = len(m.Category)
if l > 0 {
n += 1 + l + sovGorush(uint64(l))
}
if m.Alert != nil {
l = m.Alert.Size()
n += 1 + l + sovGorush(uint64(l))
}
l = len(m.Sound)
if l > 0 {
n += 1 + l + sovGorush(uint64(l))
}
if m.ContentAvailable {
n += 2
}
l = len(m.ThreadID)
if l > 0 {
n += 1 + l + sovGorush(uint64(l))
}
if m.MutableContent {
n += 2
}
return n
}
func (m *NotificationReply) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
if m.Success {
n += 2
}
if m.Counts != 0 {
n += 1 + sovGorush(uint64(m.Counts))
}
return n
}
func (m *HealthCheckRequest) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
l = len(m.Service)
if l > 0 {
n += 1 + l + sovGorush(uint64(l))
}
return n
}
func (m *HealthCheckResponse) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
if m.Status != 0 {
n += 1 + sovGorush(uint64(m.Status))
}
return n
}
func sovGorush(x uint64) (n int) {
for {
n++
x >>= 7
if x == 0 {
break
}
}
return n
}
func sozGorush(x uint64) (n int) {
return sovGorush(uint64((x << 1) ^ uint64((int64(x) >> 63))))
}
func (m *Alert) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
preIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGorush
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: Alert: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: Alert: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Title", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGorush
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthGorush
}
postIndex := iNdEx + intStringLen
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Title = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Body", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGorush
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthGorush
}
postIndex := iNdEx + intStringLen
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Body = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 3:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Subtitle", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGorush
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthGorush
}
postIndex := iNdEx + intStringLen
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Subtitle = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 4:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Action", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGorush
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthGorush
}
postIndex := iNdEx + intStringLen
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Action = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 5:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field ActionLocKey", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGorush
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthGorush
}
postIndex := iNdEx + intStringLen
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.ActionLocKey = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 6:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field LaunchImage", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGorush
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthGorush
}
postIndex := iNdEx + intStringLen
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.LaunchImage = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 7:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field LocKey", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGorush
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthGorush
}
postIndex := iNdEx + intStringLen
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.LocKey = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 8:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field TitleLocKey", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGorush
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthGorush
}
postIndex := iNdEx + intStringLen
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.TitleLocKey = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 9:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field LocArgs", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGorush
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthGorush
}
postIndex := iNdEx + intStringLen
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.LocArgs = append(m.LocArgs, string(dAtA[iNdEx:postIndex]))
iNdEx = postIndex
case 10:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field TitleLocArgs", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGorush
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthGorush
}
postIndex := iNdEx + intStringLen
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.TitleLocArgs = append(m.TitleLocArgs, string(dAtA[iNdEx:postIndex]))
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipGorush(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthGorush
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *NotificationRequest) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
preIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGorush
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: NotificationRequest: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: NotificationRequest: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Tokens", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGorush
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthGorush
}
postIndex := iNdEx + intStringLen
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Tokens = append(m.Tokens, string(dAtA[iNdEx:postIndex]))
iNdEx = postIndex
case 2:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field Platform", wireType)
}
m.Platform = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGorush
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.Platform |= (int32(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
case 3:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGorush
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthGorush
}
postIndex := iNdEx + intStringLen
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Message = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 4:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Title", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGorush
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthGorush
}
postIndex := iNdEx + intStringLen
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Title = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 5:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Topic", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGorush
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthGorush
}
postIndex := iNdEx + intStringLen
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Topic = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 6:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGorush
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthGorush
}
postIndex := iNdEx + intStringLen
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Key = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 7:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field Badge", wireType)
}
m.Badge = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGorush
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.Badge |= (int32(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
case 8:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Category", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGorush
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthGorush
}
postIndex := iNdEx + intStringLen
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Category = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 9:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Alert", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGorush
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthGorush
}
postIndex := iNdEx + msglen
if postIndex > l {
return io.ErrUnexpectedEOF
}
if m.Alert == nil {
m.Alert = &Alert{}
}
if err := m.Alert.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
case 10:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Sound", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGorush
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthGorush
}
postIndex := iNdEx + intStringLen
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Sound = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 11:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field ContentAvailable", wireType)
}
var v int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGorush
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
v |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
m.ContentAvailable = bool(v != 0)
case 12:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field ThreadID", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGorush
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthGorush
}
postIndex := iNdEx + intStringLen
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.ThreadID = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 13:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field MutableContent", wireType)
}
var v int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGorush
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
v |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
m.MutableContent = bool(v != 0)
default:
iNdEx = preIndex
skippy, err := skipGorush(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthGorush
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *NotificationReply) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
preIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGorush
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: NotificationReply: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: NotificationReply: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field Success", wireType)
}
var v int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGorush
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
v |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
m.Success = bool(v != 0)
case 2:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field Counts", wireType)
}
m.Counts = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGorush
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.Counts |= (int32(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
default:
iNdEx = preIndex
skippy, err := skipGorush(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthGorush
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *HealthCheckRequest) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
preIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGorush
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: HealthCheckRequest: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: HealthCheckRequest: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Service", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGorush
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthGorush
}
postIndex := iNdEx + intStringLen
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Service = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipGorush(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthGorush
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *HealthCheckResponse) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
preIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGorush
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: HealthCheckResponse: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: HealthCheckResponse: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType)
}
m.Status = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGorush
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.Status |= (HealthCheckResponse_ServingStatus(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
default:
iNdEx = preIndex
skippy, err := skipGorush(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthGorush
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func skipGorush(dAtA []byte) (n int, err error) {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflowGorush
}
if iNdEx >= l {
return 0, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
wireType := int(wire & 0x7)
switch wireType {
case 0:
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflowGorush
}
if iNdEx >= l {
return 0, io.ErrUnexpectedEOF
}
iNdEx++
if dAtA[iNdEx-1] < 0x80 {
break
}
}
return iNdEx, nil
case 1:
iNdEx += 8
return iNdEx, nil
case 2:
var length int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflowGorush
}
if iNdEx >= l {
return 0, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
length |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
iNdEx += length
if length < 0 {
return 0, ErrInvalidLengthGorush
}
return iNdEx, nil
case 3:
for {
var innerWire uint64
var start int = iNdEx
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflowGorush
}
if iNdEx >= l {
return 0, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
innerWire |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
innerWireType := int(innerWire & 0x7)
if innerWireType == 4 {
break
}
next, err := skipGorush(dAtA[start:])
if err != nil {
return 0, err
}
iNdEx = start + next
}
return iNdEx, nil
case 4:
return iNdEx, nil
case 5:
iNdEx += 4
return iNdEx, nil
default:
return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
}
}
panic("unreachable")
}
var (
ErrInvalidLengthGorush = fmt.Errorf("proto: negative length found during unmarshaling")
ErrIntOverflowGorush = fmt.Errorf("proto: integer overflow")
)
func init() { proto.RegisterFile("gorush.proto", fileDescriptor_gorush_55c8edc1f352690b) }
var fileDescriptor_gorush_55c8edc1f352690b = []byte{
// 599 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x53, 0xcd, 0x6e, 0xda, 0x4c,
0x14, 0xc5, 0x04, 0x13, 0xb8, 0x90, 0x7c, 0x7c, 0x93, 0xaa, 0x9a, 0xb2, 0xb0, 0x90, 0x17, 0x15,
0xea, 0x82, 0x05, 0xdd, 0x75, 0x11, 0x95, 0xa6, 0x51, 0x82, 0x52, 0x39, 0x92, 0xe9, 0xcf, 0xb2,
0x1a, 0x86, 0x89, 0xb1, 0x18, 0x3c, 0xae, 0x67, 0x1c, 0x89, 0xb7, 0xa8, 0xd4, 0x47, 0xe8, 0xcb,
0x74, 0x99, 0x65, 0x97, 0x15, 0x3c, 0x47, 0xa5, 0x6a, 0x66, 0x6c, 0x0a, 0x2d, 0x5d, 0x79, 0xce,
0xb9, 0x3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