Postman the notifier

This commit is contained in:
2024-07-21 13:51:46 +08:00
parent 037fc8a18c
commit d74cdddbaf
22 changed files with 1361 additions and 195 deletions

View File

@ -1,6 +1,6 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.34.2
// protoc-gen-go v1.28.1
// protoc v5.27.1
// source: auth.proto
@ -626,7 +626,7 @@ func file_auth_proto_rawDescGZIP() []byte {
}
var file_auth_proto_msgTypes = make([]protoimpl.MessageInfo, 8)
var file_auth_proto_goTypes = []any{
var file_auth_proto_goTypes = []interface{}{
(*UserInfo)(nil), // 0: proto.UserInfo
(*AuthInfo)(nil), // 1: proto.AuthInfo
(*AuthRequest)(nil), // 2: proto.AuthRequest
@ -658,7 +658,7 @@ func file_auth_proto_init() {
return
}
if !protoimpl.UnsafeEnabled {
file_auth_proto_msgTypes[0].Exporter = func(v any, i int) any {
file_auth_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*UserInfo); i {
case 0:
return &v.state
@ -670,7 +670,7 @@ func file_auth_proto_init() {
return nil
}
}
file_auth_proto_msgTypes[1].Exporter = func(v any, i int) any {
file_auth_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*AuthInfo); i {
case 0:
return &v.state
@ -682,7 +682,7 @@ func file_auth_proto_init() {
return nil
}
}
file_auth_proto_msgTypes[2].Exporter = func(v any, i int) any {
file_auth_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*AuthRequest); i {
case 0:
return &v.state
@ -694,7 +694,7 @@ func file_auth_proto_init() {
return nil
}
}
file_auth_proto_msgTypes[3].Exporter = func(v any, i int) any {
file_auth_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*AuthReply); i {
case 0:
return &v.state
@ -706,7 +706,7 @@ func file_auth_proto_init() {
return nil
}
}
file_auth_proto_msgTypes[4].Exporter = func(v any, i int) any {
file_auth_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CheckPermRequest); i {
case 0:
return &v.state
@ -718,7 +718,7 @@ func file_auth_proto_init() {
return nil
}
}
file_auth_proto_msgTypes[5].Exporter = func(v any, i int) any {
file_auth_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CheckPermResponse); i {
case 0:
return &v.state
@ -730,7 +730,7 @@ func file_auth_proto_init() {
return nil
}
}
file_auth_proto_msgTypes[6].Exporter = func(v any, i int) any {
file_auth_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CheckUserPermRequest); i {
case 0:
return &v.state
@ -742,7 +742,7 @@ func file_auth_proto_init() {
return nil
}
}
file_auth_proto_msgTypes[7].Exporter = func(v any, i int) any {
file_auth_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CheckUserPermResponse); i {
case 0:
return &v.state
@ -755,10 +755,10 @@ func file_auth_proto_init() {
}
}
}
file_auth_proto_msgTypes[0].OneofWrappers = []any{}
file_auth_proto_msgTypes[1].OneofWrappers = []any{}
file_auth_proto_msgTypes[2].OneofWrappers = []any{}
file_auth_proto_msgTypes[3].OneofWrappers = []any{}
file_auth_proto_msgTypes[0].OneofWrappers = []interface{}{}
file_auth_proto_msgTypes[1].OneofWrappers = []interface{}{}
file_auth_proto_msgTypes[2].OneofWrappers = []interface{}{}
file_auth_proto_msgTypes[3].OneofWrappers = []interface{}{}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{

View File

@ -1,6 +1,6 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.4.0
// - protoc-gen-go-grpc v1.2.0
// - protoc v5.27.1
// source: auth.proto
@ -15,14 +15,8 @@ import (
// 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.62.0 or later.
const _ = grpc.SupportPackageIsVersion8
const (
Auth_Authenticate_FullMethodName = "/proto.Auth/Authenticate"
Auth_EnsurePermGranted_FullMethodName = "/proto.Auth/EnsurePermGranted"
Auth_EnsureUserPermGranted_FullMethodName = "/proto.Auth/EnsureUserPermGranted"
)
// Requires gRPC-Go v1.32.0 or later.
const _ = grpc.SupportPackageIsVersion7
// AuthClient is the client API for Auth service.
//
@ -42,9 +36,8 @@ func NewAuthClient(cc grpc.ClientConnInterface) AuthClient {
}
func (c *authClient) Authenticate(ctx context.Context, in *AuthRequest, opts ...grpc.CallOption) (*AuthReply, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(AuthReply)
err := c.cc.Invoke(ctx, Auth_Authenticate_FullMethodName, in, out, cOpts...)
err := c.cc.Invoke(ctx, "/proto.Auth/Authenticate", in, out, opts...)
if err != nil {
return nil, err
}
@ -52,9 +45,8 @@ func (c *authClient) Authenticate(ctx context.Context, in *AuthRequest, opts ...
}
func (c *authClient) EnsurePermGranted(ctx context.Context, in *CheckPermRequest, opts ...grpc.CallOption) (*CheckPermResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(CheckPermResponse)
err := c.cc.Invoke(ctx, Auth_EnsurePermGranted_FullMethodName, in, out, cOpts...)
err := c.cc.Invoke(ctx, "/proto.Auth/EnsurePermGranted", in, out, opts...)
if err != nil {
return nil, err
}
@ -62,9 +54,8 @@ func (c *authClient) EnsurePermGranted(ctx context.Context, in *CheckPermRequest
}
func (c *authClient) EnsureUserPermGranted(ctx context.Context, in *CheckUserPermRequest, opts ...grpc.CallOption) (*CheckUserPermResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(CheckUserPermResponse)
err := c.cc.Invoke(ctx, Auth_EnsureUserPermGranted_FullMethodName, in, out, cOpts...)
err := c.cc.Invoke(ctx, "/proto.Auth/EnsureUserPermGranted", in, out, opts...)
if err != nil {
return nil, err
}
@ -117,7 +108,7 @@ func _Auth_Authenticate_Handler(srv interface{}, ctx context.Context, dec func(i
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Auth_Authenticate_FullMethodName,
FullMethod: "/proto.Auth/Authenticate",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(AuthServer).Authenticate(ctx, req.(*AuthRequest))
@ -135,7 +126,7 @@ func _Auth_EnsurePermGranted_Handler(srv interface{}, ctx context.Context, dec f
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Auth_EnsurePermGranted_FullMethodName,
FullMethod: "/proto.Auth/EnsurePermGranted",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(AuthServer).EnsurePermGranted(ctx, req.(*CheckPermRequest))
@ -153,7 +144,7 @@ func _Auth_EnsureUserPermGranted_Handler(srv interface{}, ctx context.Context, d
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Auth_EnsureUserPermGranted_FullMethodName,
FullMethod: "/proto.Auth/EnsureUserPermGranted",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(AuthServer).EnsureUserPermGranted(ctx, req.(*CheckUserPermRequest))

View File

@ -1,6 +1,6 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.34.2
// protoc-gen-go v1.28.1
// protoc v5.27.1
// source: notify.proto
@ -367,7 +367,7 @@ func file_notify_proto_rawDescGZIP() []byte {
}
var file_notify_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
var file_notify_proto_goTypes = []any{
var file_notify_proto_goTypes = []interface{}{
(*NotifyUserRequest)(nil), // 0: proto.NotifyUserRequest
(*NotifyUserBatchRequest)(nil), // 1: proto.NotifyUserBatchRequest
(*NotifyRequest)(nil), // 2: proto.NotifyRequest
@ -395,7 +395,7 @@ func file_notify_proto_init() {
return
}
if !protoimpl.UnsafeEnabled {
file_notify_proto_msgTypes[0].Exporter = func(v any, i int) any {
file_notify_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*NotifyUserRequest); i {
case 0:
return &v.state
@ -407,7 +407,7 @@ func file_notify_proto_init() {
return nil
}
}
file_notify_proto_msgTypes[1].Exporter = func(v any, i int) any {
file_notify_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*NotifyUserBatchRequest); i {
case 0:
return &v.state
@ -419,7 +419,7 @@ func file_notify_proto_init() {
return nil
}
}
file_notify_proto_msgTypes[2].Exporter = func(v any, i int) any {
file_notify_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*NotifyRequest); i {
case 0:
return &v.state
@ -431,7 +431,7 @@ func file_notify_proto_init() {
return nil
}
}
file_notify_proto_msgTypes[3].Exporter = func(v any, i int) any {
file_notify_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*NotifyResponse); i {
case 0:
return &v.state
@ -444,7 +444,7 @@ func file_notify_proto_init() {
}
}
}
file_notify_proto_msgTypes[2].OneofWrappers = []any{}
file_notify_proto_msgTypes[2].OneofWrappers = []interface{}{}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{

View File

@ -1,6 +1,6 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.4.0
// - protoc-gen-go-grpc v1.2.0
// - protoc v5.27.1
// source: notify.proto
@ -15,14 +15,8 @@ import (
// 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.62.0 or later.
const _ = grpc.SupportPackageIsVersion8
const (
Notifier_NotifyUser_FullMethodName = "/proto.Notifier/NotifyUser"
Notifier_NotifyUserBatch_FullMethodName = "/proto.Notifier/NotifyUserBatch"
Notifier_NotifyAllUser_FullMethodName = "/proto.Notifier/NotifyAllUser"
)
// Requires gRPC-Go v1.32.0 or later.
const _ = grpc.SupportPackageIsVersion7
// NotifierClient is the client API for Notifier service.
//
@ -42,9 +36,8 @@ func NewNotifierClient(cc grpc.ClientConnInterface) NotifierClient {
}
func (c *notifierClient) NotifyUser(ctx context.Context, in *NotifyUserRequest, opts ...grpc.CallOption) (*NotifyResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(NotifyResponse)
err := c.cc.Invoke(ctx, Notifier_NotifyUser_FullMethodName, in, out, cOpts...)
err := c.cc.Invoke(ctx, "/proto.Notifier/NotifyUser", in, out, opts...)
if err != nil {
return nil, err
}
@ -52,9 +45,8 @@ func (c *notifierClient) NotifyUser(ctx context.Context, in *NotifyUserRequest,
}
func (c *notifierClient) NotifyUserBatch(ctx context.Context, in *NotifyUserBatchRequest, opts ...grpc.CallOption) (*NotifyResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(NotifyResponse)
err := c.cc.Invoke(ctx, Notifier_NotifyUserBatch_FullMethodName, in, out, cOpts...)
err := c.cc.Invoke(ctx, "/proto.Notifier/NotifyUserBatch", in, out, opts...)
if err != nil {
return nil, err
}
@ -62,9 +54,8 @@ func (c *notifierClient) NotifyUserBatch(ctx context.Context, in *NotifyUserBatc
}
func (c *notifierClient) NotifyAllUser(ctx context.Context, in *NotifyRequest, opts ...grpc.CallOption) (*NotifyResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(NotifyResponse)
err := c.cc.Invoke(ctx, Notifier_NotifyAllUser_FullMethodName, in, out, cOpts...)
err := c.cc.Invoke(ctx, "/proto.Notifier/NotifyAllUser", in, out, opts...)
if err != nil {
return nil, err
}
@ -117,7 +108,7 @@ func _Notifier_NotifyUser_Handler(srv interface{}, ctx context.Context, dec func
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Notifier_NotifyUser_FullMethodName,
FullMethod: "/proto.Notifier/NotifyUser",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(NotifierServer).NotifyUser(ctx, req.(*NotifyUserRequest))
@ -135,7 +126,7 @@ func _Notifier_NotifyUserBatch_Handler(srv interface{}, ctx context.Context, dec
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Notifier_NotifyUserBatch_FullMethodName,
FullMethod: "/proto.Notifier/NotifyUserBatch",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(NotifierServer).NotifyUserBatch(ctx, req.(*NotifyUserBatchRequest))
@ -153,7 +144,7 @@ func _Notifier_NotifyAllUser_Handler(srv interface{}, ctx context.Context, dec f
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Notifier_NotifyAllUser_FullMethodName,
FullMethod: "/proto.Notifier/NotifyAllUser",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(NotifierServer).NotifyAllUser(ctx, req.(*NotifyRequest))

570
pkg/proto/postman.pb.go Normal file
View File

@ -0,0 +1,570 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.28.1
// protoc v5.27.1
// source: postman.proto
package proto
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
type DeliverNotificationRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Provider string `protobuf:"bytes,1,opt,name=provider,proto3" json:"provider,omitempty"`
DeviceToken string `protobuf:"bytes,2,opt,name=device_token,json=deviceToken,proto3" json:"device_token,omitempty"`
Notify *NotifyRequest `protobuf:"bytes,3,opt,name=notify,proto3" json:"notify,omitempty"`
}
func (x *DeliverNotificationRequest) Reset() {
*x = DeliverNotificationRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_postman_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *DeliverNotificationRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*DeliverNotificationRequest) ProtoMessage() {}
func (x *DeliverNotificationRequest) ProtoReflect() protoreflect.Message {
mi := &file_postman_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use DeliverNotificationRequest.ProtoReflect.Descriptor instead.
func (*DeliverNotificationRequest) Descriptor() ([]byte, []int) {
return file_postman_proto_rawDescGZIP(), []int{0}
}
func (x *DeliverNotificationRequest) GetProvider() string {
if x != nil {
return x.Provider
}
return ""
}
func (x *DeliverNotificationRequest) GetDeviceToken() string {
if x != nil {
return x.DeviceToken
}
return ""
}
func (x *DeliverNotificationRequest) GetNotify() *NotifyRequest {
if x != nil {
return x.Notify
}
return nil
}
type DeliverNotificationBatchRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Providers []string `protobuf:"bytes,1,rep,name=providers,proto3" json:"providers,omitempty"`
DeviceTokens []string `protobuf:"bytes,2,rep,name=device_tokens,json=deviceTokens,proto3" json:"device_tokens,omitempty"`
Notify *NotifyRequest `protobuf:"bytes,3,opt,name=notify,proto3" json:"notify,omitempty"`
}
func (x *DeliverNotificationBatchRequest) Reset() {
*x = DeliverNotificationBatchRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_postman_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *DeliverNotificationBatchRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*DeliverNotificationBatchRequest) ProtoMessage() {}
func (x *DeliverNotificationBatchRequest) ProtoReflect() protoreflect.Message {
mi := &file_postman_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use DeliverNotificationBatchRequest.ProtoReflect.Descriptor instead.
func (*DeliverNotificationBatchRequest) Descriptor() ([]byte, []int) {
return file_postman_proto_rawDescGZIP(), []int{1}
}
func (x *DeliverNotificationBatchRequest) GetProviders() []string {
if x != nil {
return x.Providers
}
return nil
}
func (x *DeliverNotificationBatchRequest) GetDeviceTokens() []string {
if x != nil {
return x.DeviceTokens
}
return nil
}
func (x *DeliverNotificationBatchRequest) GetNotify() *NotifyRequest {
if x != nil {
return x.Notify
}
return nil
}
type DeliverEmailRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
To string `protobuf:"bytes,1,opt,name=to,proto3" json:"to,omitempty"`
Email *EmailRequest `protobuf:"bytes,2,opt,name=email,proto3" json:"email,omitempty"`
}
func (x *DeliverEmailRequest) Reset() {
*x = DeliverEmailRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_postman_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *DeliverEmailRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*DeliverEmailRequest) ProtoMessage() {}
func (x *DeliverEmailRequest) ProtoReflect() protoreflect.Message {
mi := &file_postman_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use DeliverEmailRequest.ProtoReflect.Descriptor instead.
func (*DeliverEmailRequest) Descriptor() ([]byte, []int) {
return file_postman_proto_rawDescGZIP(), []int{2}
}
func (x *DeliverEmailRequest) GetTo() string {
if x != nil {
return x.To
}
return ""
}
func (x *DeliverEmailRequest) GetEmail() *EmailRequest {
if x != nil {
return x.Email
}
return nil
}
type DeliverEmailBatchRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
To []string `protobuf:"bytes,1,rep,name=to,proto3" json:"to,omitempty"`
Email *EmailRequest `protobuf:"bytes,2,opt,name=email,proto3" json:"email,omitempty"`
}
func (x *DeliverEmailBatchRequest) Reset() {
*x = DeliverEmailBatchRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_postman_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *DeliverEmailBatchRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*DeliverEmailBatchRequest) ProtoMessage() {}
func (x *DeliverEmailBatchRequest) ProtoReflect() protoreflect.Message {
mi := &file_postman_proto_msgTypes[3]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use DeliverEmailBatchRequest.ProtoReflect.Descriptor instead.
func (*DeliverEmailBatchRequest) Descriptor() ([]byte, []int) {
return file_postman_proto_rawDescGZIP(), []int{3}
}
func (x *DeliverEmailBatchRequest) GetTo() []string {
if x != nil {
return x.To
}
return nil
}
func (x *DeliverEmailBatchRequest) GetEmail() *EmailRequest {
if x != nil {
return x.Email
}
return nil
}
type EmailRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Subject string `protobuf:"bytes,1,opt,name=subject,proto3" json:"subject,omitempty"`
TextBody *string `protobuf:"bytes,2,opt,name=text_body,json=textBody,proto3,oneof" json:"text_body,omitempty"`
HtmlBody *string `protobuf:"bytes,3,opt,name=html_body,json=htmlBody,proto3,oneof" json:"html_body,omitempty"`
}
func (x *EmailRequest) Reset() {
*x = EmailRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_postman_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *EmailRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*EmailRequest) ProtoMessage() {}
func (x *EmailRequest) ProtoReflect() protoreflect.Message {
mi := &file_postman_proto_msgTypes[4]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use EmailRequest.ProtoReflect.Descriptor instead.
func (*EmailRequest) Descriptor() ([]byte, []int) {
return file_postman_proto_rawDescGZIP(), []int{4}
}
func (x *EmailRequest) GetSubject() string {
if x != nil {
return x.Subject
}
return ""
}
func (x *EmailRequest) GetTextBody() string {
if x != nil && x.TextBody != nil {
return *x.TextBody
}
return ""
}
func (x *EmailRequest) GetHtmlBody() string {
if x != nil && x.HtmlBody != nil {
return *x.HtmlBody
}
return ""
}
type DeliverResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
}
func (x *DeliverResponse) Reset() {
*x = DeliverResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_postman_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *DeliverResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*DeliverResponse) ProtoMessage() {}
func (x *DeliverResponse) ProtoReflect() protoreflect.Message {
mi := &file_postman_proto_msgTypes[5]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use DeliverResponse.ProtoReflect.Descriptor instead.
func (*DeliverResponse) Descriptor() ([]byte, []int) {
return file_postman_proto_rawDescGZIP(), []int{5}
}
var File_postman_proto protoreflect.FileDescriptor
var file_postman_proto_rawDesc = []byte{
0x0a, 0x0d, 0x70, 0x6f, 0x73, 0x74, 0x6d, 0x61, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12,
0x05, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0c, 0x6e, 0x6f, 0x74, 0x69, 0x66, 0x79, 0x2e, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x22, 0x89, 0x01, 0x0a, 0x1a, 0x44, 0x65, 0x6c, 0x69, 0x76, 0x65, 0x72,
0x4e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75,
0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x18,
0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x12,
0x21, 0x0a, 0x0c, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18,
0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x6f, 0x6b,
0x65, 0x6e, 0x12, 0x2c, 0x0a, 0x06, 0x6e, 0x6f, 0x74, 0x69, 0x66, 0x79, 0x18, 0x03, 0x20, 0x01,
0x28, 0x0b, 0x32, 0x14, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x4e, 0x6f, 0x74, 0x69, 0x66,
0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x06, 0x6e, 0x6f, 0x74, 0x69, 0x66, 0x79,
0x22, 0x92, 0x01, 0x0a, 0x1f, 0x44, 0x65, 0x6c, 0x69, 0x76, 0x65, 0x72, 0x4e, 0x6f, 0x74, 0x69,
0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x71,
0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72,
0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65,
0x72, 0x73, 0x12, 0x23, 0x0a, 0x0d, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x74, 0x6f, 0x6b,
0x65, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0c, 0x64, 0x65, 0x76, 0x69, 0x63,
0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x12, 0x2c, 0x0a, 0x06, 0x6e, 0x6f, 0x74, 0x69, 0x66,
0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e,
0x4e, 0x6f, 0x74, 0x69, 0x66, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x06, 0x6e,
0x6f, 0x74, 0x69, 0x66, 0x79, 0x22, 0x50, 0x0a, 0x13, 0x44, 0x65, 0x6c, 0x69, 0x76, 0x65, 0x72,
0x45, 0x6d, 0x61, 0x69, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02,
0x74, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x74, 0x6f, 0x12, 0x29, 0x0a, 0x05,
0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x2e, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x22, 0x55, 0x0a, 0x18, 0x44, 0x65, 0x6c, 0x69, 0x76,
0x65, 0x72, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x42, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75,
0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x74, 0x6f, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52,
0x02, 0x74, 0x6f, 0x12, 0x29, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x02, 0x20, 0x01,
0x28, 0x0b, 0x32, 0x13, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x45, 0x6d, 0x61, 0x69, 0x6c,
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x22, 0x88,
0x01, 0x0a, 0x0c, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12,
0x18, 0x0a, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
0x52, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x20, 0x0a, 0x09, 0x74, 0x65, 0x78,
0x74, 0x5f, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x08,
0x74, 0x65, 0x78, 0x74, 0x42, 0x6f, 0x64, 0x79, 0x88, 0x01, 0x01, 0x12, 0x20, 0x0a, 0x09, 0x68,
0x74, 0x6d, 0x6c, 0x5f, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01,
0x52, 0x08, 0x68, 0x74, 0x6d, 0x6c, 0x42, 0x6f, 0x64, 0x79, 0x88, 0x01, 0x01, 0x42, 0x0c, 0x0a,
0x0a, 0x5f, 0x74, 0x65, 0x78, 0x74, 0x5f, 0x62, 0x6f, 0x64, 0x79, 0x42, 0x0c, 0x0a, 0x0a, 0x5f,
0x68, 0x74, 0x6d, 0x6c, 0x5f, 0x62, 0x6f, 0x64, 0x79, 0x22, 0x11, 0x0a, 0x0f, 0x44, 0x65, 0x6c,
0x69, 0x76, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xd1, 0x02, 0x0a,
0x07, 0x50, 0x6f, 0x73, 0x74, 0x6d, 0x61, 0x6e, 0x12, 0x52, 0x0a, 0x13, 0x44, 0x65, 0x6c, 0x69,
0x76, 0x65, 0x72, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12,
0x21, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x44, 0x65, 0x6c, 0x69, 0x76, 0x65, 0x72, 0x4e,
0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65,
0x73, 0x74, 0x1a, 0x16, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x44, 0x65, 0x6c, 0x69, 0x76,
0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x5c, 0x0a, 0x18,
0x44, 0x65, 0x6c, 0x69, 0x76, 0x65, 0x72, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74,
0x69, 0x6f, 0x6e, 0x42, 0x61, 0x74, 0x63, 0x68, 0x12, 0x26, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
0x2e, 0x44, 0x65, 0x6c, 0x69, 0x76, 0x65, 0x72, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61,
0x74, 0x69, 0x6f, 0x6e, 0x42, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
0x1a, 0x16, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x44, 0x65, 0x6c, 0x69, 0x76, 0x65, 0x72,
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x44, 0x0a, 0x0c, 0x44, 0x65,
0x6c, 0x69, 0x76, 0x65, 0x72, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x1a, 0x2e, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x2e, 0x44, 0x65, 0x6c, 0x69, 0x76, 0x65, 0x72, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x52,
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x44,
0x65, 0x6c, 0x69, 0x76, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00,
0x12, 0x4e, 0x0a, 0x11, 0x44, 0x65, 0x6c, 0x69, 0x76, 0x65, 0x72, 0x45, 0x6d, 0x61, 0x69, 0x6c,
0x42, 0x61, 0x74, 0x63, 0x68, 0x12, 0x1f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x44, 0x65,
0x6c, 0x69, 0x76, 0x65, 0x72, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x42, 0x61, 0x74, 0x63, 0x68, 0x52,
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x44,
0x65, 0x6c, 0x69, 0x76, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00,
0x42, 0x09, 0x5a, 0x07, 0x2e, 0x3b, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x33,
}
var (
file_postman_proto_rawDescOnce sync.Once
file_postman_proto_rawDescData = file_postman_proto_rawDesc
)
func file_postman_proto_rawDescGZIP() []byte {
file_postman_proto_rawDescOnce.Do(func() {
file_postman_proto_rawDescData = protoimpl.X.CompressGZIP(file_postman_proto_rawDescData)
})
return file_postman_proto_rawDescData
}
var file_postman_proto_msgTypes = make([]protoimpl.MessageInfo, 6)
var file_postman_proto_goTypes = []interface{}{
(*DeliverNotificationRequest)(nil), // 0: proto.DeliverNotificationRequest
(*DeliverNotificationBatchRequest)(nil), // 1: proto.DeliverNotificationBatchRequest
(*DeliverEmailRequest)(nil), // 2: proto.DeliverEmailRequest
(*DeliverEmailBatchRequest)(nil), // 3: proto.DeliverEmailBatchRequest
(*EmailRequest)(nil), // 4: proto.EmailRequest
(*DeliverResponse)(nil), // 5: proto.DeliverResponse
(*NotifyRequest)(nil), // 6: proto.NotifyRequest
}
var file_postman_proto_depIdxs = []int32{
6, // 0: proto.DeliverNotificationRequest.notify:type_name -> proto.NotifyRequest
6, // 1: proto.DeliverNotificationBatchRequest.notify:type_name -> proto.NotifyRequest
4, // 2: proto.DeliverEmailRequest.email:type_name -> proto.EmailRequest
4, // 3: proto.DeliverEmailBatchRequest.email:type_name -> proto.EmailRequest
0, // 4: proto.Postman.DeliverNotification:input_type -> proto.DeliverNotificationRequest
1, // 5: proto.Postman.DeliverNotificationBatch:input_type -> proto.DeliverNotificationBatchRequest
2, // 6: proto.Postman.DeliverEmail:input_type -> proto.DeliverEmailRequest
3, // 7: proto.Postman.DeliverEmailBatch:input_type -> proto.DeliverEmailBatchRequest
5, // 8: proto.Postman.DeliverNotification:output_type -> proto.DeliverResponse
5, // 9: proto.Postman.DeliverNotificationBatch:output_type -> proto.DeliverResponse
5, // 10: proto.Postman.DeliverEmail:output_type -> proto.DeliverResponse
5, // 11: proto.Postman.DeliverEmailBatch:output_type -> proto.DeliverResponse
8, // [8:12] is the sub-list for method output_type
4, // [4:8] is the sub-list for method input_type
4, // [4:4] is the sub-list for extension type_name
4, // [4:4] is the sub-list for extension extendee
0, // [0:4] is the sub-list for field type_name
}
func init() { file_postman_proto_init() }
func file_postman_proto_init() {
if File_postman_proto != nil {
return
}
file_notify_proto_init()
if !protoimpl.UnsafeEnabled {
file_postman_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*DeliverNotificationRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_postman_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*DeliverNotificationBatchRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_postman_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*DeliverEmailRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_postman_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*DeliverEmailBatchRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_postman_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*EmailRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_postman_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*DeliverResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
file_postman_proto_msgTypes[4].OneofWrappers = []interface{}{}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_postman_proto_rawDesc,
NumEnums: 0,
NumMessages: 6,
NumExtensions: 0,
NumServices: 1,
},
GoTypes: file_postman_proto_goTypes,
DependencyIndexes: file_postman_proto_depIdxs,
MessageInfos: file_postman_proto_msgTypes,
}.Build()
File_postman_proto = out.File
file_postman_proto_rawDesc = nil
file_postman_proto_goTypes = nil
file_postman_proto_depIdxs = nil
}

45
pkg/proto/postman.proto Normal file
View File

@ -0,0 +1,45 @@
syntax = "proto3";
option go_package = ".;proto";
import "notify.proto";
package proto;
service Postman {
rpc DeliverNotification(DeliverNotificationRequest) returns (DeliverResponse) {}
rpc DeliverNotificationBatch(DeliverNotificationBatchRequest) returns (DeliverResponse) {}
rpc DeliverEmail(DeliverEmailRequest) returns (DeliverResponse) {}
rpc DeliverEmailBatch(DeliverEmailBatchRequest) returns (DeliverResponse) {}
}
message DeliverNotificationRequest {
string provider = 1;
string device_token = 2;
NotifyRequest notify = 3;
}
message DeliverNotificationBatchRequest {
repeated string providers = 1;
repeated string device_tokens = 2;
NotifyRequest notify = 3;
}
message DeliverEmailRequest {
string to = 1;
EmailRequest email = 2;
}
message DeliverEmailBatchRequest {
repeated string to = 1;
EmailRequest email = 2;
}
message EmailRequest {
string subject = 1;
optional string text_body = 2;
optional string html_body = 3;
}
message DeliverResponse {
}

View File

@ -0,0 +1,213 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.2.0
// - protoc v5.27.1
// source: postman.proto
package proto
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.32.0 or later.
const _ = grpc.SupportPackageIsVersion7
// PostmanClient is the client API for Postman 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 PostmanClient interface {
DeliverNotification(ctx context.Context, in *DeliverNotificationRequest, opts ...grpc.CallOption) (*DeliverResponse, error)
DeliverNotificationBatch(ctx context.Context, in *DeliverNotificationBatchRequest, opts ...grpc.CallOption) (*DeliverResponse, error)
DeliverEmail(ctx context.Context, in *DeliverEmailRequest, opts ...grpc.CallOption) (*DeliverResponse, error)
DeliverEmailBatch(ctx context.Context, in *DeliverEmailBatchRequest, opts ...grpc.CallOption) (*DeliverResponse, error)
}
type postmanClient struct {
cc grpc.ClientConnInterface
}
func NewPostmanClient(cc grpc.ClientConnInterface) PostmanClient {
return &postmanClient{cc}
}
func (c *postmanClient) DeliverNotification(ctx context.Context, in *DeliverNotificationRequest, opts ...grpc.CallOption) (*DeliverResponse, error) {
out := new(DeliverResponse)
err := c.cc.Invoke(ctx, "/proto.Postman/DeliverNotification", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *postmanClient) DeliverNotificationBatch(ctx context.Context, in *DeliverNotificationBatchRequest, opts ...grpc.CallOption) (*DeliverResponse, error) {
out := new(DeliverResponse)
err := c.cc.Invoke(ctx, "/proto.Postman/DeliverNotificationBatch", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *postmanClient) DeliverEmail(ctx context.Context, in *DeliverEmailRequest, opts ...grpc.CallOption) (*DeliverResponse, error) {
out := new(DeliverResponse)
err := c.cc.Invoke(ctx, "/proto.Postman/DeliverEmail", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *postmanClient) DeliverEmailBatch(ctx context.Context, in *DeliverEmailBatchRequest, opts ...grpc.CallOption) (*DeliverResponse, error) {
out := new(DeliverResponse)
err := c.cc.Invoke(ctx, "/proto.Postman/DeliverEmailBatch", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// PostmanServer is the server API for Postman service.
// All implementations must embed UnimplementedPostmanServer
// for forward compatibility
type PostmanServer interface {
DeliverNotification(context.Context, *DeliverNotificationRequest) (*DeliverResponse, error)
DeliverNotificationBatch(context.Context, *DeliverNotificationBatchRequest) (*DeliverResponse, error)
DeliverEmail(context.Context, *DeliverEmailRequest) (*DeliverResponse, error)
DeliverEmailBatch(context.Context, *DeliverEmailBatchRequest) (*DeliverResponse, error)
mustEmbedUnimplementedPostmanServer()
}
// UnimplementedPostmanServer must be embedded to have forward compatible implementations.
type UnimplementedPostmanServer struct {
}
func (UnimplementedPostmanServer) DeliverNotification(context.Context, *DeliverNotificationRequest) (*DeliverResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method DeliverNotification not implemented")
}
func (UnimplementedPostmanServer) DeliverNotificationBatch(context.Context, *DeliverNotificationBatchRequest) (*DeliverResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method DeliverNotificationBatch not implemented")
}
func (UnimplementedPostmanServer) DeliverEmail(context.Context, *DeliverEmailRequest) (*DeliverResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method DeliverEmail not implemented")
}
func (UnimplementedPostmanServer) DeliverEmailBatch(context.Context, *DeliverEmailBatchRequest) (*DeliverResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method DeliverEmailBatch not implemented")
}
func (UnimplementedPostmanServer) mustEmbedUnimplementedPostmanServer() {}
// UnsafePostmanServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to PostmanServer will
// result in compilation errors.
type UnsafePostmanServer interface {
mustEmbedUnimplementedPostmanServer()
}
func RegisterPostmanServer(s grpc.ServiceRegistrar, srv PostmanServer) {
s.RegisterService(&Postman_ServiceDesc, srv)
}
func _Postman_DeliverNotification_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(DeliverNotificationRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(PostmanServer).DeliverNotification(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/proto.Postman/DeliverNotification",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(PostmanServer).DeliverNotification(ctx, req.(*DeliverNotificationRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Postman_DeliverNotificationBatch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(DeliverNotificationBatchRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(PostmanServer).DeliverNotificationBatch(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/proto.Postman/DeliverNotificationBatch",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(PostmanServer).DeliverNotificationBatch(ctx, req.(*DeliverNotificationBatchRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Postman_DeliverEmail_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(DeliverEmailRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(PostmanServer).DeliverEmail(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/proto.Postman/DeliverEmail",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(PostmanServer).DeliverEmail(ctx, req.(*DeliverEmailRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Postman_DeliverEmailBatch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(DeliverEmailBatchRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(PostmanServer).DeliverEmailBatch(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/proto.Postman/DeliverEmailBatch",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(PostmanServer).DeliverEmailBatch(ctx, req.(*DeliverEmailBatchRequest))
}
return interceptor(ctx, in, info, handler)
}
// Postman_ServiceDesc is the grpc.ServiceDesc for Postman service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var Postman_ServiceDesc = grpc.ServiceDesc{
ServiceName: "proto.Postman",
HandlerType: (*PostmanServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "DeliverNotification",
Handler: _Postman_DeliverNotification_Handler,
},
{
MethodName: "DeliverNotificationBatch",
Handler: _Postman_DeliverNotificationBatch_Handler,
},
{
MethodName: "DeliverEmail",
Handler: _Postman_DeliverEmail_Handler,
},
{
MethodName: "DeliverEmailBatch",
Handler: _Postman_DeliverEmailBatch_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "postman.proto",
}

View File

@ -1,6 +1,6 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.34.2
// protoc-gen-go v1.28.1
// protoc v5.27.1
// source: realm.proto
@ -699,7 +699,7 @@ func file_realm_proto_rawDescGZIP() []byte {
}
var file_realm_proto_msgTypes = make([]protoimpl.MessageInfo, 10)
var file_realm_proto_goTypes = []any{
var file_realm_proto_goTypes = []interface{}{
(*RealmInfo)(nil), // 0: proto.RealmInfo
(*ListRealmRequest)(nil), // 1: proto.ListRealmRequest
(*LookupUserRealmRequest)(nil), // 2: proto.LookupUserRealmRequest
@ -741,7 +741,7 @@ func file_realm_proto_init() {
return
}
if !protoimpl.UnsafeEnabled {
file_realm_proto_msgTypes[0].Exporter = func(v any, i int) any {
file_realm_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*RealmInfo); i {
case 0:
return &v.state
@ -753,7 +753,7 @@ func file_realm_proto_init() {
return nil
}
}
file_realm_proto_msgTypes[1].Exporter = func(v any, i int) any {
file_realm_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ListRealmRequest); i {
case 0:
return &v.state
@ -765,7 +765,7 @@ func file_realm_proto_init() {
return nil
}
}
file_realm_proto_msgTypes[2].Exporter = func(v any, i int) any {
file_realm_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*LookupUserRealmRequest); i {
case 0:
return &v.state
@ -777,7 +777,7 @@ func file_realm_proto_init() {
return nil
}
}
file_realm_proto_msgTypes[3].Exporter = func(v any, i int) any {
file_realm_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*LookupRealmRequest); i {
case 0:
return &v.state
@ -789,7 +789,7 @@ func file_realm_proto_init() {
return nil
}
}
file_realm_proto_msgTypes[4].Exporter = func(v any, i int) any {
file_realm_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ListRealmResponse); i {
case 0:
return &v.state
@ -801,7 +801,7 @@ func file_realm_proto_init() {
return nil
}
}
file_realm_proto_msgTypes[5].Exporter = func(v any, i int) any {
file_realm_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*RealmMemberLookupRequest); i {
case 0:
return &v.state
@ -813,7 +813,7 @@ func file_realm_proto_init() {
return nil
}
}
file_realm_proto_msgTypes[6].Exporter = func(v any, i int) any {
file_realm_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*RealmMemberInfo); i {
case 0:
return &v.state
@ -825,7 +825,7 @@ func file_realm_proto_init() {
return nil
}
}
file_realm_proto_msgTypes[7].Exporter = func(v any, i int) any {
file_realm_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ListRealmMemberResponse); i {
case 0:
return &v.state
@ -837,7 +837,7 @@ func file_realm_proto_init() {
return nil
}
}
file_realm_proto_msgTypes[8].Exporter = func(v any, i int) any {
file_realm_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CheckRealmPermRequest); i {
case 0:
return &v.state
@ -849,7 +849,7 @@ func file_realm_proto_init() {
return nil
}
}
file_realm_proto_msgTypes[9].Exporter = func(v any, i int) any {
file_realm_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CheckRealmPermResponse); i {
case 0:
return &v.state
@ -862,8 +862,8 @@ func file_realm_proto_init() {
}
}
}
file_realm_proto_msgTypes[3].OneofWrappers = []any{}
file_realm_proto_msgTypes[5].OneofWrappers = []any{}
file_realm_proto_msgTypes[3].OneofWrappers = []interface{}{}
file_realm_proto_msgTypes[5].OneofWrappers = []interface{}{}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{

View File

@ -1,6 +1,6 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.4.0
// - protoc-gen-go-grpc v1.2.0
// - protoc v5.27.1
// source: realm.proto
@ -15,18 +15,8 @@ import (
// 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.62.0 or later.
const _ = grpc.SupportPackageIsVersion8
const (
Realm_ListCommunityRealm_FullMethodName = "/proto.Realm/ListCommunityRealm"
Realm_ListAvailableRealm_FullMethodName = "/proto.Realm/ListAvailableRealm"
Realm_ListOwnedRealm_FullMethodName = "/proto.Realm/ListOwnedRealm"
Realm_GetRealm_FullMethodName = "/proto.Realm/GetRealm"
Realm_ListRealmMember_FullMethodName = "/proto.Realm/ListRealmMember"
Realm_GetRealmMember_FullMethodName = "/proto.Realm/GetRealmMember"
Realm_CheckRealmMemberPerm_FullMethodName = "/proto.Realm/CheckRealmMemberPerm"
)
// Requires gRPC-Go v1.32.0 or later.
const _ = grpc.SupportPackageIsVersion7
// RealmClient is the client API for Realm service.
//
@ -50,9 +40,8 @@ func NewRealmClient(cc grpc.ClientConnInterface) RealmClient {
}
func (c *realmClient) ListCommunityRealm(ctx context.Context, in *ListRealmRequest, opts ...grpc.CallOption) (*ListRealmResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(ListRealmResponse)
err := c.cc.Invoke(ctx, Realm_ListCommunityRealm_FullMethodName, in, out, cOpts...)
err := c.cc.Invoke(ctx, "/proto.Realm/ListCommunityRealm", in, out, opts...)
if err != nil {
return nil, err
}
@ -60,9 +49,8 @@ func (c *realmClient) ListCommunityRealm(ctx context.Context, in *ListRealmReque
}
func (c *realmClient) ListAvailableRealm(ctx context.Context, in *LookupUserRealmRequest, opts ...grpc.CallOption) (*ListRealmResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(ListRealmResponse)
err := c.cc.Invoke(ctx, Realm_ListAvailableRealm_FullMethodName, in, out, cOpts...)
err := c.cc.Invoke(ctx, "/proto.Realm/ListAvailableRealm", in, out, opts...)
if err != nil {
return nil, err
}
@ -70,9 +58,8 @@ func (c *realmClient) ListAvailableRealm(ctx context.Context, in *LookupUserReal
}
func (c *realmClient) ListOwnedRealm(ctx context.Context, in *LookupUserRealmRequest, opts ...grpc.CallOption) (*ListRealmResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(ListRealmResponse)
err := c.cc.Invoke(ctx, Realm_ListOwnedRealm_FullMethodName, in, out, cOpts...)
err := c.cc.Invoke(ctx, "/proto.Realm/ListOwnedRealm", in, out, opts...)
if err != nil {
return nil, err
}
@ -80,9 +67,8 @@ func (c *realmClient) ListOwnedRealm(ctx context.Context, in *LookupUserRealmReq
}
func (c *realmClient) GetRealm(ctx context.Context, in *LookupRealmRequest, opts ...grpc.CallOption) (*RealmInfo, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(RealmInfo)
err := c.cc.Invoke(ctx, Realm_GetRealm_FullMethodName, in, out, cOpts...)
err := c.cc.Invoke(ctx, "/proto.Realm/GetRealm", in, out, opts...)
if err != nil {
return nil, err
}
@ -90,9 +76,8 @@ func (c *realmClient) GetRealm(ctx context.Context, in *LookupRealmRequest, opts
}
func (c *realmClient) ListRealmMember(ctx context.Context, in *RealmMemberLookupRequest, opts ...grpc.CallOption) (*ListRealmMemberResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(ListRealmMemberResponse)
err := c.cc.Invoke(ctx, Realm_ListRealmMember_FullMethodName, in, out, cOpts...)
err := c.cc.Invoke(ctx, "/proto.Realm/ListRealmMember", in, out, opts...)
if err != nil {
return nil, err
}
@ -100,9 +85,8 @@ func (c *realmClient) ListRealmMember(ctx context.Context, in *RealmMemberLookup
}
func (c *realmClient) GetRealmMember(ctx context.Context, in *RealmMemberLookupRequest, opts ...grpc.CallOption) (*RealmMemberInfo, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(RealmMemberInfo)
err := c.cc.Invoke(ctx, Realm_GetRealmMember_FullMethodName, in, out, cOpts...)
err := c.cc.Invoke(ctx, "/proto.Realm/GetRealmMember", in, out, opts...)
if err != nil {
return nil, err
}
@ -110,9 +94,8 @@ func (c *realmClient) GetRealmMember(ctx context.Context, in *RealmMemberLookupR
}
func (c *realmClient) CheckRealmMemberPerm(ctx context.Context, in *CheckRealmPermRequest, opts ...grpc.CallOption) (*CheckRealmPermResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(CheckRealmPermResponse)
err := c.cc.Invoke(ctx, Realm_CheckRealmMemberPerm_FullMethodName, in, out, cOpts...)
err := c.cc.Invoke(ctx, "/proto.Realm/CheckRealmMemberPerm", in, out, opts...)
if err != nil {
return nil, err
}
@ -181,7 +164,7 @@ func _Realm_ListCommunityRealm_Handler(srv interface{}, ctx context.Context, dec
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Realm_ListCommunityRealm_FullMethodName,
FullMethod: "/proto.Realm/ListCommunityRealm",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(RealmServer).ListCommunityRealm(ctx, req.(*ListRealmRequest))
@ -199,7 +182,7 @@ func _Realm_ListAvailableRealm_Handler(srv interface{}, ctx context.Context, dec
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Realm_ListAvailableRealm_FullMethodName,
FullMethod: "/proto.Realm/ListAvailableRealm",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(RealmServer).ListAvailableRealm(ctx, req.(*LookupUserRealmRequest))
@ -217,7 +200,7 @@ func _Realm_ListOwnedRealm_Handler(srv interface{}, ctx context.Context, dec fun
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Realm_ListOwnedRealm_FullMethodName,
FullMethod: "/proto.Realm/ListOwnedRealm",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(RealmServer).ListOwnedRealm(ctx, req.(*LookupUserRealmRequest))
@ -235,7 +218,7 @@ func _Realm_GetRealm_Handler(srv interface{}, ctx context.Context, dec func(inte
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Realm_GetRealm_FullMethodName,
FullMethod: "/proto.Realm/GetRealm",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(RealmServer).GetRealm(ctx, req.(*LookupRealmRequest))
@ -253,7 +236,7 @@ func _Realm_ListRealmMember_Handler(srv interface{}, ctx context.Context, dec fu
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Realm_ListRealmMember_FullMethodName,
FullMethod: "/proto.Realm/ListRealmMember",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(RealmServer).ListRealmMember(ctx, req.(*RealmMemberLookupRequest))
@ -271,7 +254,7 @@ func _Realm_GetRealmMember_Handler(srv interface{}, ctx context.Context, dec fun
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Realm_GetRealmMember_FullMethodName,
FullMethod: "/proto.Realm/GetRealmMember",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(RealmServer).GetRealmMember(ctx, req.(*RealmMemberLookupRequest))
@ -289,7 +272,7 @@ func _Realm_CheckRealmMemberPerm_Handler(srv interface{}, ctx context.Context, d
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Realm_CheckRealmMemberPerm_FullMethodName,
FullMethod: "/proto.Realm/CheckRealmMemberPerm",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(RealmServer).CheckRealmMemberPerm(ctx, req.(*CheckRealmPermRequest))

View File

@ -1,6 +1,6 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.34.2
// protoc-gen-go v1.28.1
// protoc v5.27.1
// source: record.proto
@ -185,7 +185,7 @@ func file_record_proto_rawDescGZIP() []byte {
}
var file_record_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
var file_record_proto_goTypes = []any{
var file_record_proto_goTypes = []interface{}{
(*RecordEventRequest)(nil), // 0: proto.RecordEventRequest
(*RecordEventResponse)(nil), // 1: proto.RecordEventResponse
}
@ -205,7 +205,7 @@ func file_record_proto_init() {
return
}
if !protoimpl.UnsafeEnabled {
file_record_proto_msgTypes[0].Exporter = func(v any, i int) any {
file_record_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*RecordEventRequest); i {
case 0:
return &v.state
@ -217,7 +217,7 @@ func file_record_proto_init() {
return nil
}
}
file_record_proto_msgTypes[1].Exporter = func(v any, i int) any {
file_record_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*RecordEventResponse); i {
case 0:
return &v.state

View File

@ -1,6 +1,6 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.4.0
// - protoc-gen-go-grpc v1.2.0
// - protoc v5.27.1
// source: record.proto
@ -15,12 +15,8 @@ import (
// 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.62.0 or later.
const _ = grpc.SupportPackageIsVersion8
const (
EventRecorder_RecordEvent_FullMethodName = "/proto.EventRecorder/RecordEvent"
)
// Requires gRPC-Go v1.32.0 or later.
const _ = grpc.SupportPackageIsVersion7
// EventRecorderClient is the client API for EventRecorder service.
//
@ -38,9 +34,8 @@ func NewEventRecorderClient(cc grpc.ClientConnInterface) EventRecorderClient {
}
func (c *eventRecorderClient) RecordEvent(ctx context.Context, in *RecordEventRequest, opts ...grpc.CallOption) (*RecordEventResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(RecordEventResponse)
err := c.cc.Invoke(ctx, EventRecorder_RecordEvent_FullMethodName, in, out, cOpts...)
err := c.cc.Invoke(ctx, "/proto.EventRecorder/RecordEvent", in, out, opts...)
if err != nil {
return nil, err
}
@ -85,7 +80,7 @@ func _EventRecorder_RecordEvent_Handler(srv interface{}, ctx context.Context, de
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: EventRecorder_RecordEvent_FullMethodName,
FullMethod: "/proto.EventRecorder/RecordEvent",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(EventRecorderServer).RecordEvent(ctx, req.(*RecordEventRequest))

View File

@ -1,6 +1,6 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.34.2
// protoc-gen-go v1.28.1
// protoc v5.27.1
// source: services.proto
@ -511,7 +511,7 @@ func file_services_proto_rawDescGZIP() []byte {
}
var file_services_proto_msgTypes = make([]protoimpl.MessageInfo, 8)
var file_services_proto_goTypes = []any{
var file_services_proto_goTypes = []interface{}{
(*ServiceInfo)(nil), // 0: proto.ServiceInfo
(*GetServiceRequest)(nil), // 1: proto.GetServiceRequest
(*GetServiceResponse)(nil), // 2: proto.GetServiceResponse
@ -545,7 +545,7 @@ func file_services_proto_init() {
return
}
if !protoimpl.UnsafeEnabled {
file_services_proto_msgTypes[0].Exporter = func(v any, i int) any {
file_services_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ServiceInfo); i {
case 0:
return &v.state
@ -557,7 +557,7 @@ func file_services_proto_init() {
return nil
}
}
file_services_proto_msgTypes[1].Exporter = func(v any, i int) any {
file_services_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetServiceRequest); i {
case 0:
return &v.state
@ -569,7 +569,7 @@ func file_services_proto_init() {
return nil
}
}
file_services_proto_msgTypes[2].Exporter = func(v any, i int) any {
file_services_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetServiceResponse); i {
case 0:
return &v.state
@ -581,7 +581,7 @@ func file_services_proto_init() {
return nil
}
}
file_services_proto_msgTypes[3].Exporter = func(v any, i int) any {
file_services_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ListServiceRequest); i {
case 0:
return &v.state
@ -593,7 +593,7 @@ func file_services_proto_init() {
return nil
}
}
file_services_proto_msgTypes[4].Exporter = func(v any, i int) any {
file_services_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ListServiceResponse); i {
case 0:
return &v.state
@ -605,7 +605,7 @@ func file_services_proto_init() {
return nil
}
}
file_services_proto_msgTypes[5].Exporter = func(v any, i int) any {
file_services_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*AddServiceResponse); i {
case 0:
return &v.state
@ -617,7 +617,7 @@ func file_services_proto_init() {
return nil
}
}
file_services_proto_msgTypes[6].Exporter = func(v any, i int) any {
file_services_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*RemoveServiceRequest); i {
case 0:
return &v.state
@ -629,7 +629,7 @@ func file_services_proto_init() {
return nil
}
}
file_services_proto_msgTypes[7].Exporter = func(v any, i int) any {
file_services_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*RemoveServiceResponse); i {
case 0:
return &v.state
@ -642,9 +642,9 @@ func file_services_proto_init() {
}
}
}
file_services_proto_msgTypes[0].OneofWrappers = []any{}
file_services_proto_msgTypes[1].OneofWrappers = []any{}
file_services_proto_msgTypes[3].OneofWrappers = []any{}
file_services_proto_msgTypes[0].OneofWrappers = []interface{}{}
file_services_proto_msgTypes[1].OneofWrappers = []interface{}{}
file_services_proto_msgTypes[3].OneofWrappers = []interface{}{}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{

View File

@ -1,6 +1,6 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.4.0
// - protoc-gen-go-grpc v1.2.0
// - protoc v5.27.1
// source: services.proto
@ -15,15 +15,8 @@ import (
// 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.62.0 or later.
const _ = grpc.SupportPackageIsVersion8
const (
ServiceDirectory_GetService_FullMethodName = "/proto.ServiceDirectory/GetService"
ServiceDirectory_ListService_FullMethodName = "/proto.ServiceDirectory/ListService"
ServiceDirectory_AddService_FullMethodName = "/proto.ServiceDirectory/AddService"
ServiceDirectory_RemoveService_FullMethodName = "/proto.ServiceDirectory/RemoveService"
)
// Requires gRPC-Go v1.32.0 or later.
const _ = grpc.SupportPackageIsVersion7
// ServiceDirectoryClient is the client API for ServiceDirectory service.
//
@ -44,9 +37,8 @@ func NewServiceDirectoryClient(cc grpc.ClientConnInterface) ServiceDirectoryClie
}
func (c *serviceDirectoryClient) GetService(ctx context.Context, in *GetServiceRequest, opts ...grpc.CallOption) (*GetServiceResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(GetServiceResponse)
err := c.cc.Invoke(ctx, ServiceDirectory_GetService_FullMethodName, in, out, cOpts...)
err := c.cc.Invoke(ctx, "/proto.ServiceDirectory/GetService", in, out, opts...)
if err != nil {
return nil, err
}
@ -54,9 +46,8 @@ func (c *serviceDirectoryClient) GetService(ctx context.Context, in *GetServiceR
}
func (c *serviceDirectoryClient) ListService(ctx context.Context, in *ListServiceRequest, opts ...grpc.CallOption) (*ListServiceResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(ListServiceResponse)
err := c.cc.Invoke(ctx, ServiceDirectory_ListService_FullMethodName, in, out, cOpts...)
err := c.cc.Invoke(ctx, "/proto.ServiceDirectory/ListService", in, out, opts...)
if err != nil {
return nil, err
}
@ -64,9 +55,8 @@ func (c *serviceDirectoryClient) ListService(ctx context.Context, in *ListServic
}
func (c *serviceDirectoryClient) AddService(ctx context.Context, in *ServiceInfo, opts ...grpc.CallOption) (*AddServiceResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(AddServiceResponse)
err := c.cc.Invoke(ctx, ServiceDirectory_AddService_FullMethodName, in, out, cOpts...)
err := c.cc.Invoke(ctx, "/proto.ServiceDirectory/AddService", in, out, opts...)
if err != nil {
return nil, err
}
@ -74,9 +64,8 @@ func (c *serviceDirectoryClient) AddService(ctx context.Context, in *ServiceInfo
}
func (c *serviceDirectoryClient) RemoveService(ctx context.Context, in *RemoveServiceRequest, opts ...grpc.CallOption) (*RemoveServiceResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(RemoveServiceResponse)
err := c.cc.Invoke(ctx, ServiceDirectory_RemoveService_FullMethodName, in, out, cOpts...)
err := c.cc.Invoke(ctx, "/proto.ServiceDirectory/RemoveService", in, out, opts...)
if err != nil {
return nil, err
}
@ -133,7 +122,7 @@ func _ServiceDirectory_GetService_Handler(srv interface{}, ctx context.Context,
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: ServiceDirectory_GetService_FullMethodName,
FullMethod: "/proto.ServiceDirectory/GetService",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ServiceDirectoryServer).GetService(ctx, req.(*GetServiceRequest))
@ -151,7 +140,7 @@ func _ServiceDirectory_ListService_Handler(srv interface{}, ctx context.Context,
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: ServiceDirectory_ListService_FullMethodName,
FullMethod: "/proto.ServiceDirectory/ListService",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ServiceDirectoryServer).ListService(ctx, req.(*ListServiceRequest))
@ -169,7 +158,7 @@ func _ServiceDirectory_AddService_Handler(srv interface{}, ctx context.Context,
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: ServiceDirectory_AddService_FullMethodName,
FullMethod: "/proto.ServiceDirectory/AddService",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ServiceDirectoryServer).AddService(ctx, req.(*ServiceInfo))
@ -187,7 +176,7 @@ func _ServiceDirectory_RemoveService_Handler(srv interface{}, ctx context.Contex
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: ServiceDirectory_RemoveService_FullMethodName,
FullMethod: "/proto.ServiceDirectory/RemoveService",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ServiceDirectoryServer).RemoveService(ctx, req.(*RemoveServiceRequest))

View File

@ -1,6 +1,6 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.34.2
// protoc-gen-go v1.28.1
// protoc v5.27.1
// source: stream.proto
@ -451,7 +451,7 @@ func file_stream_proto_rawDescGZIP() []byte {
}
var file_stream_proto_msgTypes = make([]protoimpl.MessageInfo, 7)
var file_stream_proto_goTypes = []any{
var file_stream_proto_goTypes = []interface{}{
(*CountConnectionRequest)(nil), // 0: proto.CountConnectionRequest
(*CountConnectionResponse)(nil), // 1: proto.CountConnectionResponse
(*PushStreamRequest)(nil), // 2: proto.PushStreamRequest
@ -482,7 +482,7 @@ func file_stream_proto_init() {
return
}
if !protoimpl.UnsafeEnabled {
file_stream_proto_msgTypes[0].Exporter = func(v any, i int) any {
file_stream_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CountConnectionRequest); i {
case 0:
return &v.state
@ -494,7 +494,7 @@ func file_stream_proto_init() {
return nil
}
}
file_stream_proto_msgTypes[1].Exporter = func(v any, i int) any {
file_stream_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CountConnectionResponse); i {
case 0:
return &v.state
@ -506,7 +506,7 @@ func file_stream_proto_init() {
return nil
}
}
file_stream_proto_msgTypes[2].Exporter = func(v any, i int) any {
file_stream_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*PushStreamRequest); i {
case 0:
return &v.state
@ -518,7 +518,7 @@ func file_stream_proto_init() {
return nil
}
}
file_stream_proto_msgTypes[3].Exporter = func(v any, i int) any {
file_stream_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*PushStreamBatchRequest); i {
case 0:
return &v.state
@ -530,7 +530,7 @@ func file_stream_proto_init() {
return nil
}
}
file_stream_proto_msgTypes[4].Exporter = func(v any, i int) any {
file_stream_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*PushStreamResponse); i {
case 0:
return &v.state
@ -542,7 +542,7 @@ func file_stream_proto_init() {
return nil
}
}
file_stream_proto_msgTypes[5].Exporter = func(v any, i int) any {
file_stream_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*StreamEventRequest); i {
case 0:
return &v.state
@ -554,7 +554,7 @@ func file_stream_proto_init() {
return nil
}
}
file_stream_proto_msgTypes[6].Exporter = func(v any, i int) any {
file_stream_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*StreamEventResponse); i {
case 0:
return &v.state

View File

@ -1,6 +1,6 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.4.0
// - protoc-gen-go-grpc v1.2.0
// - protoc v5.27.1
// source: stream.proto
@ -15,15 +15,8 @@ import (
// 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.62.0 or later.
const _ = grpc.SupportPackageIsVersion8
const (
StreamController_CountStreamConnection_FullMethodName = "/proto.StreamController/CountStreamConnection"
StreamController_PushStream_FullMethodName = "/proto.StreamController/PushStream"
StreamController_PushStreamBatch_FullMethodName = "/proto.StreamController/PushStreamBatch"
StreamController_EmitStreamEvent_FullMethodName = "/proto.StreamController/EmitStreamEvent"
)
// Requires gRPC-Go v1.32.0 or later.
const _ = grpc.SupportPackageIsVersion7
// StreamControllerClient is the client API for StreamController service.
//
@ -44,9 +37,8 @@ func NewStreamControllerClient(cc grpc.ClientConnInterface) StreamControllerClie
}
func (c *streamControllerClient) CountStreamConnection(ctx context.Context, in *CountConnectionRequest, opts ...grpc.CallOption) (*CountConnectionResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(CountConnectionResponse)
err := c.cc.Invoke(ctx, StreamController_CountStreamConnection_FullMethodName, in, out, cOpts...)
err := c.cc.Invoke(ctx, "/proto.StreamController/CountStreamConnection", in, out, opts...)
if err != nil {
return nil, err
}
@ -54,9 +46,8 @@ func (c *streamControllerClient) CountStreamConnection(ctx context.Context, in *
}
func (c *streamControllerClient) PushStream(ctx context.Context, in *PushStreamRequest, opts ...grpc.CallOption) (*PushStreamResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(PushStreamResponse)
err := c.cc.Invoke(ctx, StreamController_PushStream_FullMethodName, in, out, cOpts...)
err := c.cc.Invoke(ctx, "/proto.StreamController/PushStream", in, out, opts...)
if err != nil {
return nil, err
}
@ -64,9 +55,8 @@ func (c *streamControllerClient) PushStream(ctx context.Context, in *PushStreamR
}
func (c *streamControllerClient) PushStreamBatch(ctx context.Context, in *PushStreamBatchRequest, opts ...grpc.CallOption) (*PushStreamResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(PushStreamResponse)
err := c.cc.Invoke(ctx, StreamController_PushStreamBatch_FullMethodName, in, out, cOpts...)
err := c.cc.Invoke(ctx, "/proto.StreamController/PushStreamBatch", in, out, opts...)
if err != nil {
return nil, err
}
@ -74,9 +64,8 @@ func (c *streamControllerClient) PushStreamBatch(ctx context.Context, in *PushSt
}
func (c *streamControllerClient) EmitStreamEvent(ctx context.Context, in *StreamEventRequest, opts ...grpc.CallOption) (*StreamEventResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(StreamEventResponse)
err := c.cc.Invoke(ctx, StreamController_EmitStreamEvent_FullMethodName, in, out, cOpts...)
err := c.cc.Invoke(ctx, "/proto.StreamController/EmitStreamEvent", in, out, opts...)
if err != nil {
return nil, err
}
@ -133,7 +122,7 @@ func _StreamController_CountStreamConnection_Handler(srv interface{}, ctx contex
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: StreamController_CountStreamConnection_FullMethodName,
FullMethod: "/proto.StreamController/CountStreamConnection",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(StreamControllerServer).CountStreamConnection(ctx, req.(*CountConnectionRequest))
@ -151,7 +140,7 @@ func _StreamController_PushStream_Handler(srv interface{}, ctx context.Context,
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: StreamController_PushStream_FullMethodName,
FullMethod: "/proto.StreamController/PushStream",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(StreamControllerServer).PushStream(ctx, req.(*PushStreamRequest))
@ -169,7 +158,7 @@ func _StreamController_PushStreamBatch_Handler(srv interface{}, ctx context.Cont
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: StreamController_PushStreamBatch_FullMethodName,
FullMethod: "/proto.StreamController/PushStreamBatch",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(StreamControllerServer).PushStreamBatch(ctx, req.(*PushStreamBatchRequest))
@ -187,7 +176,7 @@ func _StreamController_EmitStreamEvent_Handler(srv interface{}, ctx context.Cont
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: StreamController_EmitStreamEvent_FullMethodName,
FullMethod: "/proto.StreamController/EmitStreamEvent",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(StreamControllerServer).EmitStreamEvent(ctx, req.(*StreamEventRequest))