gorush/rpc/proto/gorush.pb.go

650 lines
22 KiB
Go

// Code generated by protoc-gen-go. DO NOT EDIT.
// source: gorush.proto
package proto
import (
context "context"
fmt "fmt"
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"
math "math"
)
// 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.ProtoPackageIsVersion3 // 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_40935fa25e258221, []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,proto3" json:"locArgs,omitempty"`
TitleLocArgs []string `protobuf:"bytes,10,rep,name=titleLocArgs,proto3" json:"titleLocArgs,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
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_40935fa25e258221, []int{0}
}
func (m *Alert) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_Alert.Unmarshal(m, b)
}
func (m *Alert) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_Alert.Marshal(b, m, deterministic)
}
func (m *Alert) XXX_Merge(src proto.Message) {
xxx_messageInfo_Alert.Merge(m, src)
}
func (m *Alert) XXX_Size() int {
return xxx_messageInfo_Alert.Size(m)
}
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,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"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
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_40935fa25e258221, []int{1}
}
func (m *NotificationRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_NotificationRequest.Unmarshal(m, b)
}
func (m *NotificationRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_NotificationRequest.Marshal(b, m, deterministic)
}
func (m *NotificationRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_NotificationRequest.Merge(m, src)
}
func (m *NotificationRequest) XXX_Size() int {
return xxx_messageInfo_NotificationRequest.Size(m)
}
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
}
func (m *NotificationRequest) GetData() *_struct.Struct {
if m != nil {
return m.Data
}
return nil
}
func (m *NotificationRequest) GetImage() string {
if m != nil {
return m.Image
}
return ""
}
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"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
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_40935fa25e258221, []int{2}
}
func (m *NotificationReply) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_NotificationReply.Unmarshal(m, b)
}
func (m *NotificationReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_NotificationReply.Marshal(b, m, deterministic)
}
func (m *NotificationReply) XXX_Merge(src proto.Message) {
xxx_messageInfo_NotificationReply.Merge(m, src)
}
func (m *NotificationReply) XXX_Size() int {
return xxx_messageInfo_NotificationReply.Size(m)
}
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"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
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_40935fa25e258221, []int{3}
}
func (m *HealthCheckRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_HealthCheckRequest.Unmarshal(m, b)
}
func (m *HealthCheckRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_HealthCheckRequest.Marshal(b, m, deterministic)
}
func (m *HealthCheckRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_HealthCheckRequest.Merge(m, src)
}
func (m *HealthCheckRequest) XXX_Size() int {
return xxx_messageInfo_HealthCheckRequest.Size(m)
}
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"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
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_40935fa25e258221, []int{4}
}
func (m *HealthCheckResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_HealthCheckResponse.Unmarshal(m, b)
}
func (m *HealthCheckResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_HealthCheckResponse.Marshal(b, m, deterministic)
}
func (m *HealthCheckResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_HealthCheckResponse.Merge(m, src)
}
func (m *HealthCheckResponse) XXX_Size() int {
return xxx_messageInfo_HealthCheckResponse.Size(m)
}
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.RegisterEnum("proto.HealthCheckResponse_ServingStatus", HealthCheckResponse_ServingStatus_name, HealthCheckResponse_ServingStatus_value)
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")
}
func init() {
proto.RegisterFile("gorush.proto", fileDescriptor_40935fa25e258221)
}
var fileDescriptor_40935fa25e258221 = []byte{
// 614 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x54, 0xdd, 0x6e, 0xd3, 0x30,
0x14, 0x5e, 0xd6, 0xa6, 0x6b, 0x4f, 0xbb, 0xad, 0x78, 0x08, 0x4c, 0xc5, 0x45, 0x95, 0x0b, 0x54,
0x81, 0x94, 0x49, 0xe3, 0x8e, 0x8b, 0x89, 0x69, 0x4c, 0xdb, 0x34, 0x94, 0x49, 0x29, 0x3f, 0x97,
0xc8, 0x71, 0xbc, 0x34, 0x9a, 0x1b, 0x87, 0xd8, 0x99, 0xd4, 0xe7, 0xe0, 0x11, 0x78, 0x11, 0x1e,
0x0d, 0xf9, 0x38, 0x29, 0x2b, 0x94, 0xab, 0xfa, 0xfb, 0xce, 0x8f, 0x3f, 0x9f, 0xf3, 0x35, 0x30,
0xca, 0x54, 0x55, 0xeb, 0x45, 0x58, 0x56, 0xca, 0x28, 0xe2, 0xe3, 0xcf, 0xe4, 0x65, 0xa6, 0x54,
0x26, 0xc5, 0x31, 0xa2, 0xa4, 0xbe, 0x3b, 0xd6, 0xa6, 0xaa, 0xb9, 0x71, 0x49, 0xc1, 0xcf, 0x5d,
0xf0, 0xcf, 0xa4, 0xa8, 0x0c, 0x79, 0x0a, 0xbe, 0xc9, 0x8d, 0x14, 0xd4, 0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, 0x3d, 0x6d,
0x98, 0xa9, 0xdd, 0xc5, 0x07, 0x27, 0xb3, 0x66, 0xf8, 0x5b, 0x72, 0xc3, 0xb9, 0xed, 0x55, 0x64,
0x73, 0xcc, 0x8f, 0x9b, 0xba, 0xe0, 0x1d, 0xec, 0x6f, 0x04, 0xc8, 0x10, 0xf6, 0x3e, 0x47, 0x37,
0xd1, 0xed, 0xd7, 0x68, 0xbc, 0x63, 0xc1, 0xfc, 0x22, 0xfe, 0x72, 0x1d, 0x5d, 0x8e, 0x3d, 0x72,
0x08, 0xc3, 0xe8, 0xf6, 0xd3, 0xb7, 0x96, 0xd8, 0x3d, 0xb9, 0x82, 0xde, 0x25, 0x7e, 0x2a, 0xc8,
0x29, 0x74, 0xe7, 0xa2, 0x48, 0xc9, 0xa4, 0xb9, 0x7f, 0x8b, 0xcb, 0x27, 0x74, 0x6b, 0xac, 0x94,
0xab, 0x60, 0xc7, 0x76, 0x72, 0x92, 0xc9, 0x29, 0xf8, 0x28, 0x9b, 0xbc, 0xd8, 0xf6, 0x14, 0xd7,
0x69, 0xf2, 0xff, 0x57, 0x26, 0x3d, 0x0c, 0xbd, 0xfd, 0x1d, 0x00, 0x00, 0xff, 0xff, 0xa0, 0xcb,
0xd2, 0xf3, 0xc5, 0x04, 0x00, 0x00,
}
// Reference imports to suppress errors if they are not otherwise used.
var _ context.Context
var _ 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(ctx context.Context, req *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(ctx context.Context, req *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",
}