|
|
|
@@ -1,23 +1,18 @@
|
|
|
|
|
// Code generated by protoc-gen-go. DO NOT EDIT.
|
|
|
|
|
// versions:
|
|
|
|
|
// protoc-gen-go v1.24.0
|
|
|
|
|
// protoc v3.12.3
|
|
|
|
|
// protoc-gen-go v1.25.0-devel
|
|
|
|
|
// protoc v3.14.0
|
|
|
|
|
// source: gorush.proto
|
|
|
|
|
|
|
|
|
|
package proto
|
|
|
|
|
|
|
|
|
|
import (
|
|
|
|
|
context "context"
|
|
|
|
|
reflect "reflect"
|
|
|
|
|
sync "sync"
|
|
|
|
|
|
|
|
|
|
proto "github.com/golang/protobuf/proto"
|
|
|
|
|
_struct "github.com/golang/protobuf/ptypes/struct"
|
|
|
|
|
grpc "google.golang.org/grpc"
|
|
|
|
|
codes "google.golang.org/grpc/codes"
|
|
|
|
|
status "google.golang.org/grpc/status"
|
|
|
|
|
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
|
|
|
|
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
|
|
|
|
structpb "google.golang.org/protobuf/types/known/structpb"
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
const (
|
|
|
|
@@ -27,54 +22,50 @@ const (
|
|
|
|
|
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
// This is a compile-time assertion that a sufficiently up-to-date version
|
|
|
|
|
// of the legacy proto package is being used.
|
|
|
|
|
const _ = proto.ProtoPackageIsVersion4
|
|
|
|
|
|
|
|
|
|
type Priority int32
|
|
|
|
|
type NotificationRequest_Priority int32
|
|
|
|
|
|
|
|
|
|
const (
|
|
|
|
|
Priority_Normal Priority = 0
|
|
|
|
|
Priority_High Priority = 1
|
|
|
|
|
NotificationRequest_NORMAL NotificationRequest_Priority = 0
|
|
|
|
|
NotificationRequest_HIGH NotificationRequest_Priority = 1
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
// Enum value maps for Priority.
|
|
|
|
|
// Enum value maps for NotificationRequest_Priority.
|
|
|
|
|
var (
|
|
|
|
|
Priority_name = map[int32]string{
|
|
|
|
|
0: "Normal",
|
|
|
|
|
1: "High",
|
|
|
|
|
NotificationRequest_Priority_name = map[int32]string{
|
|
|
|
|
0: "NORMAL",
|
|
|
|
|
1: "HIGH",
|
|
|
|
|
}
|
|
|
|
|
Priority_value = map[string]int32{
|
|
|
|
|
"Normal": 0,
|
|
|
|
|
"High": 1,
|
|
|
|
|
NotificationRequest_Priority_value = map[string]int32{
|
|
|
|
|
"NORMAL": 0,
|
|
|
|
|
"HIGH": 1,
|
|
|
|
|
}
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
func (x Priority) Enum() *Priority {
|
|
|
|
|
p := new(Priority)
|
|
|
|
|
func (x NotificationRequest_Priority) Enum() *NotificationRequest_Priority {
|
|
|
|
|
p := new(NotificationRequest_Priority)
|
|
|
|
|
*p = x
|
|
|
|
|
return p
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (x Priority) String() string {
|
|
|
|
|
func (x NotificationRequest_Priority) String() string {
|
|
|
|
|
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (Priority) Descriptor() protoreflect.EnumDescriptor {
|
|
|
|
|
func (NotificationRequest_Priority) Descriptor() protoreflect.EnumDescriptor {
|
|
|
|
|
return file_gorush_proto_enumTypes[0].Descriptor()
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (Priority) Type() protoreflect.EnumType {
|
|
|
|
|
func (NotificationRequest_Priority) Type() protoreflect.EnumType {
|
|
|
|
|
return &file_gorush_proto_enumTypes[0]
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (x Priority) Number() protoreflect.EnumNumber {
|
|
|
|
|
func (x NotificationRequest_Priority) Number() protoreflect.EnumNumber {
|
|
|
|
|
return protoreflect.EnumNumber(x)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Deprecated: Use Priority.Descriptor instead.
|
|
|
|
|
func (Priority) EnumDescriptor() ([]byte, []int) {
|
|
|
|
|
return file_gorush_proto_rawDescGZIP(), []int{0}
|
|
|
|
|
// Deprecated: Use NotificationRequest_Priority.Descriptor instead.
|
|
|
|
|
func (NotificationRequest_Priority) EnumDescriptor() ([]byte, []int) {
|
|
|
|
|
return file_gorush_proto_rawDescGZIP(), []int{1, 0}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type HealthCheckResponse_ServingStatus int32
|
|
|
|
@@ -250,22 +241,22 @@ type NotificationRequest struct {
|
|
|
|
|
sizeCache protoimpl.SizeCache
|
|
|
|
|
unknownFields protoimpl.UnknownFields
|
|
|
|
|
|
|
|
|
|
Tokens []string `protobuf:"bytes,1,rep,name=tokens,proto3" 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,proto3" 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"`
|
|
|
|
|
Data *_struct.Struct `protobuf:"bytes,14,opt,name=data,proto3" json:"data,omitempty"`
|
|
|
|
|
Image string `protobuf:"bytes,15,opt,name=image,proto3" json:"image,omitempty"`
|
|
|
|
|
Priority Priority `protobuf:"varint,16,opt,name=Priority,proto3,enum=proto.Priority" json:"Priority,omitempty"`
|
|
|
|
|
Tokens []string `protobuf:"bytes,1,rep,name=tokens,proto3" 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,proto3" 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"`
|
|
|
|
|
Data *structpb.Struct `protobuf:"bytes,14,opt,name=data,proto3" json:"data,omitempty"`
|
|
|
|
|
Image string `protobuf:"bytes,15,opt,name=image,proto3" json:"image,omitempty"`
|
|
|
|
|
Priority NotificationRequest_Priority `protobuf:"varint,16,opt,name=priority,proto3,enum=proto.NotificationRequest_Priority" json:"priority,omitempty"`
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (x *NotificationRequest) Reset() {
|
|
|
|
@@ -391,7 +382,7 @@ func (x *NotificationRequest) GetMutableContent() bool {
|
|
|
|
|
return false
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (x *NotificationRequest) GetData() *_struct.Struct {
|
|
|
|
|
func (x *NotificationRequest) GetData() *structpb.Struct {
|
|
|
|
|
if x != nil {
|
|
|
|
|
return x.Data
|
|
|
|
|
}
|
|
|
|
@@ -405,11 +396,11 @@ func (x *NotificationRequest) GetImage() string {
|
|
|
|
|
return ""
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (x *NotificationRequest) GetPriority() Priority {
|
|
|
|
|
func (x *NotificationRequest) GetPriority() NotificationRequest_Priority {
|
|
|
|
|
if x != nil {
|
|
|
|
|
return x.Priority
|
|
|
|
|
}
|
|
|
|
|
return Priority_Normal
|
|
|
|
|
return NotificationRequest_NORMAL
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type NotificationReply struct {
|
|
|
|
@@ -585,7 +576,7 @@ var file_gorush_proto_rawDesc = []byte{
|
|
|
|
|
0x6f, 0x63, 0x41, 0x72, 0x67, 0x73, 0x18, 0x09, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x6c, 0x6f,
|
|
|
|
|
0x63, 0x41, 0x72, 0x67, 0x73, 0x12, 0x22, 0x0a, 0x0c, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x4c, 0x6f,
|
|
|
|
|
0x63, 0x41, 0x72, 0x67, 0x73, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0c, 0x74, 0x69, 0x74,
|
|
|
|
|
0x6c, 0x65, 0x4c, 0x6f, 0x63, 0x41, 0x72, 0x67, 0x73, 0x22, 0xed, 0x03, 0x0a, 0x13, 0x4e, 0x6f,
|
|
|
|
|
0x6c, 0x65, 0x4c, 0x6f, 0x63, 0x41, 0x72, 0x67, 0x73, 0x22, 0xa3, 0x04, 0x0a, 0x13, 0x4e, 0x6f,
|
|
|
|
|
0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
|
|
|
|
|
0x74, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28,
|
|
|
|
|
0x09, 0x52, 0x06, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x6c, 0x61,
|
|
|
|
@@ -613,39 +604,40 @@ var file_gorush_proto_rawDesc = []byte{
|
|
|
|
|
0x61, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
|
|
|
|
|
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74,
|
|
|
|
|
0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x18,
|
|
|
|
|
0x0f, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x12, 0x2b, 0x0a, 0x08,
|
|
|
|
|
0x50, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x10, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0f,
|
|
|
|
|
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x50, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x52,
|
|
|
|
|
0x08, 0x50, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x22, 0x45, 0x0a, 0x11, 0x4e, 0x6f, 0x74,
|
|
|
|
|
0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x18,
|
|
|
|
|
0x0a, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52,
|
|
|
|
|
0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x6f, 0x75, 0x6e,
|
|
|
|
|
0x74, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73,
|
|
|
|
|
0x22, 0x2e, 0x0a, 0x12, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52,
|
|
|
|
|
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63,
|
|
|
|
|
0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65,
|
|
|
|
|
0x22, 0x93, 0x01, 0x0a, 0x13, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b,
|
|
|
|
|
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x40, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74,
|
|
|
|
|
0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x28, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
|
|
|
|
|
0x2e, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70,
|
|
|
|
|
0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x6e, 0x67, 0x53, 0x74, 0x61, 0x74,
|
|
|
|
|
0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x3a, 0x0a, 0x0d, 0x53, 0x65,
|
|
|
|
|
0x72, 0x76, 0x69, 0x6e, 0x67, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x0b, 0x0a, 0x07, 0x55,
|
|
|
|
|
0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x53, 0x45, 0x52, 0x56,
|
|
|
|
|
0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x0f, 0x0a, 0x0b, 0x4e, 0x4f, 0x54, 0x5f, 0x53, 0x45, 0x52,
|
|
|
|
|
0x56, 0x49, 0x4e, 0x47, 0x10, 0x02, 0x2a, 0x20, 0x0a, 0x08, 0x50, 0x72, 0x69, 0x6f, 0x72, 0x69,
|
|
|
|
|
0x74, 0x79, 0x12, 0x0a, 0x0a, 0x06, 0x4e, 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x10, 0x00, 0x12, 0x08,
|
|
|
|
|
0x0a, 0x04, 0x48, 0x69, 0x67, 0x68, 0x10, 0x01, 0x32, 0x48, 0x0a, 0x06, 0x47, 0x6f, 0x72, 0x75,
|
|
|
|
|
0x73, 0x68, 0x12, 0x3e, 0x0a, 0x04, 0x53, 0x65, 0x6e, 0x64, 0x12, 0x1a, 0x2e, 0x70, 0x72, 0x6f,
|
|
|
|
|
0x0f, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x12, 0x3f, 0x0a, 0x08,
|
|
|
|
|
0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x10, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x23,
|
|
|
|
|
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74,
|
|
|
|
|
0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x50, 0x72, 0x69, 0x6f, 0x72,
|
|
|
|
|
0x69, 0x74, 0x79, 0x52, 0x08, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x22, 0x20, 0x0a,
|
|
|
|
|
0x08, 0x50, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, 0x0a, 0x0a, 0x06, 0x4e, 0x4f, 0x52,
|
|
|
|
|
0x4d, 0x41, 0x4c, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x48, 0x49, 0x47, 0x48, 0x10, 0x01, 0x22,
|
|
|
|
|
0x45, 0x0a, 0x11, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52,
|
|
|
|
|
0x65, 0x70, 0x6c, 0x79, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18,
|
|
|
|
|
0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x16,
|
|
|
|
|
0x0a, 0x06, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06,
|
|
|
|
|
0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x22, 0x2e, 0x0a, 0x12, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68,
|
|
|
|
|
0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07,
|
|
|
|
|
0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73,
|
|
|
|
|
0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x22, 0x93, 0x01, 0x0a, 0x13, 0x48, 0x65, 0x61, 0x6c, 0x74,
|
|
|
|
|
0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x40,
|
|
|
|
|
0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x28,
|
|
|
|
|
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65,
|
|
|
|
|
0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69,
|
|
|
|
|
0x6e, 0x67, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73,
|
|
|
|
|
0x22, 0x3a, 0x0a, 0x0d, 0x53, 0x65, 0x72, 0x76, 0x69, 0x6e, 0x67, 0x53, 0x74, 0x61, 0x74, 0x75,
|
|
|
|
|
0x73, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x0b,
|
|
|
|
|
0x0a, 0x07, 0x53, 0x45, 0x52, 0x56, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x0f, 0x0a, 0x0b, 0x4e,
|
|
|
|
|
0x4f, 0x54, 0x5f, 0x53, 0x45, 0x52, 0x56, 0x49, 0x4e, 0x47, 0x10, 0x02, 0x32, 0x48, 0x0a, 0x06,
|
|
|
|
|
0x47, 0x6f, 0x72, 0x75, 0x73, 0x68, 0x12, 0x3e, 0x0a, 0x04, 0x53, 0x65, 0x6e, 0x64, 0x12, 0x1a,
|
|
|
|
|
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74,
|
|
|
|
|
0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x70, 0x72, 0x6f,
|
|
|
|
|
0x74, 0x6f, 0x2e, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52,
|
|
|
|
|
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x4e,
|
|
|
|
|
0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x70, 0x6c, 0x79,
|
|
|
|
|
0x22, 0x00, 0x32, 0x48, 0x0a, 0x06, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x12, 0x3e, 0x0a, 0x05,
|
|
|
|
|
0x43, 0x68, 0x65, 0x63, 0x6b, 0x12, 0x19, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x48, 0x65,
|
|
|
|
|
0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
|
|
|
|
|
0x1a, 0x1a, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43,
|
|
|
|
|
0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x62, 0x06, 0x70, 0x72,
|
|
|
|
|
0x6f, 0x74, 0x6f, 0x33,
|
|
|
|
|
0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x32, 0x48, 0x0a, 0x06, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68,
|
|
|
|
|
0x12, 0x3e, 0x0a, 0x05, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x12, 0x19, 0x2e, 0x70, 0x72, 0x6f, 0x74,
|
|
|
|
|
0x6f, 0x2e, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x71,
|
|
|
|
|
0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x48, 0x65, 0x61,
|
|
|
|
|
0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
|
|
|
|
|
0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var (
|
|
|
|
@@ -664,21 +656,21 @@ var (
|
|
|
|
|
file_gorush_proto_enumTypes = make([]protoimpl.EnumInfo, 2)
|
|
|
|
|
file_gorush_proto_msgTypes = make([]protoimpl.MessageInfo, 5)
|
|
|
|
|
file_gorush_proto_goTypes = []interface{}{
|
|
|
|
|
(Priority)(0), // 0: proto.Priority
|
|
|
|
|
(NotificationRequest_Priority)(0), // 0: proto.NotificationRequest.Priority
|
|
|
|
|
(HealthCheckResponse_ServingStatus)(0), // 1: proto.HealthCheckResponse.ServingStatus
|
|
|
|
|
(*Alert)(nil), // 2: proto.Alert
|
|
|
|
|
(*NotificationRequest)(nil), // 3: proto.NotificationRequest
|
|
|
|
|
(*NotificationReply)(nil), // 4: proto.NotificationReply
|
|
|
|
|
(*HealthCheckRequest)(nil), // 5: proto.HealthCheckRequest
|
|
|
|
|
(*HealthCheckResponse)(nil), // 6: proto.HealthCheckResponse
|
|
|
|
|
(*_struct.Struct)(nil), // 7: google.protobuf.Struct
|
|
|
|
|
(*structpb.Struct)(nil), // 7: google.protobuf.Struct
|
|
|
|
|
}
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
var file_gorush_proto_depIdxs = []int32{
|
|
|
|
|
2, // 0: proto.NotificationRequest.alert:type_name -> proto.Alert
|
|
|
|
|
7, // 1: proto.NotificationRequest.data:type_name -> google.protobuf.Struct
|
|
|
|
|
0, // 2: proto.NotificationRequest.Priority:type_name -> proto.Priority
|
|
|
|
|
0, // 2: proto.NotificationRequest.priority:type_name -> proto.NotificationRequest.Priority
|
|
|
|
|
1, // 3: proto.HealthCheckResponse.status:type_name -> proto.HealthCheckResponse.ServingStatus
|
|
|
|
|
3, // 4: proto.Gorush.Send:input_type -> proto.NotificationRequest
|
|
|
|
|
5, // 5: proto.Health.Check:input_type -> proto.HealthCheckRequest
|
|
|
|
@@ -778,155 +770,3 @@ func file_gorush_proto_init() {
|
|
|
|
|
file_gorush_proto_goTypes = nil
|
|
|
|
|
file_gorush_proto_depIdxs = nil
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Reference imports to suppress errors if they are not otherwise used.
|
|
|
|
|
var (
|
|
|
|
|
_ context.Context
|
|
|
|
|
_ grpc.ClientConnInterface
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
// 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.SupportPackageIsVersion6
|
|
|
|
|
|
|
|
|
|
// 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.ClientConnInterface
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func NewGorushClient(cc grpc.ClientConnInterface) 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)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// UnimplementedGorushServer can be embedded to have forward compatible implementations.
|
|
|
|
|
type UnimplementedGorushServer struct{}
|
|
|
|
|
|
|
|
|
|
func (*UnimplementedGorushServer) Send(context.Context, *NotificationRequest) (*NotificationReply, error) {
|
|
|
|
|
return nil, status.Errorf(codes.Unimplemented, "method Send not implemented")
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
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.ClientConnInterface
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func NewHealthClient(cc grpc.ClientConnInterface) 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)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// UnimplementedHealthServer can be embedded to have forward compatible implementations.
|
|
|
|
|
type UnimplementedHealthServer struct{}
|
|
|
|
|
|
|
|
|
|
func (*UnimplementedHealthServer) Check(context.Context, *HealthCheckRequest) (*HealthCheckResponse, error) {
|
|
|
|
|
return nil, status.Errorf(codes.Unimplemented, "method Check not implemented")
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
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",
|
|
|
|
|
}
|
|
|
|
|