fix: buf
All checks were successful
Deploy / CreateImage (push) Successful in 2m48s
Deploy / DeployService (push) Successful in 21s

This commit is contained in:
skeris 2025-08-14 00:45:10 +03:00
parent c5e7cfc8d5
commit 2f514522b6
30 changed files with 1838 additions and 3084 deletions

@ -2,7 +2,10 @@ version: v1
plugins: plugins:
- name: go - name: go
out: internal/proto out: internal/proto
opt:
- paths=source_relative
- name: go-grpc - name: go-grpc
out: internal/proto out: internal/proto
opt: opt:
- paths=source_relative
- require_unimplemented_servers=false - require_unimplemented_servers=false

@ -1,4 +0,0 @@
version: v1
lint:
use:
- DEFAULT

@ -26,6 +26,7 @@ services:
PAYMENT_MICROSERVICE_GRPC_URL: 10.8.0.226:9085 PAYMENT_MICROSERVICE_GRPC_URL: 10.8.0.226:9085
VERIFICATION_MICROSERVICE_URL: http://10.8.0.226:7036 VERIFICATION_MICROSERVICE_URL: http://10.8.0.226:7036
TEMPLATEGEN_MICROSERVICE_URL: http://10.8.0.226:8012 TEMPLATEGEN_MICROSERVICE_URL: http://10.8.0.226:8012
TARIFF_MICROSERVICE_GRPC_URL: 10.8.0.226:59305
API_URL: https://api.smtp.bz/v1/smtp/send API_URL: https://api.smtp.bz/v1/smtp/send
CODEWORD_MICROSERVICE_GRPC_URL: 10.8.0.226:39100 CODEWORD_MICROSERVICE_GRPC_URL: 10.8.0.226:39100
MAIL_SENDER: noreply@noreply.pena.digital MAIL_SENDER: noreply@noreply.pena.digital

@ -5,12 +5,12 @@ import (
"fmt" "fmt"
"log" "log"
"go.uber.org/zap"
"google.golang.org/grpc"
"google.golang.org/grpc/credentials/insecure"
"gitea.pena/PenaSide/customer/internal/errors" "gitea.pena/PenaSide/customer/internal/errors"
"gitea.pena/PenaSide/customer/internal/proto/treasurer" "gitea.pena/PenaSide/customer/internal/proto/treasurer"
"gitea.pena/PenaSide/customer/pkg/validate" "gitea.pena/PenaSide/customer/pkg/validate"
"go.uber.org/zap"
"google.golang.org/grpc"
"google.golang.org/grpc/credentials/insecure"
) )
type PaymentClientDeps struct { type PaymentClientDeps struct {

@ -2,12 +2,13 @@ package payment
import ( import (
"context" "context"
"gitea.pena/PenaSide/hlog"
"log" "log"
"gitea.pena/PenaSide/hlog"
"gitea.pena/PenaSide/customer/internal/errors" "gitea.pena/PenaSide/customer/internal/errors"
"gitea.pena/PenaSide/customer/internal/models" "gitea.pena/PenaSide/customer/internal/models"
"gitea.pena/PenaSide/customer/internal/proto/payment_callback" payment_callback "gitea.pena/PenaSide/customer/internal/proto/callback"
"gitea.pena/PenaSide/customer/internal/service/callback" "gitea.pena/PenaSide/customer/internal/service/callback"
"go.uber.org/zap" "go.uber.org/zap"
"google.golang.org/protobuf/types/known/emptypb" "google.golang.org/protobuf/types/known/emptypb"

@ -1,6 +1,6 @@
// Code generated by protoc-gen-go. DO NOT EDIT. // Code generated by protoc-gen-go. DO NOT EDIT.
// versions: // versions:
// protoc-gen-go v1.33.0 // protoc-gen-go v1.36.7
// protoc (unknown) // protoc (unknown)
// source: broker/models.proto // source: broker/models.proto
@ -11,6 +11,7 @@ import (
protoimpl "google.golang.org/protobuf/runtime/protoimpl" protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect" reflect "reflect"
sync "sync" sync "sync"
unsafe "unsafe"
) )
const ( const (
@ -70,25 +71,22 @@ func (PrivilegeType) EnumDescriptor() ([]byte, []int) {
} }
type PrivilegeMessage struct { type PrivilegeMessage struct {
state protoimpl.MessageState state protoimpl.MessageState `protogen:"open.v1"`
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
PrivilegeID string `protobuf:"bytes,1,opt,name=PrivilegeID,proto3" json:"PrivilegeID,omitempty"` PrivilegeID string `protobuf:"bytes,1,opt,name=PrivilegeID,proto3" json:"PrivilegeID,omitempty"`
ServiceKey string `protobuf:"bytes,2,opt,name=ServiceKey,proto3" json:"ServiceKey,omitempty"` ServiceKey string `protobuf:"bytes,2,opt,name=ServiceKey,proto3" json:"ServiceKey,omitempty"`
Type PrivilegeType `protobuf:"varint,3,opt,name=Type,proto3,enum=broker.PrivilegeType" json:"Type,omitempty"` Type PrivilegeType `protobuf:"varint,3,opt,name=Type,proto3,enum=broker.PrivilegeType" json:"Type,omitempty"`
Value string `protobuf:"bytes,4,opt,name=Value,proto3" json:"Value,omitempty"` Value string `protobuf:"bytes,4,opt,name=Value,proto3" json:"Value,omitempty"`
Amount uint64 `protobuf:"varint,5,opt,name=Amount,proto3" json:"Amount,omitempty"` Amount uint64 `protobuf:"varint,5,opt,name=Amount,proto3" json:"Amount,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
} }
func (x *PrivilegeMessage) Reset() { func (x *PrivilegeMessage) Reset() {
*x = PrivilegeMessage{} *x = PrivilegeMessage{}
if protoimpl.UnsafeEnabled {
mi := &file_broker_models_proto_msgTypes[0] mi := &file_broker_models_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi) ms.StoreMessageInfo(mi)
} }
}
func (x *PrivilegeMessage) String() string { func (x *PrivilegeMessage) String() string {
return protoimpl.X.MessageStringOf(x) return protoimpl.X.MessageStringOf(x)
@ -98,7 +96,7 @@ func (*PrivilegeMessage) ProtoMessage() {}
func (x *PrivilegeMessage) ProtoReflect() protoreflect.Message { func (x *PrivilegeMessage) ProtoReflect() protoreflect.Message {
mi := &file_broker_models_proto_msgTypes[0] mi := &file_broker_models_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil { if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil { if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi) ms.StoreMessageInfo(mi)
@ -149,22 +147,19 @@ func (x *PrivilegeMessage) GetAmount() uint64 {
} }
type TariffMessage struct { type TariffMessage struct {
state protoimpl.MessageState state protoimpl.MessageState `protogen:"open.v1"`
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Privileges []*PrivilegeMessage `protobuf:"bytes,1,rep,name=Privileges,proto3" json:"Privileges,omitempty"` Privileges []*PrivilegeMessage `protobuf:"bytes,1,rep,name=Privileges,proto3" json:"Privileges,omitempty"`
UserID string `protobuf:"bytes,2,opt,name=UserID,proto3" json:"UserID,omitempty"` UserID string `protobuf:"bytes,2,opt,name=UserID,proto3" json:"UserID,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
} }
func (x *TariffMessage) Reset() { func (x *TariffMessage) Reset() {
*x = TariffMessage{} *x = TariffMessage{}
if protoimpl.UnsafeEnabled {
mi := &file_broker_models_proto_msgTypes[1] mi := &file_broker_models_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi) ms.StoreMessageInfo(mi)
} }
}
func (x *TariffMessage) String() string { func (x *TariffMessage) String() string {
return protoimpl.X.MessageStringOf(x) return protoimpl.X.MessageStringOf(x)
@ -174,7 +169,7 @@ func (*TariffMessage) ProtoMessage() {}
func (x *TariffMessage) ProtoReflect() protoreflect.Message { func (x *TariffMessage) ProtoReflect() protoreflect.Message {
mi := &file_broker_models_proto_msgTypes[1] mi := &file_broker_models_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil { if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil { if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi) ms.StoreMessageInfo(mi)
@ -205,48 +200,43 @@ func (x *TariffMessage) GetUserID() string {
var File_broker_models_proto protoreflect.FileDescriptor var File_broker_models_proto protoreflect.FileDescriptor
var file_broker_models_proto_rawDesc = []byte{ const file_broker_models_proto_rawDesc = "" +
0x0a, 0x13, 0x62, 0x72, 0x6f, 0x6b, 0x65, 0x72, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2e, "\n" +
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x06, 0x62, 0x72, 0x6f, 0x6b, 0x65, 0x72, 0x22, 0xad, 0x01, "\x13broker/models.proto\x12\x06broker\"\xad\x01\n" +
0x0a, 0x10, 0x50, 0x72, 0x69, 0x76, 0x69, 0x6c, 0x65, 0x67, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, "\x10PrivilegeMessage\x12 \n" +
0x67, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x50, 0x72, 0x69, 0x76, 0x69, 0x6c, 0x65, 0x67, 0x65, 0x49, "\vPrivilegeID\x18\x01 \x01(\tR\vPrivilegeID\x12\x1e\n" +
0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x50, 0x72, 0x69, 0x76, 0x69, 0x6c, 0x65, "\n" +
0x67, 0x65, 0x49, 0x44, 0x12, 0x1e, 0x0a, 0x0a, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4b, "ServiceKey\x18\x02 \x01(\tR\n" +
0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, "ServiceKey\x12)\n" +
0x65, 0x4b, 0x65, 0x79, 0x12, 0x29, 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, "\x04Type\x18\x03 \x01(\x0e2\x15.broker.PrivilegeTypeR\x04Type\x12\x14\n" +
0x28, 0x0e, 0x32, 0x15, 0x2e, 0x62, 0x72, 0x6f, 0x6b, 0x65, 0x72, 0x2e, 0x50, 0x72, 0x69, 0x76, "\x05Value\x18\x04 \x01(\tR\x05Value\x12\x16\n" +
0x69, 0x6c, 0x65, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, "\x06Amount\x18\x05 \x01(\x04R\x06Amount\"a\n" +
0x14, 0x0a, 0x05, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, "\rTariffMessage\x128\n" +
0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, "\n" +
0x05, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x61, 0x0a, "Privileges\x18\x01 \x03(\v2\x18.broker.PrivilegeMessageR\n" +
0x0d, 0x54, 0x61, 0x72, 0x69, 0x66, 0x66, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x38, "Privileges\x12\x16\n" +
0x0a, 0x0a, 0x50, 0x72, 0x69, 0x76, 0x69, 0x6c, 0x65, 0x67, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, "\x06UserID\x18\x02 \x01(\tR\x06UserID*-\n" +
0x28, 0x0b, 0x32, 0x18, 0x2e, 0x62, 0x72, 0x6f, 0x6b, 0x65, 0x72, 0x2e, 0x50, 0x72, 0x69, 0x76, "\rPrivilegeType\x12\b\n" +
0x69, 0x6c, 0x65, 0x67, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x0a, 0x50, 0x72, "\x04Full\x10\x00\x12\a\n" +
0x69, 0x76, 0x69, 0x6c, 0x65, 0x67, 0x65, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x55, 0x73, 0x65, 0x72, "\x03Day\x10\x01\x12\t\n" +
0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x55, 0x73, 0x65, 0x72, 0x49, 0x44, "\x05Count\x10\x02B\n" +
0x2a, 0x2d, 0x0a, 0x0d, 0x50, 0x72, 0x69, 0x76, 0x69, 0x6c, 0x65, 0x67, 0x65, 0x54, 0x79, 0x70, "Z\b./brokerb\x06proto3"
0x65, 0x12, 0x08, 0x0a, 0x04, 0x46, 0x75, 0x6c, 0x6c, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x44,
0x61, 0x79, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x10, 0x02, 0x42,
0x0a, 0x5a, 0x08, 0x2e, 0x2f, 0x62, 0x72, 0x6f, 0x6b, 0x65, 0x72, 0x62, 0x06, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x33,
}
var ( var (
file_broker_models_proto_rawDescOnce sync.Once file_broker_models_proto_rawDescOnce sync.Once
file_broker_models_proto_rawDescData = file_broker_models_proto_rawDesc file_broker_models_proto_rawDescData []byte
) )
func file_broker_models_proto_rawDescGZIP() []byte { func file_broker_models_proto_rawDescGZIP() []byte {
file_broker_models_proto_rawDescOnce.Do(func() { file_broker_models_proto_rawDescOnce.Do(func() {
file_broker_models_proto_rawDescData = protoimpl.X.CompressGZIP(file_broker_models_proto_rawDescData) file_broker_models_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_broker_models_proto_rawDesc), len(file_broker_models_proto_rawDesc)))
}) })
return file_broker_models_proto_rawDescData return file_broker_models_proto_rawDescData
} }
var file_broker_models_proto_enumTypes = make([]protoimpl.EnumInfo, 1) var file_broker_models_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
var file_broker_models_proto_msgTypes = make([]protoimpl.MessageInfo, 2) var file_broker_models_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
var file_broker_models_proto_goTypes = []interface{}{ var file_broker_models_proto_goTypes = []any{
(PrivilegeType)(0), // 0: broker.PrivilegeType (PrivilegeType)(0), // 0: broker.PrivilegeType
(*PrivilegeMessage)(nil), // 1: broker.PrivilegeMessage (*PrivilegeMessage)(nil), // 1: broker.PrivilegeMessage
(*TariffMessage)(nil), // 2: broker.TariffMessage (*TariffMessage)(nil), // 2: broker.TariffMessage
@ -266,37 +256,11 @@ func file_broker_models_proto_init() {
if File_broker_models_proto != nil { if File_broker_models_proto != nil {
return return
} }
if !protoimpl.UnsafeEnabled {
file_broker_models_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*PrivilegeMessage); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_broker_models_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*TariffMessage); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{} type x struct{}
out := protoimpl.TypeBuilder{ out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{ File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(), GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_broker_models_proto_rawDesc, RawDescriptor: unsafe.Slice(unsafe.StringData(file_broker_models_proto_rawDesc), len(file_broker_models_proto_rawDesc)),
NumEnums: 1, NumEnums: 1,
NumMessages: 2, NumMessages: 2,
NumExtensions: 0, NumExtensions: 0,
@ -308,7 +272,6 @@ func file_broker_models_proto_init() {
MessageInfos: file_broker_models_proto_msgTypes, MessageInfos: file_broker_models_proto_msgTypes,
}.Build() }.Build()
File_broker_models_proto = out.File File_broker_models_proto = out.File
file_broker_models_proto_rawDesc = nil
file_broker_models_proto_goTypes = nil file_broker_models_proto_goTypes = nil
file_broker_models_proto_depIdxs = nil file_broker_models_proto_depIdxs = nil
} }

@ -0,0 +1,272 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.36.7
// protoc (unknown)
// source: callback/callback.proto
package payment_callback
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
emptypb "google.golang.org/protobuf/types/known/emptypb"
reflect "reflect"
sync "sync"
unsafe "unsafe"
)
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 Event struct {
state protoimpl.MessageState `protogen:"open.v1"`
Key string `protobuf:"bytes,1,opt,name=Key,proto3" json:"Key,omitempty"`
Message string `protobuf:"bytes,2,opt,name=Message,proto3" json:"Message,omitempty"`
Payment *Payment `protobuf:"bytes,3,opt,name=Payment,proto3" json:"Payment,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *Event) Reset() {
*x = Event{}
mi := &file_callback_callback_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *Event) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Event) ProtoMessage() {}
func (x *Event) ProtoReflect() protoreflect.Message {
mi := &file_callback_callback_proto_msgTypes[0]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Event.ProtoReflect.Descriptor instead.
func (*Event) Descriptor() ([]byte, []int) {
return file_callback_callback_proto_rawDescGZIP(), []int{0}
}
func (x *Event) GetKey() string {
if x != nil {
return x.Key
}
return ""
}
func (x *Event) GetMessage() string {
if x != nil {
return x.Message
}
return ""
}
func (x *Event) GetPayment() *Payment {
if x != nil {
return x.Payment
}
return nil
}
type Payment struct {
state protoimpl.MessageState `protogen:"open.v1"`
ID string `protobuf:"bytes,1,opt,name=ID,proto3" json:"ID,omitempty"`
UserID string `protobuf:"bytes,2,opt,name=UserID,proto3" json:"UserID,omitempty"`
PaymentID string `protobuf:"bytes,3,opt,name=PaymentID,proto3" json:"PaymentID,omitempty"`
IdempotencePaymentID string `protobuf:"bytes,4,opt,name=IdempotencePaymentID,proto3" json:"IdempotencePaymentID,omitempty"`
Amount int64 `protobuf:"varint,5,opt,name=Amount,proto3" json:"Amount,omitempty"`
Currency string `protobuf:"bytes,6,opt,name=Currency,proto3" json:"Currency,omitempty"`
Type string `protobuf:"bytes,7,opt,name=Type,proto3" json:"Type,omitempty"`
Status string `protobuf:"bytes,8,opt,name=Status,proto3" json:"Status,omitempty"`
Completed bool `protobuf:"varint,9,opt,name=Completed,proto3" json:"Completed,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *Payment) Reset() {
*x = Payment{}
mi := &file_callback_callback_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *Payment) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Payment) ProtoMessage() {}
func (x *Payment) ProtoReflect() protoreflect.Message {
mi := &file_callback_callback_proto_msgTypes[1]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Payment.ProtoReflect.Descriptor instead.
func (*Payment) Descriptor() ([]byte, []int) {
return file_callback_callback_proto_rawDescGZIP(), []int{1}
}
func (x *Payment) GetID() string {
if x != nil {
return x.ID
}
return ""
}
func (x *Payment) GetUserID() string {
if x != nil {
return x.UserID
}
return ""
}
func (x *Payment) GetPaymentID() string {
if x != nil {
return x.PaymentID
}
return ""
}
func (x *Payment) GetIdempotencePaymentID() string {
if x != nil {
return x.IdempotencePaymentID
}
return ""
}
func (x *Payment) GetAmount() int64 {
if x != nil {
return x.Amount
}
return 0
}
func (x *Payment) GetCurrency() string {
if x != nil {
return x.Currency
}
return ""
}
func (x *Payment) GetType() string {
if x != nil {
return x.Type
}
return ""
}
func (x *Payment) GetStatus() string {
if x != nil {
return x.Status
}
return ""
}
func (x *Payment) GetCompleted() bool {
if x != nil {
return x.Completed
}
return false
}
var File_callback_callback_proto protoreflect.FileDescriptor
const file_callback_callback_proto_rawDesc = "" +
"\n" +
"\x17callback/callback.proto\x12\x10payment_callback\x1a\x1bgoogle/protobuf/empty.proto\"h\n" +
"\x05Event\x12\x10\n" +
"\x03Key\x18\x01 \x01(\tR\x03Key\x12\x18\n" +
"\aMessage\x18\x02 \x01(\tR\aMessage\x123\n" +
"\aPayment\x18\x03 \x01(\v2\x19.payment_callback.PaymentR\aPayment\"\x81\x02\n" +
"\aPayment\x12\x0e\n" +
"\x02ID\x18\x01 \x01(\tR\x02ID\x12\x16\n" +
"\x06UserID\x18\x02 \x01(\tR\x06UserID\x12\x1c\n" +
"\tPaymentID\x18\x03 \x01(\tR\tPaymentID\x122\n" +
"\x14IdempotencePaymentID\x18\x04 \x01(\tR\x14IdempotencePaymentID\x12\x16\n" +
"\x06Amount\x18\x05 \x01(\x03R\x06Amount\x12\x1a\n" +
"\bCurrency\x18\x06 \x01(\tR\bCurrency\x12\x12\n" +
"\x04Type\x18\a \x01(\tR\x04Type\x12\x16\n" +
"\x06Status\x18\b \x01(\tR\x06Status\x12\x1c\n" +
"\tCompleted\x18\t \x01(\bR\tCompleted2\xdd\x01\n" +
"\x16PaymentCallbackService\x12>\n" +
"\tOnSuccess\x12\x17.payment_callback.Event\x1a\x16.google.protobuf.Empty\"\x00\x12>\n" +
"\tOnFailure\x12\x17.payment_callback.Event\x1a\x16.google.protobuf.Empty\"\x00\x12C\n" +
"\x0eOnCartPurchase\x12\x17.payment_callback.Event\x1a\x16.google.protobuf.Empty\"\x00B\x14Z\x12./payment_callbackb\x06proto3"
var (
file_callback_callback_proto_rawDescOnce sync.Once
file_callback_callback_proto_rawDescData []byte
)
func file_callback_callback_proto_rawDescGZIP() []byte {
file_callback_callback_proto_rawDescOnce.Do(func() {
file_callback_callback_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_callback_callback_proto_rawDesc), len(file_callback_callback_proto_rawDesc)))
})
return file_callback_callback_proto_rawDescData
}
var file_callback_callback_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
var file_callback_callback_proto_goTypes = []any{
(*Event)(nil), // 0: payment_callback.Event
(*Payment)(nil), // 1: payment_callback.Payment
(*emptypb.Empty)(nil), // 2: google.protobuf.Empty
}
var file_callback_callback_proto_depIdxs = []int32{
1, // 0: payment_callback.Event.Payment:type_name -> payment_callback.Payment
0, // 1: payment_callback.PaymentCallbackService.OnSuccess:input_type -> payment_callback.Event
0, // 2: payment_callback.PaymentCallbackService.OnFailure:input_type -> payment_callback.Event
0, // 3: payment_callback.PaymentCallbackService.OnCartPurchase:input_type -> payment_callback.Event
2, // 4: payment_callback.PaymentCallbackService.OnSuccess:output_type -> google.protobuf.Empty
2, // 5: payment_callback.PaymentCallbackService.OnFailure:output_type -> google.protobuf.Empty
2, // 6: payment_callback.PaymentCallbackService.OnCartPurchase:output_type -> google.protobuf.Empty
4, // [4:7] is the sub-list for method output_type
1, // [1:4] is the sub-list for method input_type
1, // [1:1] is the sub-list for extension type_name
1, // [1:1] is the sub-list for extension extendee
0, // [0:1] is the sub-list for field type_name
}
func init() { file_callback_callback_proto_init() }
func file_callback_callback_proto_init() {
if File_callback_callback_proto != nil {
return
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: unsafe.Slice(unsafe.StringData(file_callback_callback_proto_rawDesc), len(file_callback_callback_proto_rawDesc)),
NumEnums: 0,
NumMessages: 2,
NumExtensions: 0,
NumServices: 1,
},
GoTypes: file_callback_callback_proto_goTypes,
DependencyIndexes: file_callback_callback_proto_depIdxs,
MessageInfos: file_callback_callback_proto_msgTypes,
}.Build()
File_callback_callback_proto = out.File
file_callback_callback_proto_goTypes = nil
file_callback_callback_proto_depIdxs = nil
}

@ -1,4 +1,8 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT. // Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.5.1
// - protoc (unknown)
// source: callback/callback.proto
package payment_callback package payment_callback
@ -12,8 +16,14 @@ import (
// This is a compile-time assertion to ensure that this generated file // This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against. // is compatible with the grpc package it is being compiled against.
// Requires gRPC-Go v1.32.0 or later. // Requires gRPC-Go v1.64.0 or later.
const _ = grpc.SupportPackageIsVersion7 const _ = grpc.SupportPackageIsVersion9
const (
PaymentCallbackService_OnSuccess_FullMethodName = "/payment_callback.PaymentCallbackService/OnSuccess"
PaymentCallbackService_OnFailure_FullMethodName = "/payment_callback.PaymentCallbackService/OnFailure"
PaymentCallbackService_OnCartPurchase_FullMethodName = "/payment_callback.PaymentCallbackService/OnCartPurchase"
)
// PaymentCallbackServiceClient is the client API for PaymentCallbackService service. // PaymentCallbackServiceClient is the client API for PaymentCallbackService service.
// //
@ -33,8 +43,9 @@ func NewPaymentCallbackServiceClient(cc grpc.ClientConnInterface) PaymentCallbac
} }
func (c *paymentCallbackServiceClient) OnSuccess(ctx context.Context, in *Event, opts ...grpc.CallOption) (*emptypb.Empty, error) { func (c *paymentCallbackServiceClient) OnSuccess(ctx context.Context, in *Event, opts ...grpc.CallOption) (*emptypb.Empty, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(emptypb.Empty) out := new(emptypb.Empty)
err := c.cc.Invoke(ctx, "/payment_callback.PaymentCallbackService/OnSuccess", in, out, opts...) err := c.cc.Invoke(ctx, PaymentCallbackService_OnSuccess_FullMethodName, in, out, cOpts...)
if err != nil { if err != nil {
return nil, err return nil, err
} }
@ -42,8 +53,9 @@ func (c *paymentCallbackServiceClient) OnSuccess(ctx context.Context, in *Event,
} }
func (c *paymentCallbackServiceClient) OnFailure(ctx context.Context, in *Event, opts ...grpc.CallOption) (*emptypb.Empty, error) { func (c *paymentCallbackServiceClient) OnFailure(ctx context.Context, in *Event, opts ...grpc.CallOption) (*emptypb.Empty, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(emptypb.Empty) out := new(emptypb.Empty)
err := c.cc.Invoke(ctx, "/payment_callback.PaymentCallbackService/OnFailure", in, out, opts...) err := c.cc.Invoke(ctx, PaymentCallbackService_OnFailure_FullMethodName, in, out, cOpts...)
if err != nil { if err != nil {
return nil, err return nil, err
} }
@ -51,8 +63,9 @@ func (c *paymentCallbackServiceClient) OnFailure(ctx context.Context, in *Event,
} }
func (c *paymentCallbackServiceClient) OnCartPurchase(ctx context.Context, in *Event, opts ...grpc.CallOption) (*emptypb.Empty, error) { func (c *paymentCallbackServiceClient) OnCartPurchase(ctx context.Context, in *Event, opts ...grpc.CallOption) (*emptypb.Empty, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(emptypb.Empty) out := new(emptypb.Empty)
err := c.cc.Invoke(ctx, "/payment_callback.PaymentCallbackService/OnCartPurchase", in, out, opts...) err := c.cc.Invoke(ctx, PaymentCallbackService_OnCartPurchase_FullMethodName, in, out, cOpts...)
if err != nil { if err != nil {
return nil, err return nil, err
} }
@ -60,18 +73,20 @@ func (c *paymentCallbackServiceClient) OnCartPurchase(ctx context.Context, in *E
} }
// PaymentCallbackServiceServer is the server API for PaymentCallbackService service. // PaymentCallbackServiceServer is the server API for PaymentCallbackService service.
// All implementations must embed UnimplementedPaymentCallbackServiceServer // All implementations should embed UnimplementedPaymentCallbackServiceServer
// for forward compatibility // for forward compatibility.
type PaymentCallbackServiceServer interface { type PaymentCallbackServiceServer interface {
OnSuccess(context.Context, *Event) (*emptypb.Empty, error) OnSuccess(context.Context, *Event) (*emptypb.Empty, error)
OnFailure(context.Context, *Event) (*emptypb.Empty, error) OnFailure(context.Context, *Event) (*emptypb.Empty, error)
OnCartPurchase(context.Context, *Event) (*emptypb.Empty, error) OnCartPurchase(context.Context, *Event) (*emptypb.Empty, error)
mustEmbedUnimplementedPaymentCallbackServiceServer()
} }
// UnimplementedPaymentCallbackServiceServer must be embedded to have forward compatible implementations. // UnimplementedPaymentCallbackServiceServer should be embedded to have
type UnimplementedPaymentCallbackServiceServer struct { // forward compatible implementations.
} //
// NOTE: this should be embedded by value instead of pointer to avoid a nil
// pointer dereference when methods are called.
type UnimplementedPaymentCallbackServiceServer struct{}
func (UnimplementedPaymentCallbackServiceServer) OnSuccess(context.Context, *Event) (*emptypb.Empty, error) { func (UnimplementedPaymentCallbackServiceServer) OnSuccess(context.Context, *Event) (*emptypb.Empty, error) {
return nil, status.Errorf(codes.Unimplemented, "method OnSuccess not implemented") return nil, status.Errorf(codes.Unimplemented, "method OnSuccess not implemented")
@ -82,8 +97,7 @@ func (UnimplementedPaymentCallbackServiceServer) OnFailure(context.Context, *Eve
func (UnimplementedPaymentCallbackServiceServer) OnCartPurchase(context.Context, *Event) (*emptypb.Empty, error) { func (UnimplementedPaymentCallbackServiceServer) OnCartPurchase(context.Context, *Event) (*emptypb.Empty, error) {
return nil, status.Errorf(codes.Unimplemented, "method OnCartPurchase not implemented") return nil, status.Errorf(codes.Unimplemented, "method OnCartPurchase not implemented")
} }
func (UnimplementedPaymentCallbackServiceServer) mustEmbedUnimplementedPaymentCallbackServiceServer() { func (UnimplementedPaymentCallbackServiceServer) testEmbeddedByValue() {}
}
// UnsafePaymentCallbackServiceServer may be embedded to opt out of forward compatibility for this service. // UnsafePaymentCallbackServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to PaymentCallbackServiceServer will // Use of this interface is not recommended, as added methods to PaymentCallbackServiceServer will
@ -93,6 +107,13 @@ type UnsafePaymentCallbackServiceServer interface {
} }
func RegisterPaymentCallbackServiceServer(s grpc.ServiceRegistrar, srv PaymentCallbackServiceServer) { func RegisterPaymentCallbackServiceServer(s grpc.ServiceRegistrar, srv PaymentCallbackServiceServer) {
// If the following call pancis, it indicates UnimplementedPaymentCallbackServiceServer was
// embedded by pointer and is nil. This will cause panics if an
// unimplemented method is ever invoked, so we test this at initialization
// time to prevent it from happening at runtime later due to I/O.
if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
t.testEmbeddedByValue()
}
s.RegisterService(&PaymentCallbackService_ServiceDesc, srv) s.RegisterService(&PaymentCallbackService_ServiceDesc, srv)
} }
@ -106,7 +127,7 @@ func _PaymentCallbackService_OnSuccess_Handler(srv interface{}, ctx context.Cont
} }
info := &grpc.UnaryServerInfo{ info := &grpc.UnaryServerInfo{
Server: srv, Server: srv,
FullMethod: "/payment_callback.PaymentCallbackService/OnSuccess", FullMethod: PaymentCallbackService_OnSuccess_FullMethodName,
} }
handler := func(ctx context.Context, req interface{}) (interface{}, error) { handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(PaymentCallbackServiceServer).OnSuccess(ctx, req.(*Event)) return srv.(PaymentCallbackServiceServer).OnSuccess(ctx, req.(*Event))
@ -124,7 +145,7 @@ func _PaymentCallbackService_OnFailure_Handler(srv interface{}, ctx context.Cont
} }
info := &grpc.UnaryServerInfo{ info := &grpc.UnaryServerInfo{
Server: srv, Server: srv,
FullMethod: "/payment_callback.PaymentCallbackService/OnFailure", FullMethod: PaymentCallbackService_OnFailure_FullMethodName,
} }
handler := func(ctx context.Context, req interface{}) (interface{}, error) { handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(PaymentCallbackServiceServer).OnFailure(ctx, req.(*Event)) return srv.(PaymentCallbackServiceServer).OnFailure(ctx, req.(*Event))
@ -142,7 +163,7 @@ func _PaymentCallbackService_OnCartPurchase_Handler(srv interface{}, ctx context
} }
info := &grpc.UnaryServerInfo{ info := &grpc.UnaryServerInfo{
Server: srv, Server: srv,
FullMethod: "/payment_callback.PaymentCallbackService/OnCartPurchase", FullMethod: PaymentCallbackService_OnCartPurchase_FullMethodName,
} }
handler := func(ctx context.Context, req interface{}) (interface{}, error) { handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(PaymentCallbackServiceServer).OnCartPurchase(ctx, req.(*Event)) return srv.(PaymentCallbackServiceServer).OnCartPurchase(ctx, req.(*Event))
@ -171,5 +192,5 @@ var PaymentCallbackService_ServiceDesc = grpc.ServiceDesc{
}, },
}, },
Streams: []grpc.StreamDesc{}, Streams: []grpc.StreamDesc{},
Metadata: "service.proto", Metadata: "callback/callback.proto",
} }

@ -1,8 +1,8 @@
// Code generated by protoc-gen-go. DO NOT EDIT. // Code generated by protoc-gen-go. DO NOT EDIT.
// versions: // versions:
// protoc-gen-go v1.25.0-devel // protoc-gen-go v1.36.7
// protoc v3.14.0 // protoc (unknown)
// source: promo.proto // source: codeword/promo.proto
package codeword_rpc package codeword_rpc
@ -11,6 +11,7 @@ import (
protoimpl "google.golang.org/protobuf/runtime/protoimpl" protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect" reflect "reflect"
sync "sync" sync "sync"
unsafe "unsafe"
) )
const ( const (
@ -21,22 +22,19 @@ const (
) )
type Time struct { type Time struct {
state protoimpl.MessageState state protoimpl.MessageState `protogen:"open.v1"`
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
From int64 `protobuf:"varint,1,opt,name=from,proto3" json:"from,omitempty"` From int64 `protobuf:"varint,1,opt,name=from,proto3" json:"from,omitempty"`
To int64 `protobuf:"varint,2,opt,name=to,proto3" json:"to,omitempty"` To int64 `protobuf:"varint,2,opt,name=to,proto3" json:"to,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
} }
func (x *Time) Reset() { func (x *Time) Reset() {
*x = Time{} *x = Time{}
if protoimpl.UnsafeEnabled { mi := &file_codeword_promo_proto_msgTypes[0]
mi := &file_promo_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi) ms.StoreMessageInfo(mi)
} }
}
func (x *Time) String() string { func (x *Time) String() string {
return protoimpl.X.MessageStringOf(x) return protoimpl.X.MessageStringOf(x)
@ -45,8 +43,8 @@ func (x *Time) String() string {
func (*Time) ProtoMessage() {} func (*Time) ProtoMessage() {}
func (x *Time) ProtoReflect() protoreflect.Message { func (x *Time) ProtoReflect() protoreflect.Message {
mi := &file_promo_proto_msgTypes[0] mi := &file_codeword_promo_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil { if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil { if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi) ms.StoreMessageInfo(mi)
@ -58,7 +56,7 @@ func (x *Time) ProtoReflect() protoreflect.Message {
// Deprecated: Use Time.ProtoReflect.Descriptor instead. // Deprecated: Use Time.ProtoReflect.Descriptor instead.
func (*Time) Descriptor() ([]byte, []int) { func (*Time) Descriptor() ([]byte, []int) {
return file_promo_proto_rawDescGZIP(), []int{0} return file_codeword_promo_proto_rawDescGZIP(), []int{0}
} }
func (x *Time) GetFrom() int64 { func (x *Time) GetFrom() int64 {
@ -76,22 +74,19 @@ func (x *Time) GetTo() int64 {
} }
type PromoActivationResp struct { type PromoActivationResp struct {
state protoimpl.MessageState state protoimpl.MessageState `protogen:"open.v1"`
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
ID string `protobuf:"bytes,1,opt,name=ID,proto3" json:"ID,omitempty"` ID string `protobuf:"bytes,1,opt,name=ID,proto3" json:"ID,omitempty"`
Users []*PromoActivationResp_UserTime `protobuf:"bytes,2,rep,name=Users,proto3" json:"Users,omitempty"` Users []*PromoActivationResp_UserTime `protobuf:"bytes,2,rep,name=Users,proto3" json:"Users,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
} }
func (x *PromoActivationResp) Reset() { func (x *PromoActivationResp) Reset() {
*x = PromoActivationResp{} *x = PromoActivationResp{}
if protoimpl.UnsafeEnabled { mi := &file_codeword_promo_proto_msgTypes[1]
mi := &file_promo_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi) ms.StoreMessageInfo(mi)
} }
}
func (x *PromoActivationResp) String() string { func (x *PromoActivationResp) String() string {
return protoimpl.X.MessageStringOf(x) return protoimpl.X.MessageStringOf(x)
@ -100,8 +95,8 @@ func (x *PromoActivationResp) String() string {
func (*PromoActivationResp) ProtoMessage() {} func (*PromoActivationResp) ProtoMessage() {}
func (x *PromoActivationResp) ProtoReflect() protoreflect.Message { func (x *PromoActivationResp) ProtoReflect() protoreflect.Message {
mi := &file_promo_proto_msgTypes[1] mi := &file_codeword_promo_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil { if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil { if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi) ms.StoreMessageInfo(mi)
@ -113,7 +108,7 @@ func (x *PromoActivationResp) ProtoReflect() protoreflect.Message {
// Deprecated: Use PromoActivationResp.ProtoReflect.Descriptor instead. // Deprecated: Use PromoActivationResp.ProtoReflect.Descriptor instead.
func (*PromoActivationResp) Descriptor() ([]byte, []int) { func (*PromoActivationResp) Descriptor() ([]byte, []int) {
return file_promo_proto_rawDescGZIP(), []int{1} return file_codeword_promo_proto_rawDescGZIP(), []int{1}
} }
func (x *PromoActivationResp) GetID() string { func (x *PromoActivationResp) GetID() string {
@ -131,22 +126,19 @@ func (x *PromoActivationResp) GetUsers() []*PromoActivationResp_UserTime {
} }
type PromoActivationResp_UserTime struct { type PromoActivationResp_UserTime struct {
state protoimpl.MessageState state protoimpl.MessageState `protogen:"open.v1"`
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
UserID string `protobuf:"bytes,1,opt,name=UserID,proto3" json:"UserID,omitempty"` UserID string `protobuf:"bytes,1,opt,name=UserID,proto3" json:"UserID,omitempty"`
Time int64 `protobuf:"varint,2,opt,name=Time,proto3" json:"Time,omitempty"` Time int64 `protobuf:"varint,2,opt,name=Time,proto3" json:"Time,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
} }
func (x *PromoActivationResp_UserTime) Reset() { func (x *PromoActivationResp_UserTime) Reset() {
*x = PromoActivationResp_UserTime{} *x = PromoActivationResp_UserTime{}
if protoimpl.UnsafeEnabled { mi := &file_codeword_promo_proto_msgTypes[2]
mi := &file_promo_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi) ms.StoreMessageInfo(mi)
} }
}
func (x *PromoActivationResp_UserTime) String() string { func (x *PromoActivationResp_UserTime) String() string {
return protoimpl.X.MessageStringOf(x) return protoimpl.X.MessageStringOf(x)
@ -155,8 +147,8 @@ func (x *PromoActivationResp_UserTime) String() string {
func (*PromoActivationResp_UserTime) ProtoMessage() {} func (*PromoActivationResp_UserTime) ProtoMessage() {}
func (x *PromoActivationResp_UserTime) ProtoReflect() protoreflect.Message { func (x *PromoActivationResp_UserTime) ProtoReflect() protoreflect.Message {
mi := &file_promo_proto_msgTypes[2] mi := &file_codeword_promo_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil { if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil { if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi) ms.StoreMessageInfo(mi)
@ -168,7 +160,7 @@ func (x *PromoActivationResp_UserTime) ProtoReflect() protoreflect.Message {
// Deprecated: Use PromoActivationResp_UserTime.ProtoReflect.Descriptor instead. // Deprecated: Use PromoActivationResp_UserTime.ProtoReflect.Descriptor instead.
func (*PromoActivationResp_UserTime) Descriptor() ([]byte, []int) { func (*PromoActivationResp_UserTime) Descriptor() ([]byte, []int) {
return file_promo_proto_rawDescGZIP(), []int{1, 0} return file_codeword_promo_proto_rawDescGZIP(), []int{1, 0}
} }
func (x *PromoActivationResp_UserTime) GetUserID() string { func (x *PromoActivationResp_UserTime) GetUserID() string {
@ -185,52 +177,42 @@ func (x *PromoActivationResp_UserTime) GetTime() int64 {
return 0 return 0
} }
var File_promo_proto protoreflect.FileDescriptor var File_codeword_promo_proto protoreflect.FileDescriptor
var file_promo_proto_rawDesc = []byte{ const file_codeword_promo_proto_rawDesc = "" +
0x0a, 0x0b, 0x70, 0x72, 0x6f, 0x6d, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x08, 0x63, "\n" +
0x6f, 0x64, 0x65, 0x77, 0x6f, 0x72, 0x64, 0x22, 0x2a, 0x0a, 0x04, 0x54, 0x69, 0x6d, 0x65, 0x12, "\x14codeword/promo.proto\x12\bcodeword\"*\n" +
0x12, 0x0a, 0x04, 0x66, 0x72, 0x6f, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x66, "\x04Time\x12\x12\n" +
0x72, 0x6f, 0x6d, 0x12, 0x0e, 0x0a, 0x02, 0x74, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, "\x04from\x18\x01 \x01(\x03R\x04from\x12\x0e\n" +
0x02, 0x74, 0x6f, 0x22, 0x9b, 0x01, 0x0a, 0x13, 0x50, 0x72, 0x6f, 0x6d, 0x6f, 0x41, 0x63, 0x74, "\x02to\x18\x02 \x01(\x03R\x02to\"\x9b\x01\n" +
0x69, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x12, 0x0e, 0x0a, 0x02, 0x49, "\x13PromoActivationResp\x12\x0e\n" +
0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x49, 0x44, 0x12, 0x3c, 0x0a, 0x05, 0x55, "\x02ID\x18\x01 \x01(\tR\x02ID\x12<\n" +
0x73, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x63, 0x6f, 0x64, "\x05Users\x18\x02 \x03(\v2&.codeword.PromoActivationResp.UserTimeR\x05Users\x1a6\n" +
0x65, 0x77, 0x6f, 0x72, 0x64, 0x2e, 0x50, 0x72, 0x6f, 0x6d, 0x6f, 0x41, 0x63, 0x74, 0x69, 0x76, "\bUserTime\x12\x16\n" +
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x54, 0x69, "\x06UserID\x18\x01 \x01(\tR\x06UserID\x12\x12\n" +
0x6d, 0x65, 0x52, 0x05, 0x55, 0x73, 0x65, 0x72, 0x73, 0x1a, 0x36, 0x0a, 0x08, 0x55, 0x73, 0x65, "\x04Time\x18\x02 \x01(\x03R\x04Time2]\n" +
0x72, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x55, 0x73, 0x65, 0x72, 0x49, 0x44, 0x18, "\x10PromoCodeService\x12I\n" +
0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x55, 0x73, 0x65, 0x72, 0x49, 0x44, 0x12, 0x12, 0x0a, "\x16GetAllPromoActivations\x12\x0e.codeword.Time\x1a\x1d.codeword.PromoActivationResp0\x01B\x10Z\x0e./codeword_rpcb\x06proto3"
0x04, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x54, 0x69, 0x6d,
0x65, 0x32, 0x5d, 0x0a, 0x10, 0x50, 0x72, 0x6f, 0x6d, 0x6f, 0x43, 0x6f, 0x64, 0x65, 0x53, 0x65,
0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x49, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x41, 0x6c, 0x6c, 0x50,
0x72, 0x6f, 0x6d, 0x6f, 0x41, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12,
0x0e, 0x2e, 0x63, 0x6f, 0x64, 0x65, 0x77, 0x6f, 0x72, 0x64, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x1a,
0x1d, 0x2e, 0x63, 0x6f, 0x64, 0x65, 0x77, 0x6f, 0x72, 0x64, 0x2e, 0x50, 0x72, 0x6f, 0x6d, 0x6f,
0x41, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x30, 0x01,
0x42, 0x10, 0x5a, 0x0e, 0x2e, 0x2f, 0x63, 0x6f, 0x64, 0x65, 0x77, 0x6f, 0x72, 0x64, 0x5f, 0x72,
0x70, 0x63, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var ( var (
file_promo_proto_rawDescOnce sync.Once file_codeword_promo_proto_rawDescOnce sync.Once
file_promo_proto_rawDescData = file_promo_proto_rawDesc file_codeword_promo_proto_rawDescData []byte
) )
func file_promo_proto_rawDescGZIP() []byte { func file_codeword_promo_proto_rawDescGZIP() []byte {
file_promo_proto_rawDescOnce.Do(func() { file_codeword_promo_proto_rawDescOnce.Do(func() {
file_promo_proto_rawDescData = protoimpl.X.CompressGZIP(file_promo_proto_rawDescData) file_codeword_promo_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_codeword_promo_proto_rawDesc), len(file_codeword_promo_proto_rawDesc)))
}) })
return file_promo_proto_rawDescData return file_codeword_promo_proto_rawDescData
} }
var file_promo_proto_msgTypes = make([]protoimpl.MessageInfo, 3) var file_codeword_promo_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
var file_promo_proto_goTypes = []interface{}{ var file_codeword_promo_proto_goTypes = []any{
(*Time)(nil), // 0: codeword.Time (*Time)(nil), // 0: codeword.Time
(*PromoActivationResp)(nil), // 1: codeword.PromoActivationResp (*PromoActivationResp)(nil), // 1: codeword.PromoActivationResp
(*PromoActivationResp_UserTime)(nil), // 2: codeword.PromoActivationResp.UserTime (*PromoActivationResp_UserTime)(nil), // 2: codeword.PromoActivationResp.UserTime
} }
var file_promo_proto_depIdxs = []int32{ var file_codeword_promo_proto_depIdxs = []int32{
2, // 0: codeword.PromoActivationResp.Users:type_name -> codeword.PromoActivationResp.UserTime 2, // 0: codeword.PromoActivationResp.Users:type_name -> codeword.PromoActivationResp.UserTime
0, // 1: codeword.PromoCodeService.GetAllPromoActivations:input_type -> codeword.Time 0, // 1: codeword.PromoCodeService.GetAllPromoActivations:input_type -> codeword.Time
1, // 2: codeword.PromoCodeService.GetAllPromoActivations:output_type -> codeword.PromoActivationResp 1, // 2: codeword.PromoCodeService.GetAllPromoActivations:output_type -> codeword.PromoActivationResp
@ -241,65 +223,26 @@ var file_promo_proto_depIdxs = []int32{
0, // [0:1] is the sub-list for field type_name 0, // [0:1] is the sub-list for field type_name
} }
func init() { file_promo_proto_init() } func init() { file_codeword_promo_proto_init() }
func file_promo_proto_init() { func file_codeword_promo_proto_init() {
if File_promo_proto != nil { if File_codeword_promo_proto != nil {
return return
} }
if !protoimpl.UnsafeEnabled {
file_promo_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Time); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_promo_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*PromoActivationResp); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_promo_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*PromoActivationResp_UserTime); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{} type x struct{}
out := protoimpl.TypeBuilder{ out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{ File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(), GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_promo_proto_rawDesc, RawDescriptor: unsafe.Slice(unsafe.StringData(file_codeword_promo_proto_rawDesc), len(file_codeword_promo_proto_rawDesc)),
NumEnums: 0, NumEnums: 0,
NumMessages: 3, NumMessages: 3,
NumExtensions: 0, NumExtensions: 0,
NumServices: 1, NumServices: 1,
}, },
GoTypes: file_promo_proto_goTypes, GoTypes: file_codeword_promo_proto_goTypes,
DependencyIndexes: file_promo_proto_depIdxs, DependencyIndexes: file_codeword_promo_proto_depIdxs,
MessageInfos: file_promo_proto_msgTypes, MessageInfos: file_codeword_promo_proto_msgTypes,
}.Build() }.Build()
File_promo_proto = out.File File_codeword_promo_proto = out.File
file_promo_proto_rawDesc = nil file_codeword_promo_proto_goTypes = nil
file_promo_proto_goTypes = nil file_codeword_promo_proto_depIdxs = nil
file_promo_proto_depIdxs = nil
} }

@ -1,4 +1,8 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT. // Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.5.1
// - protoc (unknown)
// source: codeword/promo.proto
package codeword_rpc package codeword_rpc
@ -11,14 +15,18 @@ import (
// This is a compile-time assertion to ensure that this generated file // This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against. // is compatible with the grpc package it is being compiled against.
// Requires gRPC-Go v1.32.0 or later. // Requires gRPC-Go v1.64.0 or later.
const _ = grpc.SupportPackageIsVersion7 const _ = grpc.SupportPackageIsVersion9
const (
PromoCodeService_GetAllPromoActivations_FullMethodName = "/codeword.PromoCodeService/GetAllPromoActivations"
)
// PromoCodeServiceClient is the client API for PromoCodeService service. // PromoCodeServiceClient is the client API for PromoCodeService 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. // 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 PromoCodeServiceClient interface { type PromoCodeServiceClient interface {
GetAllPromoActivations(ctx context.Context, in *Time, opts ...grpc.CallOption) (PromoCodeService_GetAllPromoActivationsClient, error) GetAllPromoActivations(ctx context.Context, in *Time, opts ...grpc.CallOption) (grpc.ServerStreamingClient[PromoActivationResp], error)
} }
type promoCodeServiceClient struct { type promoCodeServiceClient struct {
@ -29,12 +37,13 @@ func NewPromoCodeServiceClient(cc grpc.ClientConnInterface) PromoCodeServiceClie
return &promoCodeServiceClient{cc} return &promoCodeServiceClient{cc}
} }
func (c *promoCodeServiceClient) GetAllPromoActivations(ctx context.Context, in *Time, opts ...grpc.CallOption) (PromoCodeService_GetAllPromoActivationsClient, error) { func (c *promoCodeServiceClient) GetAllPromoActivations(ctx context.Context, in *Time, opts ...grpc.CallOption) (grpc.ServerStreamingClient[PromoActivationResp], error) {
stream, err := c.cc.NewStream(ctx, &PromoCodeService_ServiceDesc.Streams[0], "/codeword.PromoCodeService/GetAllPromoActivations", opts...) cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
stream, err := c.cc.NewStream(ctx, &PromoCodeService_ServiceDesc.Streams[0], PromoCodeService_GetAllPromoActivations_FullMethodName, cOpts...)
if err != nil { if err != nil {
return nil, err return nil, err
} }
x := &promoCodeServiceGetAllPromoActivationsClient{stream} x := &grpc.GenericClientStream[Time, PromoActivationResp]{ClientStream: stream}
if err := x.ClientStream.SendMsg(in); err != nil { if err := x.ClientStream.SendMsg(in); err != nil {
return nil, err return nil, err
} }
@ -44,39 +53,27 @@ func (c *promoCodeServiceClient) GetAllPromoActivations(ctx context.Context, in
return x, nil return x, nil
} }
type PromoCodeService_GetAllPromoActivationsClient interface { // This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
Recv() (*PromoActivationResp, error) type PromoCodeService_GetAllPromoActivationsClient = grpc.ServerStreamingClient[PromoActivationResp]
grpc.ClientStream
}
type promoCodeServiceGetAllPromoActivationsClient struct {
grpc.ClientStream
}
func (x *promoCodeServiceGetAllPromoActivationsClient) Recv() (*PromoActivationResp, error) {
m := new(PromoActivationResp)
if err := x.ClientStream.RecvMsg(m); err != nil {
return nil, err
}
return m, nil
}
// PromoCodeServiceServer is the server API for PromoCodeService service. // PromoCodeServiceServer is the server API for PromoCodeService service.
// All implementations must embed UnimplementedPromoCodeServiceServer // All implementations should embed UnimplementedPromoCodeServiceServer
// for forward compatibility // for forward compatibility.
type PromoCodeServiceServer interface { type PromoCodeServiceServer interface {
GetAllPromoActivations(*Time, PromoCodeService_GetAllPromoActivationsServer) error GetAllPromoActivations(*Time, grpc.ServerStreamingServer[PromoActivationResp]) error
mustEmbedUnimplementedPromoCodeServiceServer()
} }
// UnimplementedPromoCodeServiceServer must be embedded to have forward compatible implementations. // UnimplementedPromoCodeServiceServer should be embedded to have
type UnimplementedPromoCodeServiceServer struct { // forward compatible implementations.
} //
// NOTE: this should be embedded by value instead of pointer to avoid a nil
// pointer dereference when methods are called.
type UnimplementedPromoCodeServiceServer struct{}
func (UnimplementedPromoCodeServiceServer) GetAllPromoActivations(*Time, PromoCodeService_GetAllPromoActivationsServer) error { func (UnimplementedPromoCodeServiceServer) GetAllPromoActivations(*Time, grpc.ServerStreamingServer[PromoActivationResp]) error {
return status.Errorf(codes.Unimplemented, "method GetAllPromoActivations not implemented") return status.Errorf(codes.Unimplemented, "method GetAllPromoActivations not implemented")
} }
func (UnimplementedPromoCodeServiceServer) mustEmbedUnimplementedPromoCodeServiceServer() {} func (UnimplementedPromoCodeServiceServer) testEmbeddedByValue() {}
// UnsafePromoCodeServiceServer may be embedded to opt out of forward compatibility for this service. // UnsafePromoCodeServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to PromoCodeServiceServer will // Use of this interface is not recommended, as added methods to PromoCodeServiceServer will
@ -86,6 +83,13 @@ type UnsafePromoCodeServiceServer interface {
} }
func RegisterPromoCodeServiceServer(s grpc.ServiceRegistrar, srv PromoCodeServiceServer) { func RegisterPromoCodeServiceServer(s grpc.ServiceRegistrar, srv PromoCodeServiceServer) {
// If the following call pancis, it indicates UnimplementedPromoCodeServiceServer was
// embedded by pointer and is nil. This will cause panics if an
// unimplemented method is ever invoked, so we test this at initialization
// time to prevent it from happening at runtime later due to I/O.
if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
t.testEmbeddedByValue()
}
s.RegisterService(&PromoCodeService_ServiceDesc, srv) s.RegisterService(&PromoCodeService_ServiceDesc, srv)
} }
@ -94,21 +98,11 @@ func _PromoCodeService_GetAllPromoActivations_Handler(srv interface{}, stream gr
if err := stream.RecvMsg(m); err != nil { if err := stream.RecvMsg(m); err != nil {
return err return err
} }
return srv.(PromoCodeServiceServer).GetAllPromoActivations(m, &promoCodeServiceGetAllPromoActivationsServer{stream}) return srv.(PromoCodeServiceServer).GetAllPromoActivations(m, &grpc.GenericServerStream[Time, PromoActivationResp]{ServerStream: stream})
} }
type PromoCodeService_GetAllPromoActivationsServer interface { // This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
Send(*PromoActivationResp) error type PromoCodeService_GetAllPromoActivationsServer = grpc.ServerStreamingServer[PromoActivationResp]
grpc.ServerStream
}
type promoCodeServiceGetAllPromoActivationsServer struct {
grpc.ServerStream
}
func (x *promoCodeServiceGetAllPromoActivationsServer) Send(m *PromoActivationResp) error {
return x.ServerStream.SendMsg(m)
}
// PromoCodeService_ServiceDesc is the grpc.ServiceDesc for PromoCodeService service. // PromoCodeService_ServiceDesc is the grpc.ServiceDesc for PromoCodeService service.
// It's only intended for direct use with grpc.RegisterService, // It's only intended for direct use with grpc.RegisterService,
@ -124,5 +118,5 @@ var PromoCodeService_ServiceDesc = grpc.ServiceDesc{
ServerStreams: true, ServerStreams: true,
}, },
}, },
Metadata: "promo.proto", Metadata: "codeword/promo.proto",
} }

@ -1,306 +0,0 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.33.0
// protoc (unknown)
// source: codeword/promo.proto
package codeword_rpc
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 Time struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
From int64 `protobuf:"varint,1,opt,name=from,proto3" json:"from,omitempty"`
To int64 `protobuf:"varint,2,opt,name=to,proto3" json:"to,omitempty"`
}
func (x *Time) Reset() {
*x = Time{}
if protoimpl.UnsafeEnabled {
mi := &file_codeword_promo_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Time) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Time) ProtoMessage() {}
func (x *Time) ProtoReflect() protoreflect.Message {
mi := &file_codeword_promo_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 Time.ProtoReflect.Descriptor instead.
func (*Time) Descriptor() ([]byte, []int) {
return file_codeword_promo_proto_rawDescGZIP(), []int{0}
}
func (x *Time) GetFrom() int64 {
if x != nil {
return x.From
}
return 0
}
func (x *Time) GetTo() int64 {
if x != nil {
return x.To
}
return 0
}
type PromoActivationResp struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
ID string `protobuf:"bytes,1,opt,name=ID,proto3" json:"ID,omitempty"`
Users []*PromoActivationResp_UserTime `protobuf:"bytes,2,rep,name=Users,proto3" json:"Users,omitempty"`
}
func (x *PromoActivationResp) Reset() {
*x = PromoActivationResp{}
if protoimpl.UnsafeEnabled {
mi := &file_codeword_promo_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *PromoActivationResp) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*PromoActivationResp) ProtoMessage() {}
func (x *PromoActivationResp) ProtoReflect() protoreflect.Message {
mi := &file_codeword_promo_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 PromoActivationResp.ProtoReflect.Descriptor instead.
func (*PromoActivationResp) Descriptor() ([]byte, []int) {
return file_codeword_promo_proto_rawDescGZIP(), []int{1}
}
func (x *PromoActivationResp) GetID() string {
if x != nil {
return x.ID
}
return ""
}
func (x *PromoActivationResp) GetUsers() []*PromoActivationResp_UserTime {
if x != nil {
return x.Users
}
return nil
}
type PromoActivationResp_UserTime struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
UserID string `protobuf:"bytes,1,opt,name=UserID,proto3" json:"UserID,omitempty"`
Time int64 `protobuf:"varint,2,opt,name=Time,proto3" json:"Time,omitempty"`
}
func (x *PromoActivationResp_UserTime) Reset() {
*x = PromoActivationResp_UserTime{}
if protoimpl.UnsafeEnabled {
mi := &file_codeword_promo_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *PromoActivationResp_UserTime) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*PromoActivationResp_UserTime) ProtoMessage() {}
func (x *PromoActivationResp_UserTime) ProtoReflect() protoreflect.Message {
mi := &file_codeword_promo_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 PromoActivationResp_UserTime.ProtoReflect.Descriptor instead.
func (*PromoActivationResp_UserTime) Descriptor() ([]byte, []int) {
return file_codeword_promo_proto_rawDescGZIP(), []int{1, 0}
}
func (x *PromoActivationResp_UserTime) GetUserID() string {
if x != nil {
return x.UserID
}
return ""
}
func (x *PromoActivationResp_UserTime) GetTime() int64 {
if x != nil {
return x.Time
}
return 0
}
var File_codeword_promo_proto protoreflect.FileDescriptor
var file_codeword_promo_proto_rawDesc = []byte{
0x0a, 0x14, 0x63, 0x6f, 0x64, 0x65, 0x77, 0x6f, 0x72, 0x64, 0x2f, 0x70, 0x72, 0x6f, 0x6d, 0x6f,
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x08, 0x63, 0x6f, 0x64, 0x65, 0x77, 0x6f, 0x72, 0x64,
0x22, 0x2a, 0x0a, 0x04, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x66, 0x72, 0x6f, 0x6d,
0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x66, 0x72, 0x6f, 0x6d, 0x12, 0x0e, 0x0a, 0x02,
0x74, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x74, 0x6f, 0x22, 0x9b, 0x01, 0x0a,
0x13, 0x50, 0x72, 0x6f, 0x6d, 0x6f, 0x41, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e,
0x52, 0x65, 0x73, 0x70, 0x12, 0x0e, 0x0a, 0x02, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
0x52, 0x02, 0x49, 0x44, 0x12, 0x3c, 0x0a, 0x05, 0x55, 0x73, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20,
0x03, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x63, 0x6f, 0x64, 0x65, 0x77, 0x6f, 0x72, 0x64, 0x2e, 0x50,
0x72, 0x6f, 0x6d, 0x6f, 0x41, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65,
0x73, 0x70, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x54, 0x69, 0x6d, 0x65, 0x52, 0x05, 0x55, 0x73, 0x65,
0x72, 0x73, 0x1a, 0x36, 0x0a, 0x08, 0x55, 0x73, 0x65, 0x72, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x16,
0x0a, 0x06, 0x55, 0x73, 0x65, 0x72, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06,
0x55, 0x73, 0x65, 0x72, 0x49, 0x44, 0x12, 0x12, 0x0a, 0x04, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x02,
0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x54, 0x69, 0x6d, 0x65, 0x32, 0x5d, 0x0a, 0x10, 0x50, 0x72,
0x6f, 0x6d, 0x6f, 0x43, 0x6f, 0x64, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x49,
0x0a, 0x16, 0x47, 0x65, 0x74, 0x41, 0x6c, 0x6c, 0x50, 0x72, 0x6f, 0x6d, 0x6f, 0x41, 0x63, 0x74,
0x69, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x0e, 0x2e, 0x63, 0x6f, 0x64, 0x65, 0x77,
0x6f, 0x72, 0x64, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x1a, 0x1d, 0x2e, 0x63, 0x6f, 0x64, 0x65, 0x77,
0x6f, 0x72, 0x64, 0x2e, 0x50, 0x72, 0x6f, 0x6d, 0x6f, 0x41, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74,
0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x30, 0x01, 0x42, 0x10, 0x5a, 0x0e, 0x2e, 0x2f, 0x63,
0x6f, 0x64, 0x65, 0x77, 0x6f, 0x72, 0x64, 0x5f, 0x72, 0x70, 0x63, 0x62, 0x06, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x33,
}
var (
file_codeword_promo_proto_rawDescOnce sync.Once
file_codeword_promo_proto_rawDescData = file_codeword_promo_proto_rawDesc
)
func file_codeword_promo_proto_rawDescGZIP() []byte {
file_codeword_promo_proto_rawDescOnce.Do(func() {
file_codeword_promo_proto_rawDescData = protoimpl.X.CompressGZIP(file_codeword_promo_proto_rawDescData)
})
return file_codeword_promo_proto_rawDescData
}
var file_codeword_promo_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
var file_codeword_promo_proto_goTypes = []interface{}{
(*Time)(nil), // 0: codeword.Time
(*PromoActivationResp)(nil), // 1: codeword.PromoActivationResp
(*PromoActivationResp_UserTime)(nil), // 2: codeword.PromoActivationResp.UserTime
}
var file_codeword_promo_proto_depIdxs = []int32{
2, // 0: codeword.PromoActivationResp.Users:type_name -> codeword.PromoActivationResp.UserTime
0, // 1: codeword.PromoCodeService.GetAllPromoActivations:input_type -> codeword.Time
1, // 2: codeword.PromoCodeService.GetAllPromoActivations:output_type -> codeword.PromoActivationResp
2, // [2:3] is the sub-list for method output_type
1, // [1:2] is the sub-list for method input_type
1, // [1:1] is the sub-list for extension type_name
1, // [1:1] is the sub-list for extension extendee
0, // [0:1] is the sub-list for field type_name
}
func init() { file_codeword_promo_proto_init() }
func file_codeword_promo_proto_init() {
if File_codeword_promo_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_codeword_promo_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Time); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_codeword_promo_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*PromoActivationResp); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_codeword_promo_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*PromoActivationResp_UserTime); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_codeword_promo_proto_rawDesc,
NumEnums: 0,
NumMessages: 3,
NumExtensions: 0,
NumServices: 1,
},
GoTypes: file_codeword_promo_proto_goTypes,
DependencyIndexes: file_codeword_promo_proto_depIdxs,
MessageInfos: file_codeword_promo_proto_msgTypes,
}.Build()
File_codeword_promo_proto = out.File
file_codeword_promo_proto_rawDesc = nil
file_codeword_promo_proto_goTypes = nil
file_codeword_promo_proto_depIdxs = nil
}

@ -1,134 +0,0 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.3.0
// - protoc (unknown)
// source: codeword/promo.proto
package codeword_rpc
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
const (
PromoCodeService_GetAllPromoActivations_FullMethodName = "/codeword.PromoCodeService/GetAllPromoActivations"
)
// PromoCodeServiceClient is the client API for PromoCodeService 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 PromoCodeServiceClient interface {
GetAllPromoActivations(ctx context.Context, in *Time, opts ...grpc.CallOption) (PromoCodeService_GetAllPromoActivationsClient, error)
}
type promoCodeServiceClient struct {
cc grpc.ClientConnInterface
}
func NewPromoCodeServiceClient(cc grpc.ClientConnInterface) PromoCodeServiceClient {
return &promoCodeServiceClient{cc}
}
func (c *promoCodeServiceClient) GetAllPromoActivations(ctx context.Context, in *Time, opts ...grpc.CallOption) (PromoCodeService_GetAllPromoActivationsClient, error) {
stream, err := c.cc.NewStream(ctx, &PromoCodeService_ServiceDesc.Streams[0], PromoCodeService_GetAllPromoActivations_FullMethodName, opts...)
if err != nil {
return nil, err
}
x := &promoCodeServiceGetAllPromoActivationsClient{stream}
if err := x.ClientStream.SendMsg(in); err != nil {
return nil, err
}
if err := x.ClientStream.CloseSend(); err != nil {
return nil, err
}
return x, nil
}
type PromoCodeService_GetAllPromoActivationsClient interface {
Recv() (*PromoActivationResp, error)
grpc.ClientStream
}
type promoCodeServiceGetAllPromoActivationsClient struct {
grpc.ClientStream
}
func (x *promoCodeServiceGetAllPromoActivationsClient) Recv() (*PromoActivationResp, error) {
m := new(PromoActivationResp)
if err := x.ClientStream.RecvMsg(m); err != nil {
return nil, err
}
return m, nil
}
// PromoCodeServiceServer is the server API for PromoCodeService service.
// All implementations should embed UnimplementedPromoCodeServiceServer
// for forward compatibility
type PromoCodeServiceServer interface {
GetAllPromoActivations(*Time, PromoCodeService_GetAllPromoActivationsServer) error
}
// UnimplementedPromoCodeServiceServer should be embedded to have forward compatible implementations.
type UnimplementedPromoCodeServiceServer struct {
}
func (UnimplementedPromoCodeServiceServer) GetAllPromoActivations(*Time, PromoCodeService_GetAllPromoActivationsServer) error {
return status.Errorf(codes.Unimplemented, "method GetAllPromoActivations not implemented")
}
// UnsafePromoCodeServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to PromoCodeServiceServer will
// result in compilation errors.
type UnsafePromoCodeServiceServer interface {
mustEmbedUnimplementedPromoCodeServiceServer()
}
func RegisterPromoCodeServiceServer(s grpc.ServiceRegistrar, srv PromoCodeServiceServer) {
s.RegisterService(&PromoCodeService_ServiceDesc, srv)
}
func _PromoCodeService_GetAllPromoActivations_Handler(srv interface{}, stream grpc.ServerStream) error {
m := new(Time)
if err := stream.RecvMsg(m); err != nil {
return err
}
return srv.(PromoCodeServiceServer).GetAllPromoActivations(m, &promoCodeServiceGetAllPromoActivationsServer{stream})
}
type PromoCodeService_GetAllPromoActivationsServer interface {
Send(*PromoActivationResp) error
grpc.ServerStream
}
type promoCodeServiceGetAllPromoActivationsServer struct {
grpc.ServerStream
}
func (x *promoCodeServiceGetAllPromoActivationsServer) Send(m *PromoActivationResp) error {
return x.ServerStream.SendMsg(m)
}
// PromoCodeService_ServiceDesc is the grpc.ServiceDesc for PromoCodeService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var PromoCodeService_ServiceDesc = grpc.ServiceDesc{
ServiceName: "codeword.PromoCodeService",
HandlerType: (*PromoCodeServiceServer)(nil),
Methods: []grpc.MethodDesc{},
Streams: []grpc.StreamDesc{
{
StreamName: "GetAllPromoActivations",
Handler: _PromoCodeService_GetAllPromoActivations_Handler,
ServerStreams: true,
},
},
Metadata: "codeword/promo.proto",
}

@ -1,8 +1,8 @@
// Code generated by protoc-gen-go. DO NOT EDIT. // Code generated by protoc-gen-go. DO NOT EDIT.
// versions: // versions:
// protoc-gen-go v1.25.0-devel // protoc-gen-go v1.36.7
// protoc v3.14.0 // protoc (unknown)
// source: service.proto // source: customer/service.proto
package customer package customer
@ -13,6 +13,7 @@ import (
timestamppb "google.golang.org/protobuf/types/known/timestamppb" timestamppb "google.golang.org/protobuf/types/known/timestamppb"
reflect "reflect" reflect "reflect"
sync "sync" sync "sync"
unsafe "unsafe"
) )
const ( const (
@ -55,11 +56,11 @@ func (x AccountStatus) String() string {
} }
func (AccountStatus) Descriptor() protoreflect.EnumDescriptor { func (AccountStatus) Descriptor() protoreflect.EnumDescriptor {
return file_service_proto_enumTypes[0].Descriptor() return file_customer_service_proto_enumTypes[0].Descriptor()
} }
func (AccountStatus) Type() protoreflect.EnumType { func (AccountStatus) Type() protoreflect.EnumType {
return &file_service_proto_enumTypes[0] return &file_customer_service_proto_enumTypes[0]
} }
func (x AccountStatus) Number() protoreflect.EnumNumber { func (x AccountStatus) Number() protoreflect.EnumNumber {
@ -68,28 +69,25 @@ func (x AccountStatus) Number() protoreflect.EnumNumber {
// Deprecated: Use AccountStatus.Descriptor instead. // Deprecated: Use AccountStatus.Descriptor instead.
func (AccountStatus) EnumDescriptor() ([]byte, []int) { func (AccountStatus) EnumDescriptor() ([]byte, []int) {
return file_service_proto_rawDescGZIP(), []int{0} return file_customer_service_proto_rawDescGZIP(), []int{0}
} }
type History struct { type History struct {
state protoimpl.MessageState state protoimpl.MessageState `protogen:"open.v1"`
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
UserID string `protobuf:"bytes,1,opt,name=UserID,proto3" json:"UserID,omitempty"` UserID string `protobuf:"bytes,1,opt,name=UserID,proto3" json:"UserID,omitempty"`
Comment string `protobuf:"bytes,2,opt,name=Comment,proto3" json:"Comment,omitempty"` Comment string `protobuf:"bytes,2,opt,name=Comment,proto3" json:"Comment,omitempty"`
Key string `protobuf:"bytes,3,opt,name=Key,proto3" json:"Key,omitempty"` Key string `protobuf:"bytes,3,opt,name=Key,proto3" json:"Key,omitempty"`
RawDetails string `protobuf:"bytes,4,opt,name=RawDetails,proto3" json:"RawDetails,omitempty"` RawDetails string `protobuf:"bytes,4,opt,name=RawDetails,proto3" json:"RawDetails,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
} }
func (x *History) Reset() { func (x *History) Reset() {
*x = History{} *x = History{}
if protoimpl.UnsafeEnabled { mi := &file_customer_service_proto_msgTypes[0]
mi := &file_service_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi) ms.StoreMessageInfo(mi)
} }
}
func (x *History) String() string { func (x *History) String() string {
return protoimpl.X.MessageStringOf(x) return protoimpl.X.MessageStringOf(x)
@ -98,8 +96,8 @@ func (x *History) String() string {
func (*History) ProtoMessage() {} func (*History) ProtoMessage() {}
func (x *History) ProtoReflect() protoreflect.Message { func (x *History) ProtoReflect() protoreflect.Message {
mi := &file_service_proto_msgTypes[0] mi := &file_customer_service_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil { if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil { if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi) ms.StoreMessageInfo(mi)
@ -111,7 +109,7 @@ func (x *History) ProtoReflect() protoreflect.Message {
// Deprecated: Use History.ProtoReflect.Descriptor instead. // Deprecated: Use History.ProtoReflect.Descriptor instead.
func (*History) Descriptor() ([]byte, []int) { func (*History) Descriptor() ([]byte, []int) {
return file_service_proto_rawDescGZIP(), []int{0} return file_customer_service_proto_rawDescGZIP(), []int{0}
} }
func (x *History) GetUserID() string { func (x *History) GetUserID() string {
@ -143,22 +141,19 @@ func (x *History) GetRawDetails() string {
} }
type SetVerificationReq struct { type SetVerificationReq struct {
state protoimpl.MessageState state protoimpl.MessageState `protogen:"open.v1"`
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
UserID string `protobuf:"bytes,1,opt,name=userID,proto3" json:"userID,omitempty"` UserID string `protobuf:"bytes,1,opt,name=userID,proto3" json:"userID,omitempty"`
Status AccountStatus `protobuf:"varint,2,opt,name=status,proto3,enum=customer.AccountStatus" json:"status,omitempty"` Status AccountStatus `protobuf:"varint,2,opt,name=status,proto3,enum=customer.AccountStatus" json:"status,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
} }
func (x *SetVerificationReq) Reset() { func (x *SetVerificationReq) Reset() {
*x = SetVerificationReq{} *x = SetVerificationReq{}
if protoimpl.UnsafeEnabled { mi := &file_customer_service_proto_msgTypes[1]
mi := &file_service_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi) ms.StoreMessageInfo(mi)
} }
}
func (x *SetVerificationReq) String() string { func (x *SetVerificationReq) String() string {
return protoimpl.X.MessageStringOf(x) return protoimpl.X.MessageStringOf(x)
@ -167,8 +162,8 @@ func (x *SetVerificationReq) String() string {
func (*SetVerificationReq) ProtoMessage() {} func (*SetVerificationReq) ProtoMessage() {}
func (x *SetVerificationReq) ProtoReflect() protoreflect.Message { func (x *SetVerificationReq) ProtoReflect() protoreflect.Message {
mi := &file_service_proto_msgTypes[1] mi := &file_customer_service_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil { if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil { if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi) ms.StoreMessageInfo(mi)
@ -180,7 +175,7 @@ func (x *SetVerificationReq) ProtoReflect() protoreflect.Message {
// Deprecated: Use SetVerificationReq.ProtoReflect.Descriptor instead. // Deprecated: Use SetVerificationReq.ProtoReflect.Descriptor instead.
func (*SetVerificationReq) Descriptor() ([]byte, []int) { func (*SetVerificationReq) Descriptor() ([]byte, []int) {
return file_service_proto_rawDescGZIP(), []int{1} return file_customer_service_proto_rawDescGZIP(), []int{1}
} }
func (x *SetVerificationReq) GetUserID() string { func (x *SetVerificationReq) GetUserID() string {
@ -198,10 +193,7 @@ func (x *SetVerificationReq) GetStatus() AccountStatus {
} }
type Account struct { type Account struct {
state protoimpl.MessageState state protoimpl.MessageState `protogen:"open.v1"`
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
UserID string `protobuf:"bytes,2,opt,name=userID,proto3" json:"userID,omitempty"` UserID string `protobuf:"bytes,2,opt,name=userID,proto3" json:"userID,omitempty"`
Cart []string `protobuf:"bytes,3,rep,name=cart,proto3" json:"cart,omitempty"` Cart []string `protobuf:"bytes,3,rep,name=cart,proto3" json:"cart,omitempty"`
@ -214,16 +206,16 @@ type Account struct {
DeletedAt *timestamppb.Timestamp `protobuf:"bytes,10,opt,name=deletedAt,proto3" json:"deletedAt,omitempty"` DeletedAt *timestamppb.Timestamp `protobuf:"bytes,10,opt,name=deletedAt,proto3" json:"deletedAt,omitempty"`
From string `protobuf:"bytes,11,opt,name=from,proto3" json:"from,omitempty"` From string `protobuf:"bytes,11,opt,name=from,proto3" json:"from,omitempty"`
Partner string `protobuf:"bytes,12,opt,name=partner,proto3" json:"partner,omitempty"` Partner string `protobuf:"bytes,12,opt,name=partner,proto3" json:"partner,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
} }
func (x *Account) Reset() { func (x *Account) Reset() {
*x = Account{} *x = Account{}
if protoimpl.UnsafeEnabled { mi := &file_customer_service_proto_msgTypes[2]
mi := &file_service_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi) ms.StoreMessageInfo(mi)
} }
}
func (x *Account) String() string { func (x *Account) String() string {
return protoimpl.X.MessageStringOf(x) return protoimpl.X.MessageStringOf(x)
@ -232,8 +224,8 @@ func (x *Account) String() string {
func (*Account) ProtoMessage() {} func (*Account) ProtoMessage() {}
func (x *Account) ProtoReflect() protoreflect.Message { func (x *Account) ProtoReflect() protoreflect.Message {
mi := &file_service_proto_msgTypes[2] mi := &file_customer_service_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil { if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil { if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi) ms.StoreMessageInfo(mi)
@ -245,7 +237,7 @@ func (x *Account) ProtoReflect() protoreflect.Message {
// Deprecated: Use Account.ProtoReflect.Descriptor instead. // Deprecated: Use Account.ProtoReflect.Descriptor instead.
func (*Account) Descriptor() ([]byte, []int) { func (*Account) Descriptor() ([]byte, []int) {
return file_service_proto_rawDescGZIP(), []int{2} return file_customer_service_proto_rawDescGZIP(), []int{2}
} }
func (x *Account) GetId() string { func (x *Account) GetId() string {
@ -333,26 +325,23 @@ func (x *Account) GetPartner() string {
} }
type Wallet struct { type Wallet struct {
state protoimpl.MessageState state protoimpl.MessageState `protogen:"open.v1"`
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Cash int64 `protobuf:"varint,1,opt,name=cash,proto3" json:"cash,omitempty"` Cash int64 `protobuf:"varint,1,opt,name=cash,proto3" json:"cash,omitempty"`
Currency string `protobuf:"bytes,2,opt,name=currency,proto3" json:"currency,omitempty"` Currency string `protobuf:"bytes,2,opt,name=currency,proto3" json:"currency,omitempty"`
Spent int64 `protobuf:"varint,3,opt,name=spent,proto3" json:"spent,omitempty"` Spent int64 `protobuf:"varint,3,opt,name=spent,proto3" json:"spent,omitempty"`
PurchasesAmount int64 `protobuf:"varint,4,opt,name=purchasesAmount,proto3" json:"purchasesAmount,omitempty"` PurchasesAmount int64 `protobuf:"varint,4,opt,name=purchasesAmount,proto3" json:"purchasesAmount,omitempty"`
Money int64 `protobuf:"varint,5,opt,name=money,proto3" json:"money,omitempty"` Money int64 `protobuf:"varint,5,opt,name=money,proto3" json:"money,omitempty"`
LastPaymentId string `protobuf:"bytes,6,opt,name=lastPaymentId,proto3" json:"lastPaymentId,omitempty"` LastPaymentId string `protobuf:"bytes,6,opt,name=lastPaymentId,proto3" json:"lastPaymentId,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
} }
func (x *Wallet) Reset() { func (x *Wallet) Reset() {
*x = Wallet{} *x = Wallet{}
if protoimpl.UnsafeEnabled { mi := &file_customer_service_proto_msgTypes[3]
mi := &file_service_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi) ms.StoreMessageInfo(mi)
} }
}
func (x *Wallet) String() string { func (x *Wallet) String() string {
return protoimpl.X.MessageStringOf(x) return protoimpl.X.MessageStringOf(x)
@ -361,8 +350,8 @@ func (x *Wallet) String() string {
func (*Wallet) ProtoMessage() {} func (*Wallet) ProtoMessage() {}
func (x *Wallet) ProtoReflect() protoreflect.Message { func (x *Wallet) ProtoReflect() protoreflect.Message {
mi := &file_service_proto_msgTypes[3] mi := &file_customer_service_proto_msgTypes[3]
if protoimpl.UnsafeEnabled && x != nil { if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil { if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi) ms.StoreMessageInfo(mi)
@ -374,7 +363,7 @@ func (x *Wallet) ProtoReflect() protoreflect.Message {
// Deprecated: Use Wallet.ProtoReflect.Descriptor instead. // Deprecated: Use Wallet.ProtoReflect.Descriptor instead.
func (*Wallet) Descriptor() ([]byte, []int) { func (*Wallet) Descriptor() ([]byte, []int) {
return file_service_proto_rawDescGZIP(), []int{3} return file_customer_service_proto_rawDescGZIP(), []int{3}
} }
func (x *Wallet) GetCash() int64 { func (x *Wallet) GetCash() int64 {
@ -420,24 +409,21 @@ func (x *Wallet) GetLastPaymentId() string {
} }
type Name struct { type Name struct {
state protoimpl.MessageState state protoimpl.MessageState `protogen:"open.v1"`
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Middlename string `protobuf:"bytes,1,opt,name=middlename,proto3" json:"middlename,omitempty"` Middlename string `protobuf:"bytes,1,opt,name=middlename,proto3" json:"middlename,omitempty"`
Firstname string `protobuf:"bytes,2,opt,name=firstname,proto3" json:"firstname,omitempty"` Firstname string `protobuf:"bytes,2,opt,name=firstname,proto3" json:"firstname,omitempty"`
Orgname string `protobuf:"bytes,3,opt,name=orgname,proto3" json:"orgname,omitempty"` Orgname string `protobuf:"bytes,3,opt,name=orgname,proto3" json:"orgname,omitempty"`
Secondname string `protobuf:"bytes,4,opt,name=secondname,proto3" json:"secondname,omitempty"` Secondname string `protobuf:"bytes,4,opt,name=secondname,proto3" json:"secondname,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
} }
func (x *Name) Reset() { func (x *Name) Reset() {
*x = Name{} *x = Name{}
if protoimpl.UnsafeEnabled { mi := &file_customer_service_proto_msgTypes[4]
mi := &file_service_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi) ms.StoreMessageInfo(mi)
} }
}
func (x *Name) String() string { func (x *Name) String() string {
return protoimpl.X.MessageStringOf(x) return protoimpl.X.MessageStringOf(x)
@ -446,8 +432,8 @@ func (x *Name) String() string {
func (*Name) ProtoMessage() {} func (*Name) ProtoMessage() {}
func (x *Name) ProtoReflect() protoreflect.Message { func (x *Name) ProtoReflect() protoreflect.Message {
mi := &file_service_proto_msgTypes[4] mi := &file_customer_service_proto_msgTypes[4]
if protoimpl.UnsafeEnabled && x != nil { if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil { if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi) ms.StoreMessageInfo(mi)
@ -459,7 +445,7 @@ func (x *Name) ProtoReflect() protoreflect.Message {
// Deprecated: Use Name.ProtoReflect.Descriptor instead. // Deprecated: Use Name.ProtoReflect.Descriptor instead.
func (*Name) Descriptor() ([]byte, []int) { func (*Name) Descriptor() ([]byte, []int) {
return file_service_proto_rawDescGZIP(), []int{4} return file_customer_service_proto_rawDescGZIP(), []int{4}
} }
func (x *Name) GetMiddlename() string { func (x *Name) GetMiddlename() string {
@ -490,107 +476,75 @@ func (x *Name) GetSecondname() string {
return "" return ""
} }
var File_service_proto protoreflect.FileDescriptor var File_customer_service_proto protoreflect.FileDescriptor
var file_service_proto_rawDesc = []byte{ const file_customer_service_proto_rawDesc = "" +
0x0a, 0x0d, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, "\n" +
0x08, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x1a, 0x1b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, "\x16customer/service.proto\x12\bcustomer\x1a\x1bgoogle/protobuf/empty.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"m\n" +
0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x65, 0x6d, 0x70, 0x74, 0x79, "\aHistory\x12\x16\n" +
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, "\x06UserID\x18\x01 \x01(\tR\x06UserID\x12\x18\n" +
0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, "\aComment\x18\x02 \x01(\tR\aComment\x12\x10\n" +
0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x6d, 0x0a, 0x07, 0x48, 0x69, 0x73, 0x74, 0x6f, "\x03Key\x18\x03 \x01(\tR\x03Key\x12\x1e\n" +
0x72, 0x79, 0x12, 0x16, 0x0a, 0x06, 0x55, 0x73, 0x65, 0x72, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, "\n" +
0x28, 0x09, 0x52, 0x06, 0x55, 0x73, 0x65, 0x72, 0x49, 0x44, 0x12, 0x18, 0x0a, 0x07, 0x43, 0x6f, "RawDetails\x18\x04 \x01(\tR\n" +
0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x43, 0x6f, 0x6d, "RawDetails\"]\n" +
0x6d, 0x65, 0x6e, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x4b, 0x65, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, "\x12SetVerificationReq\x12\x16\n" +
0x09, 0x52, 0x03, 0x4b, 0x65, 0x79, 0x12, 0x1e, 0x0a, 0x0a, 0x52, 0x61, 0x77, 0x44, 0x65, 0x74, "\x06userID\x18\x01 \x01(\tR\x06userID\x12/\n" +
0x61, 0x69, 0x6c, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x52, 0x61, 0x77, 0x44, "\x06status\x18\x02 \x01(\x0e2\x17.customer.AccountStatusR\x06status\"\xbe\x03\n" +
0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x22, 0x5d, 0x0a, 0x12, 0x53, 0x65, 0x74, 0x56, 0x65, 0x72, "\aAccount\x12\x0e\n" +
0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x12, 0x16, 0x0a, 0x06, "\x02id\x18\x01 \x01(\tR\x02id\x12\x16\n" +
0x75, 0x73, 0x65, 0x72, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, "\x06userID\x18\x02 \x01(\tR\x06userID\x12\x12\n" +
0x65, 0x72, 0x49, 0x44, 0x12, 0x2f, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x02, "\x04cart\x18\x03 \x03(\tR\x04cart\x12(\n" +
0x20, 0x01, 0x28, 0x0e, 0x32, 0x17, 0x2e, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x2e, "\x06wallet\x18\x04 \x01(\v2\x10.customer.WalletR\x06wallet\x12\"\n" +
0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, "\x04name\x18\x05 \x01(\v2\x0e.customer.NameR\x04name\x12/\n" +
0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0xbe, 0x03, 0x0a, 0x07, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, "\x06status\x18\x06 \x01(\x0e2\x17.customer.AccountStatusR\x06status\x12\x1c\n" +
0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, "\tisDeleted\x18\a \x01(\bR\tisDeleted\x128\n" +
0x64, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, "\tcreatedAt\x18\b \x01(\v2\x1a.google.protobuf.TimestampR\tcreatedAt\x128\n" +
0x09, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x44, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x61, 0x72, "\tupdatedAt\x18\t \x01(\v2\x1a.google.protobuf.TimestampR\tupdatedAt\x128\n" +
0x74, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, 0x63, 0x61, 0x72, 0x74, 0x12, 0x28, 0x0a, "\tdeletedAt\x18\n" +
0x06, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, " \x01(\v2\x1a.google.protobuf.TimestampR\tdeletedAt\x12\x12\n" +
0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x2e, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x52, "\x04from\x18\v \x01(\tR\x04from\x12\x18\n" +
0x06, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x12, 0x22, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, "\apartner\x18\f \x01(\tR\apartner\"\xb4\x01\n" +
0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, "\x06Wallet\x12\x12\n" +
0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x2f, 0x0a, 0x06, 0x73, "\x04cash\x18\x01 \x01(\x03R\x04cash\x12\x1a\n" +
0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x17, 0x2e, 0x63, 0x75, "\bcurrency\x18\x02 \x01(\tR\bcurrency\x12\x14\n" +
0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x53, 0x74, "\x05spent\x18\x03 \x01(\x03R\x05spent\x12(\n" +
0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1c, 0x0a, 0x09, "\x0fpurchasesAmount\x18\x04 \x01(\x03R\x0fpurchasesAmount\x12\x14\n" +
0x69, 0x73, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, "\x05money\x18\x05 \x01(\x03R\x05money\x12$\n" +
0x09, 0x69, 0x73, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x12, 0x38, 0x0a, 0x09, 0x63, 0x72, "\rlastPaymentId\x18\x06 \x01(\tR\rlastPaymentId\"~\n" +
0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, "\x04Name\x12\x1e\n" +
0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, "\n" +
0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, "middlename\x18\x01 \x01(\tR\n" +
0x65, 0x64, 0x41, 0x74, 0x12, 0x38, 0x0a, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, "middlename\x12\x1c\n" +
0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, "\tfirstname\x18\x02 \x01(\tR\tfirstname\x12\x18\n" +
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, "\aorgname\x18\x03 \x01(\tR\aorgname\x12\x1e\n" +
0x61, 0x6d, 0x70, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x38, "\n" +
0x0a, 0x09, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x41, 0x74, 0x18, 0x0a, 0x20, 0x01, 0x28, "secondname\x18\x04 \x01(\tR\n" +
0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, "secondname*)\n" +
0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x64, "\rAccountStatus\x12\a\n" +
0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x66, 0x72, 0x6f, 0x6d, "\x03nko\x10\x00\x12\x06\n" +
0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x66, 0x72, 0x6f, 0x6d, 0x12, 0x18, 0x0a, 0x07, "\x02no\x10\x01\x12\a\n" +
0x70, 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, "\x03org\x10\x022\xa2\x01\n" +
0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, 0x22, 0xb4, 0x01, 0x0a, 0x06, 0x57, 0x61, 0x6c, 0x6c, 0x65, "\x0fCustomerService\x12<\n" +
0x74, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, "\rInsertHistory\x12\x11.customer.History\x1a\x16.google.protobuf.Empty\"\x00\x12Q\n" +
0x04, 0x63, 0x61, 0x73, 0x68, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, "\x1cSetAccountVerificationStatus\x12\x1c.customer.SetVerificationReq\x1a\x11.customer.Account\"\x00B\fZ\n" +
0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, "./customerb\x06proto3"
0x79, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x70, 0x65, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03,
0x52, 0x05, 0x73, 0x70, 0x65, 0x6e, 0x74, 0x12, 0x28, 0x0a, 0x0f, 0x70, 0x75, 0x72, 0x63, 0x68,
0x61, 0x73, 0x65, 0x73, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03,
0x52, 0x0f, 0x70, 0x75, 0x72, 0x63, 0x68, 0x61, 0x73, 0x65, 0x73, 0x41, 0x6d, 0x6f, 0x75, 0x6e,
0x74, 0x12, 0x14, 0x0a, 0x05, 0x6d, 0x6f, 0x6e, 0x65, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03,
0x52, 0x05, 0x6d, 0x6f, 0x6e, 0x65, 0x79, 0x12, 0x24, 0x0a, 0x0d, 0x6c, 0x61, 0x73, 0x74, 0x50,
0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d,
0x6c, 0x61, 0x73, 0x74, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x22, 0x7e, 0x0a,
0x04, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x6d, 0x69, 0x64, 0x64, 0x6c, 0x65, 0x6e,
0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x6d, 0x69, 0x64, 0x64, 0x6c,
0x65, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x66, 0x69, 0x72, 0x73, 0x74, 0x6e, 0x61,
0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x66, 0x69, 0x72, 0x73, 0x74, 0x6e,
0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6f, 0x72, 0x67, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03,
0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6f, 0x72, 0x67, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1e, 0x0a,
0x0a, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28,
0x09, 0x52, 0x0a, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x6e, 0x61, 0x6d, 0x65, 0x2a, 0x29, 0x0a,
0x0d, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x07,
0x0a, 0x03, 0x6e, 0x6b, 0x6f, 0x10, 0x00, 0x12, 0x06, 0x0a, 0x02, 0x6e, 0x6f, 0x10, 0x01, 0x12,
0x07, 0x0a, 0x03, 0x6f, 0x72, 0x67, 0x10, 0x02, 0x32, 0xa2, 0x01, 0x0a, 0x0f, 0x43, 0x75, 0x73,
0x74, 0x6f, 0x6d, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x3c, 0x0a, 0x0d,
0x49, 0x6e, 0x73, 0x65, 0x72, 0x74, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x12, 0x11, 0x2e,
0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x2e, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79,
0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62,
0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x51, 0x0a, 0x1c, 0x53, 0x65,
0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61,
0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1c, 0x2e, 0x63, 0x75, 0x73,
0x74, 0x6f, 0x6d, 0x65, 0x72, 0x2e, 0x53, 0x65, 0x74, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63,
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x1a, 0x11, 0x2e, 0x63, 0x75, 0x73, 0x74, 0x6f,
0x6d, 0x65, 0x72, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x00, 0x42, 0x0c, 0x5a,
0x0a, 0x2e, 0x2f, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x62, 0x06, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x33,
}
var ( var (
file_service_proto_rawDescOnce sync.Once file_customer_service_proto_rawDescOnce sync.Once
file_service_proto_rawDescData = file_service_proto_rawDesc file_customer_service_proto_rawDescData []byte
) )
func file_service_proto_rawDescGZIP() []byte { func file_customer_service_proto_rawDescGZIP() []byte {
file_service_proto_rawDescOnce.Do(func() { file_customer_service_proto_rawDescOnce.Do(func() {
file_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_service_proto_rawDescData) file_customer_service_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_customer_service_proto_rawDesc), len(file_customer_service_proto_rawDesc)))
}) })
return file_service_proto_rawDescData return file_customer_service_proto_rawDescData
} }
var file_service_proto_enumTypes = make([]protoimpl.EnumInfo, 1) var file_customer_service_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
var file_service_proto_msgTypes = make([]protoimpl.MessageInfo, 5) var file_customer_service_proto_msgTypes = make([]protoimpl.MessageInfo, 5)
var file_service_proto_goTypes = []interface{}{ var file_customer_service_proto_goTypes = []any{
(AccountStatus)(0), // 0: customer.AccountStatus (AccountStatus)(0), // 0: customer.AccountStatus
(*History)(nil), // 1: customer.History (*History)(nil), // 1: customer.History
(*SetVerificationReq)(nil), // 2: customer.SetVerificationReq (*SetVerificationReq)(nil), // 2: customer.SetVerificationReq
@ -600,7 +554,7 @@ var file_service_proto_goTypes = []interface{}{
(*timestamppb.Timestamp)(nil), // 6: google.protobuf.Timestamp (*timestamppb.Timestamp)(nil), // 6: google.protobuf.Timestamp
(*emptypb.Empty)(nil), // 7: google.protobuf.Empty (*emptypb.Empty)(nil), // 7: google.protobuf.Empty
} }
var file_service_proto_depIdxs = []int32{ var file_customer_service_proto_depIdxs = []int32{
0, // 0: customer.SetVerificationReq.status:type_name -> customer.AccountStatus 0, // 0: customer.SetVerificationReq.status:type_name -> customer.AccountStatus
4, // 1: customer.Account.wallet:type_name -> customer.Wallet 4, // 1: customer.Account.wallet:type_name -> customer.Wallet
5, // 2: customer.Account.name:type_name -> customer.Name 5, // 2: customer.Account.name:type_name -> customer.Name
@ -619,90 +573,27 @@ var file_service_proto_depIdxs = []int32{
0, // [0:7] is the sub-list for field type_name 0, // [0:7] is the sub-list for field type_name
} }
func init() { file_service_proto_init() } func init() { file_customer_service_proto_init() }
func file_service_proto_init() { func file_customer_service_proto_init() {
if File_service_proto != nil { if File_customer_service_proto != nil {
return return
} }
if !protoimpl.UnsafeEnabled {
file_service_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*History); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_service_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*SetVerificationReq); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_service_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Account); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_service_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Wallet); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_service_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Name); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{} type x struct{}
out := protoimpl.TypeBuilder{ out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{ File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(), GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_service_proto_rawDesc, RawDescriptor: unsafe.Slice(unsafe.StringData(file_customer_service_proto_rawDesc), len(file_customer_service_proto_rawDesc)),
NumEnums: 1, NumEnums: 1,
NumMessages: 5, NumMessages: 5,
NumExtensions: 0, NumExtensions: 0,
NumServices: 1, NumServices: 1,
}, },
GoTypes: file_service_proto_goTypes, GoTypes: file_customer_service_proto_goTypes,
DependencyIndexes: file_service_proto_depIdxs, DependencyIndexes: file_customer_service_proto_depIdxs,
EnumInfos: file_service_proto_enumTypes, EnumInfos: file_customer_service_proto_enumTypes,
MessageInfos: file_service_proto_msgTypes, MessageInfos: file_customer_service_proto_msgTypes,
}.Build() }.Build()
File_service_proto = out.File File_customer_service_proto = out.File
file_service_proto_rawDesc = nil file_customer_service_proto_goTypes = nil
file_service_proto_goTypes = nil file_customer_service_proto_depIdxs = nil
file_service_proto_depIdxs = nil
} }

@ -1,6 +1,6 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT. // Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions: // versions:
// - protoc-gen-go-grpc v1.3.0 // - protoc-gen-go-grpc v1.5.1
// - protoc (unknown) // - protoc (unknown)
// source: customer/service.proto // source: customer/service.proto
@ -16,11 +16,12 @@ import (
// This is a compile-time assertion to ensure that this generated file // This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against. // is compatible with the grpc package it is being compiled against.
// Requires gRPC-Go v1.32.0 or later. // Requires gRPC-Go v1.64.0 or later.
const _ = grpc.SupportPackageIsVersion7 const _ = grpc.SupportPackageIsVersion9
const ( const (
CustomerService_InsertHistory_FullMethodName = "/customer.CustomerService/InsertHistory" CustomerService_InsertHistory_FullMethodName = "/customer.CustomerService/InsertHistory"
CustomerService_SetAccountVerificationStatus_FullMethodName = "/customer.CustomerService/SetAccountVerificationStatus"
) )
// CustomerServiceClient is the client API for CustomerService service. // CustomerServiceClient is the client API for CustomerService service.
@ -40,8 +41,9 @@ func NewCustomerServiceClient(cc grpc.ClientConnInterface) CustomerServiceClient
} }
func (c *customerServiceClient) InsertHistory(ctx context.Context, in *History, opts ...grpc.CallOption) (*emptypb.Empty, error) { func (c *customerServiceClient) InsertHistory(ctx context.Context, in *History, opts ...grpc.CallOption) (*emptypb.Empty, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(emptypb.Empty) out := new(emptypb.Empty)
err := c.cc.Invoke(ctx, CustomerService_InsertHistory_FullMethodName, in, out, opts...) err := c.cc.Invoke(ctx, CustomerService_InsertHistory_FullMethodName, in, out, cOpts...)
if err != nil { if err != nil {
return nil, err return nil, err
} }
@ -49,8 +51,9 @@ func (c *customerServiceClient) InsertHistory(ctx context.Context, in *History,
} }
func (c *customerServiceClient) SetAccountVerificationStatus(ctx context.Context, in *SetVerificationReq, opts ...grpc.CallOption) (*Account, error) { func (c *customerServiceClient) SetAccountVerificationStatus(ctx context.Context, in *SetVerificationReq, opts ...grpc.CallOption) (*Account, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(Account) out := new(Account)
err := c.cc.Invoke(ctx, "/customer.CustomerService/SetAccountVerificationStatus", in, out, opts...) err := c.cc.Invoke(ctx, CustomerService_SetAccountVerificationStatus_FullMethodName, in, out, cOpts...)
if err != nil { if err != nil {
return nil, err return nil, err
} }
@ -58,17 +61,19 @@ func (c *customerServiceClient) SetAccountVerificationStatus(ctx context.Context
} }
// CustomerServiceServer is the server API for CustomerService service. // CustomerServiceServer is the server API for CustomerService service.
// All implementations must embed UnimplementedCustomerServiceServer // All implementations should embed UnimplementedCustomerServiceServer
// for forward compatibility // for forward compatibility.
type CustomerServiceServer interface { type CustomerServiceServer interface {
InsertHistory(context.Context, *History) (*emptypb.Empty, error) InsertHistory(context.Context, *History) (*emptypb.Empty, error)
SetAccountVerificationStatus(context.Context, *SetVerificationReq) (*Account, error) SetAccountVerificationStatus(context.Context, *SetVerificationReq) (*Account, error)
mustEmbedUnimplementedCustomerServiceServer()
} }
// UnimplementedCustomerServiceServer must be embedded to have forward compatible implementations. // UnimplementedCustomerServiceServer should be embedded to have
type UnimplementedCustomerServiceServer struct { // forward compatible implementations.
} //
// NOTE: this should be embedded by value instead of pointer to avoid a nil
// pointer dereference when methods are called.
type UnimplementedCustomerServiceServer struct{}
func (UnimplementedCustomerServiceServer) InsertHistory(context.Context, *History) (*emptypb.Empty, error) { func (UnimplementedCustomerServiceServer) InsertHistory(context.Context, *History) (*emptypb.Empty, error) {
return nil, status.Errorf(codes.Unimplemented, "method InsertHistory not implemented") return nil, status.Errorf(codes.Unimplemented, "method InsertHistory not implemented")
@ -76,7 +81,7 @@ func (UnimplementedCustomerServiceServer) InsertHistory(context.Context, *Histor
func (UnimplementedCustomerServiceServer) SetAccountVerificationStatus(context.Context, *SetVerificationReq) (*Account, error) { func (UnimplementedCustomerServiceServer) SetAccountVerificationStatus(context.Context, *SetVerificationReq) (*Account, error) {
return nil, status.Errorf(codes.Unimplemented, "method SetAccountVerificationStatus not implemented") return nil, status.Errorf(codes.Unimplemented, "method SetAccountVerificationStatus not implemented")
} }
func (UnimplementedCustomerServiceServer) mustEmbedUnimplementedCustomerServiceServer() {} func (UnimplementedCustomerServiceServer) testEmbeddedByValue() {}
// UnsafeCustomerServiceServer may be embedded to opt out of forward compatibility for this service. // UnsafeCustomerServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to CustomerServiceServer will // Use of this interface is not recommended, as added methods to CustomerServiceServer will
@ -86,6 +91,13 @@ type UnsafeCustomerServiceServer interface {
} }
func RegisterCustomerServiceServer(s grpc.ServiceRegistrar, srv CustomerServiceServer) { func RegisterCustomerServiceServer(s grpc.ServiceRegistrar, srv CustomerServiceServer) {
// If the following call pancis, it indicates UnimplementedCustomerServiceServer was
// embedded by pointer and is nil. This will cause panics if an
// unimplemented method is ever invoked, so we test this at initialization
// time to prevent it from happening at runtime later due to I/O.
if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
t.testEmbeddedByValue()
}
s.RegisterService(&CustomerService_ServiceDesc, srv) s.RegisterService(&CustomerService_ServiceDesc, srv)
} }
@ -117,7 +129,7 @@ func _CustomerService_SetAccountVerificationStatus_Handler(srv interface{}, ctx
} }
info := &grpc.UnaryServerInfo{ info := &grpc.UnaryServerInfo{
Server: srv, Server: srv,
FullMethod: "/customer.CustomerService/SetAccountVerificationStatus", FullMethod: CustomerService_SetAccountVerificationStatus_FullMethodName,
} }
handler := func(ctx context.Context, req interface{}) (interface{}, error) { handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(CustomerServiceServer).SetAccountVerificationStatus(ctx, req.(*SetVerificationReq)) return srv.(CustomerServiceServer).SetAccountVerificationStatus(ctx, req.(*SetVerificationReq))
@ -142,5 +154,5 @@ var CustomerService_ServiceDesc = grpc.ServiceDesc{
}, },
}, },
Streams: []grpc.StreamDesc{}, Streams: []grpc.StreamDesc{},
Metadata: "service.proto", Metadata: "customer/service.proto",
} }

@ -1,6 +1,6 @@
// Code generated by protoc-gen-go. DO NOT EDIT. // Code generated by protoc-gen-go. DO NOT EDIT.
// versions: // versions:
// protoc-gen-go v1.33.0 // protoc-gen-go v1.36.7
// protoc (unknown) // protoc (unknown)
// source: discount/audit.model.proto // source: discount/audit.model.proto
@ -14,6 +14,7 @@ import (
timestamppb "google.golang.org/protobuf/types/known/timestamppb" timestamppb "google.golang.org/protobuf/types/known/timestamppb"
reflect "reflect" reflect "reflect"
sync "sync" sync "sync"
unsafe "unsafe"
) )
const ( const (
@ -24,24 +25,21 @@ const (
) )
type Audit struct { type Audit struct {
state protoimpl.MessageState state protoimpl.MessageState `protogen:"open.v1"`
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=UpdatedAt,proto3" json:"UpdatedAt,omitempty"` UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=UpdatedAt,proto3" json:"UpdatedAt,omitempty"`
CreatedAt *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=CreatedAt,proto3" json:"CreatedAt,omitempty"` CreatedAt *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=CreatedAt,proto3" json:"CreatedAt,omitempty"`
DeletedAt *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=DeletedAt,proto3,oneof" json:"DeletedAt,omitempty"` DeletedAt *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=DeletedAt,proto3,oneof" json:"DeletedAt,omitempty"`
Deleted bool `protobuf:"varint,4,opt,name=Deleted,proto3" json:"Deleted,omitempty"` Deleted bool `protobuf:"varint,4,opt,name=Deleted,proto3" json:"Deleted,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
} }
func (x *Audit) Reset() { func (x *Audit) Reset() {
*x = Audit{} *x = Audit{}
if protoimpl.UnsafeEnabled {
mi := &file_discount_audit_model_proto_msgTypes[0] mi := &file_discount_audit_model_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi) ms.StoreMessageInfo(mi)
} }
}
func (x *Audit) String() string { func (x *Audit) String() string {
return protoimpl.X.MessageStringOf(x) return protoimpl.X.MessageStringOf(x)
@ -51,7 +49,7 @@ func (*Audit) ProtoMessage() {}
func (x *Audit) ProtoReflect() protoreflect.Message { func (x *Audit) ProtoReflect() protoreflect.Message {
mi := &file_discount_audit_model_proto_msgTypes[0] mi := &file_discount_audit_model_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil { if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil { if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi) ms.StoreMessageInfo(mi)
@ -96,47 +94,32 @@ func (x *Audit) GetDeleted() bool {
var File_discount_audit_model_proto protoreflect.FileDescriptor var File_discount_audit_model_proto protoreflect.FileDescriptor
var file_discount_audit_model_proto_rawDesc = []byte{ const file_discount_audit_model_proto_rawDesc = "" +
0x0a, 0x1a, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x2f, 0x61, 0x75, 0x64, 0x69, 0x74, "\n" +
0x2e, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x08, 0x64, 0x69, "\x1adiscount/audit.model.proto\x12\bdiscount\x1a\x1cgoogle/api/annotations.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1bgoogle/protobuf/empty.proto\"\xe2\x01\n" +
0x73, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, "\x05Audit\x128\n" +
0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, "\tUpdatedAt\x18\x01 \x01(\v2\x1a.google.protobuf.TimestampR\tUpdatedAt\x128\n" +
0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, "\tCreatedAt\x18\x02 \x01(\v2\x1a.google.protobuf.TimestampR\tCreatedAt\x12=\n" +
0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, "\tDeletedAt\x18\x03 \x01(\v2\x1a.google.protobuf.TimestampH\x00R\tDeletedAt\x88\x01\x01\x12\x18\n" +
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, "\aDeleted\x18\x04 \x01(\bR\aDeletedB\f\n" +
0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, "\n" +
0x74, 0x6f, 0x22, 0xe2, 0x01, 0x0a, 0x05, 0x41, 0x75, 0x64, 0x69, 0x74, 0x12, 0x38, 0x0a, 0x09, "_DeletedAtB\fZ\n" +
0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, "./discountb\x06proto3"
0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75,
0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x55, 0x70, 0x64,
0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x38, 0x0a, 0x09, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65,
0x64, 0x41, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67,
0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65,
0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74,
0x12, 0x3d, 0x0a, 0x09, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x41, 0x74, 0x18, 0x03, 0x20,
0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x48,
0x00, 0x52, 0x09, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x41, 0x74, 0x88, 0x01, 0x01, 0x12,
0x18, 0x0a, 0x07, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08,
0x52, 0x07, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x44, 0x65,
0x6c, 0x65, 0x74, 0x65, 0x64, 0x41, 0x74, 0x42, 0x0c, 0x5a, 0x0a, 0x2e, 0x2f, 0x64, 0x69, 0x73,
0x63, 0x6f, 0x75, 0x6e, 0x74, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var ( var (
file_discount_audit_model_proto_rawDescOnce sync.Once file_discount_audit_model_proto_rawDescOnce sync.Once
file_discount_audit_model_proto_rawDescData = file_discount_audit_model_proto_rawDesc file_discount_audit_model_proto_rawDescData []byte
) )
func file_discount_audit_model_proto_rawDescGZIP() []byte { func file_discount_audit_model_proto_rawDescGZIP() []byte {
file_discount_audit_model_proto_rawDescOnce.Do(func() { file_discount_audit_model_proto_rawDescOnce.Do(func() {
file_discount_audit_model_proto_rawDescData = protoimpl.X.CompressGZIP(file_discount_audit_model_proto_rawDescData) file_discount_audit_model_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_discount_audit_model_proto_rawDesc), len(file_discount_audit_model_proto_rawDesc)))
}) })
return file_discount_audit_model_proto_rawDescData return file_discount_audit_model_proto_rawDescData
} }
var file_discount_audit_model_proto_msgTypes = make([]protoimpl.MessageInfo, 1) var file_discount_audit_model_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
var file_discount_audit_model_proto_goTypes = []interface{}{ var file_discount_audit_model_proto_goTypes = []any{
(*Audit)(nil), // 0: discount.Audit (*Audit)(nil), // 0: discount.Audit
(*timestamppb.Timestamp)(nil), // 1: google.protobuf.Timestamp (*timestamppb.Timestamp)(nil), // 1: google.protobuf.Timestamp
} }
@ -156,26 +139,12 @@ func file_discount_audit_model_proto_init() {
if File_discount_audit_model_proto != nil { if File_discount_audit_model_proto != nil {
return return
} }
if !protoimpl.UnsafeEnabled { file_discount_audit_model_proto_msgTypes[0].OneofWrappers = []any{}
file_discount_audit_model_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Audit); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
file_discount_audit_model_proto_msgTypes[0].OneofWrappers = []interface{}{}
type x struct{} type x struct{}
out := protoimpl.TypeBuilder{ out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{ File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(), GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_discount_audit_model_proto_rawDesc, RawDescriptor: unsafe.Slice(unsafe.StringData(file_discount_audit_model_proto_rawDesc), len(file_discount_audit_model_proto_rawDesc)),
NumEnums: 0, NumEnums: 0,
NumMessages: 1, NumMessages: 1,
NumExtensions: 0, NumExtensions: 0,
@ -186,7 +155,6 @@ func file_discount_audit_model_proto_init() {
MessageInfos: file_discount_audit_model_proto_msgTypes, MessageInfos: file_discount_audit_model_proto_msgTypes,
}.Build() }.Build()
File_discount_audit_model_proto = out.File File_discount_audit_model_proto = out.File
file_discount_audit_model_proto_rawDesc = nil
file_discount_audit_model_proto_goTypes = nil file_discount_audit_model_proto_goTypes = nil
file_discount_audit_model_proto_depIdxs = nil file_discount_audit_model_proto_depIdxs = nil
} }

@ -1,6 +1,6 @@
// Code generated by protoc-gen-go. DO NOT EDIT. // Code generated by protoc-gen-go. DO NOT EDIT.
// versions: // versions:
// protoc-gen-go v1.33.0 // protoc-gen-go v1.36.7
// protoc (unknown) // protoc (unknown)
// source: discount/discount.model.proto // source: discount/discount.model.proto
@ -14,6 +14,7 @@ import (
timestamppb "google.golang.org/protobuf/types/known/timestamppb" timestamppb "google.golang.org/protobuf/types/known/timestamppb"
reflect "reflect" reflect "reflect"
sync "sync" sync "sync"
unsafe "unsafe"
) )
const ( const (
@ -73,10 +74,7 @@ func (TargetScope) EnumDescriptor() ([]byte, []int) {
} }
type DiscountOptional struct { type DiscountOptional struct {
state protoimpl.MessageState state protoimpl.MessageState `protogen:"open.v1"`
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
ID string `protobuf:"bytes,1,opt,name=ID,proto3" json:"ID,omitempty"` ID string `protobuf:"bytes,1,opt,name=ID,proto3" json:"ID,omitempty"`
Name *string `protobuf:"bytes,2,opt,name=Name,proto3,oneof" json:"Name,omitempty"` Name *string `protobuf:"bytes,2,opt,name=Name,proto3,oneof" json:"Name,omitempty"`
Layer *uint32 `protobuf:"varint,3,opt,name=Layer,proto3,oneof" json:"Layer,omitempty"` Layer *uint32 `protobuf:"varint,3,opt,name=Layer,proto3,oneof" json:"Layer,omitempty"`
@ -84,16 +82,16 @@ type DiscountOptional struct {
Condition *DiscountCondition `protobuf:"bytes,5,opt,name=Condition,proto3,oneof" json:"Condition,omitempty"` Condition *DiscountCondition `protobuf:"bytes,5,opt,name=Condition,proto3,oneof" json:"Condition,omitempty"`
Target *DiscountCalculationTarget `protobuf:"bytes,6,opt,name=Target,proto3,oneof" json:"Target,omitempty"` Target *DiscountCalculationTarget `protobuf:"bytes,6,opt,name=Target,proto3,oneof" json:"Target,omitempty"`
Deprecated *bool `protobuf:"varint,7,opt,name=Deprecated,proto3,oneof" json:"Deprecated,omitempty"` Deprecated *bool `protobuf:"varint,7,opt,name=Deprecated,proto3,oneof" json:"Deprecated,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
} }
func (x *DiscountOptional) Reset() { func (x *DiscountOptional) Reset() {
*x = DiscountOptional{} *x = DiscountOptional{}
if protoimpl.UnsafeEnabled {
mi := &file_discount_discount_model_proto_msgTypes[0] mi := &file_discount_discount_model_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi) ms.StoreMessageInfo(mi)
} }
}
func (x *DiscountOptional) String() string { func (x *DiscountOptional) String() string {
return protoimpl.X.MessageStringOf(x) return protoimpl.X.MessageStringOf(x)
@ -103,7 +101,7 @@ func (*DiscountOptional) ProtoMessage() {}
func (x *DiscountOptional) ProtoReflect() protoreflect.Message { func (x *DiscountOptional) ProtoReflect() protoreflect.Message {
mi := &file_discount_discount_model_proto_msgTypes[0] mi := &file_discount_discount_model_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil { if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil { if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi) ms.StoreMessageInfo(mi)
@ -168,21 +166,18 @@ func (x *DiscountOptional) GetDeprecated() bool {
} }
type Discounts struct { type Discounts struct {
state protoimpl.MessageState state protoimpl.MessageState `protogen:"open.v1"`
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Discounts []*Discount `protobuf:"bytes,1,rep,name=Discounts,proto3" json:"Discounts,omitempty"` Discounts []*Discount `protobuf:"bytes,1,rep,name=Discounts,proto3" json:"Discounts,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
} }
func (x *Discounts) Reset() { func (x *Discounts) Reset() {
*x = Discounts{} *x = Discounts{}
if protoimpl.UnsafeEnabled {
mi := &file_discount_discount_model_proto_msgTypes[1] mi := &file_discount_discount_model_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi) ms.StoreMessageInfo(mi)
} }
}
func (x *Discounts) String() string { func (x *Discounts) String() string {
return protoimpl.X.MessageStringOf(x) return protoimpl.X.MessageStringOf(x)
@ -192,7 +187,7 @@ func (*Discounts) ProtoMessage() {}
func (x *Discounts) ProtoReflect() protoreflect.Message { func (x *Discounts) ProtoReflect() protoreflect.Message {
mi := &file_discount_discount_model_proto_msgTypes[1] mi := &file_discount_discount_model_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil { if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil { if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi) ms.StoreMessageInfo(mi)
@ -215,10 +210,7 @@ func (x *Discounts) GetDiscounts() []*Discount {
} }
type Discount struct { type Discount struct {
state protoimpl.MessageState state protoimpl.MessageState `protogen:"open.v1"`
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
ID string `protobuf:"bytes,1,opt,name=ID,proto3" json:"ID,omitempty"` ID string `protobuf:"bytes,1,opt,name=ID,proto3" json:"ID,omitempty"`
Name string `protobuf:"bytes,2,opt,name=Name,proto3" json:"Name,omitempty"` Name string `protobuf:"bytes,2,opt,name=Name,proto3" json:"Name,omitempty"`
Layer uint32 `protobuf:"varint,3,opt,name=Layer,proto3" json:"Layer,omitempty"` Layer uint32 `protobuf:"varint,3,opt,name=Layer,proto3" json:"Layer,omitempty"`
@ -227,16 +219,16 @@ type Discount struct {
Target *DiscountCalculationTarget `protobuf:"bytes,6,opt,name=Target,proto3" json:"Target,omitempty"` Target *DiscountCalculationTarget `protobuf:"bytes,6,opt,name=Target,proto3" json:"Target,omitempty"`
Audit *Audit `protobuf:"bytes,7,opt,name=Audit,proto3" json:"Audit,omitempty"` Audit *Audit `protobuf:"bytes,7,opt,name=Audit,proto3" json:"Audit,omitempty"`
Deprecated bool `protobuf:"varint,8,opt,name=Deprecated,proto3" json:"Deprecated,omitempty"` Deprecated bool `protobuf:"varint,8,opt,name=Deprecated,proto3" json:"Deprecated,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
} }
func (x *Discount) Reset() { func (x *Discount) Reset() {
*x = Discount{} *x = Discount{}
if protoimpl.UnsafeEnabled {
mi := &file_discount_discount_model_proto_msgTypes[2] mi := &file_discount_discount_model_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi) ms.StoreMessageInfo(mi)
} }
}
func (x *Discount) String() string { func (x *Discount) String() string {
return protoimpl.X.MessageStringOf(x) return protoimpl.X.MessageStringOf(x)
@ -246,7 +238,7 @@ func (*Discount) ProtoMessage() {}
func (x *Discount) ProtoReflect() protoreflect.Message { func (x *Discount) ProtoReflect() protoreflect.Message {
mi := &file_discount_discount_model_proto_msgTypes[2] mi := &file_discount_discount_model_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil { if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil { if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi) ms.StoreMessageInfo(mi)
@ -318,25 +310,22 @@ func (x *Discount) GetDeprecated() bool {
} }
type DiscountCalculationTarget struct { type DiscountCalculationTarget struct {
state protoimpl.MessageState state protoimpl.MessageState `protogen:"open.v1"`
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Products []*ProductTarget `protobuf:"bytes,1,rep,name=Products,proto3" json:"Products,omitempty"` Products []*ProductTarget `protobuf:"bytes,1,rep,name=Products,proto3" json:"Products,omitempty"`
Factor float64 `protobuf:"fixed64,2,opt,name=Factor,proto3" json:"Factor,omitempty"` Factor float64 `protobuf:"fixed64,2,opt,name=Factor,proto3" json:"Factor,omitempty"`
TargetScope *TargetScope `protobuf:"varint,3,opt,name=TargetScope,proto3,enum=discount.TargetScope,oneof" json:"TargetScope,omitempty"` TargetScope *TargetScope `protobuf:"varint,3,opt,name=TargetScope,proto3,enum=discount.TargetScope,oneof" json:"TargetScope,omitempty"`
TargetGroup *string `protobuf:"bytes,4,opt,name=TargetGroup,proto3,oneof" json:"TargetGroup,omitempty"` TargetGroup *string `protobuf:"bytes,4,opt,name=TargetGroup,proto3,oneof" json:"TargetGroup,omitempty"`
Overhelm *bool `protobuf:"varint,5,opt,name=Overhelm,proto3,oneof" json:"Overhelm,omitempty"` Overhelm *bool `protobuf:"varint,5,opt,name=Overhelm,proto3,oneof" json:"Overhelm,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
} }
func (x *DiscountCalculationTarget) Reset() { func (x *DiscountCalculationTarget) Reset() {
*x = DiscountCalculationTarget{} *x = DiscountCalculationTarget{}
if protoimpl.UnsafeEnabled {
mi := &file_discount_discount_model_proto_msgTypes[3] mi := &file_discount_discount_model_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi) ms.StoreMessageInfo(mi)
} }
}
func (x *DiscountCalculationTarget) String() string { func (x *DiscountCalculationTarget) String() string {
return protoimpl.X.MessageStringOf(x) return protoimpl.X.MessageStringOf(x)
@ -346,7 +335,7 @@ func (*DiscountCalculationTarget) ProtoMessage() {}
func (x *DiscountCalculationTarget) ProtoReflect() protoreflect.Message { func (x *DiscountCalculationTarget) ProtoReflect() protoreflect.Message {
mi := &file_discount_discount_model_proto_msgTypes[3] mi := &file_discount_discount_model_proto_msgTypes[3]
if protoimpl.UnsafeEnabled && x != nil { if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil { if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi) ms.StoreMessageInfo(mi)
@ -397,10 +386,7 @@ func (x *DiscountCalculationTarget) GetOverhelm() bool {
} }
type DiscountCondition struct { type DiscountCondition struct {
state protoimpl.MessageState state protoimpl.MessageState `protogen:"open.v1"`
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Period *PeriodCondition `protobuf:"bytes,1,opt,name=Period,proto3,oneof" json:"Period,omitempty"` Period *PeriodCondition `protobuf:"bytes,1,opt,name=Period,proto3,oneof" json:"Period,omitempty"`
User *string `protobuf:"bytes,2,opt,name=User,proto3,oneof" json:"User,omitempty"` User *string `protobuf:"bytes,2,opt,name=User,proto3,oneof" json:"User,omitempty"`
UserType *string `protobuf:"bytes,3,opt,name=UserType,proto3,oneof" json:"UserType,omitempty"` UserType *string `protobuf:"bytes,3,opt,name=UserType,proto3,oneof" json:"UserType,omitempty"`
@ -412,16 +398,16 @@ type DiscountCondition struct {
Usage *uint64 `protobuf:"varint,9,opt,name=Usage,proto3,oneof" json:"Usage,omitempty"` Usage *uint64 `protobuf:"varint,9,opt,name=Usage,proto3,oneof" json:"Usage,omitempty"`
PriceFrom *uint64 `protobuf:"varint,10,opt,name=PriceFrom,proto3,oneof" json:"PriceFrom,omitempty"` PriceFrom *uint64 `protobuf:"varint,10,opt,name=PriceFrom,proto3,oneof" json:"PriceFrom,omitempty"`
Group *string `protobuf:"bytes,11,opt,name=Group,proto3,oneof" json:"Group,omitempty"` Group *string `protobuf:"bytes,11,opt,name=Group,proto3,oneof" json:"Group,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
} }
func (x *DiscountCondition) Reset() { func (x *DiscountCondition) Reset() {
*x = DiscountCondition{} *x = DiscountCondition{}
if protoimpl.UnsafeEnabled {
mi := &file_discount_discount_model_proto_msgTypes[4] mi := &file_discount_discount_model_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi) ms.StoreMessageInfo(mi)
} }
}
func (x *DiscountCondition) String() string { func (x *DiscountCondition) String() string {
return protoimpl.X.MessageStringOf(x) return protoimpl.X.MessageStringOf(x)
@ -431,7 +417,7 @@ func (*DiscountCondition) ProtoMessage() {}
func (x *DiscountCondition) ProtoReflect() protoreflect.Message { func (x *DiscountCondition) ProtoReflect() protoreflect.Message {
mi := &file_discount_discount_model_proto_msgTypes[4] mi := &file_discount_discount_model_proto_msgTypes[4]
if protoimpl.UnsafeEnabled && x != nil { if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil { if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi) ms.StoreMessageInfo(mi)
@ -524,23 +510,20 @@ func (x *DiscountCondition) GetGroup() string {
} }
type ProductTarget struct { type ProductTarget struct {
state protoimpl.MessageState state protoimpl.MessageState `protogen:"open.v1"`
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
ID string `protobuf:"bytes,1,opt,name=ID,proto3" json:"ID,omitempty"` ID string `protobuf:"bytes,1,opt,name=ID,proto3" json:"ID,omitempty"`
Factor float64 `protobuf:"fixed64,2,opt,name=Factor,proto3" json:"Factor,omitempty"` Factor float64 `protobuf:"fixed64,2,opt,name=Factor,proto3" json:"Factor,omitempty"`
Overhelm *bool `protobuf:"varint,3,opt,name=Overhelm,proto3,oneof" json:"Overhelm,omitempty"` Overhelm *bool `protobuf:"varint,3,opt,name=Overhelm,proto3,oneof" json:"Overhelm,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
} }
func (x *ProductTarget) Reset() { func (x *ProductTarget) Reset() {
*x = ProductTarget{} *x = ProductTarget{}
if protoimpl.UnsafeEnabled {
mi := &file_discount_discount_model_proto_msgTypes[5] mi := &file_discount_discount_model_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi) ms.StoreMessageInfo(mi)
} }
}
func (x *ProductTarget) String() string { func (x *ProductTarget) String() string {
return protoimpl.X.MessageStringOf(x) return protoimpl.X.MessageStringOf(x)
@ -550,7 +533,7 @@ func (*ProductTarget) ProtoMessage() {}
func (x *ProductTarget) ProtoReflect() protoreflect.Message { func (x *ProductTarget) ProtoReflect() protoreflect.Message {
mi := &file_discount_discount_model_proto_msgTypes[5] mi := &file_discount_discount_model_proto_msgTypes[5]
if protoimpl.UnsafeEnabled && x != nil { if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil { if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi) ms.StoreMessageInfo(mi)
@ -587,22 +570,19 @@ func (x *ProductTarget) GetOverhelm() bool {
} }
type PeriodCondition struct { type PeriodCondition struct {
state protoimpl.MessageState state protoimpl.MessageState `protogen:"open.v1"`
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
From *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=From,proto3" json:"From,omitempty"` From *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=From,proto3" json:"From,omitempty"`
To *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=To,proto3" json:"To,omitempty"` To *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=To,proto3" json:"To,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
} }
func (x *PeriodCondition) Reset() { func (x *PeriodCondition) Reset() {
*x = PeriodCondition{} *x = PeriodCondition{}
if protoimpl.UnsafeEnabled {
mi := &file_discount_discount_model_proto_msgTypes[6] mi := &file_discount_discount_model_proto_msgTypes[6]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi) ms.StoreMessageInfo(mi)
} }
}
func (x *PeriodCondition) String() string { func (x *PeriodCondition) String() string {
return protoimpl.X.MessageStringOf(x) return protoimpl.X.MessageStringOf(x)
@ -612,7 +592,7 @@ func (*PeriodCondition) ProtoMessage() {}
func (x *PeriodCondition) ProtoReflect() protoreflect.Message { func (x *PeriodCondition) ProtoReflect() protoreflect.Message {
mi := &file_discount_discount_model_proto_msgTypes[6] mi := &file_discount_discount_model_proto_msgTypes[6]
if protoimpl.UnsafeEnabled && x != nil { if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil { if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi) ms.StoreMessageInfo(mi)
@ -642,24 +622,21 @@ func (x *PeriodCondition) GetTo() *timestamppb.Timestamp {
} }
type UserInformation struct { type UserInformation struct {
state protoimpl.MessageState state protoimpl.MessageState `protogen:"open.v1"`
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
ID string `protobuf:"bytes,1,opt,name=ID,proto3" json:"ID,omitempty"` ID string `protobuf:"bytes,1,opt,name=ID,proto3" json:"ID,omitempty"`
Type string `protobuf:"bytes,2,opt,name=Type,proto3" json:"Type,omitempty"` Type string `protobuf:"bytes,2,opt,name=Type,proto3" json:"Type,omitempty"`
PurchasesAmount uint64 `protobuf:"varint,3,opt,name=PurchasesAmount,proto3" json:"PurchasesAmount,omitempty"` PurchasesAmount uint64 `protobuf:"varint,3,opt,name=PurchasesAmount,proto3" json:"PurchasesAmount,omitempty"`
CartPurchasesAmount uint64 `protobuf:"varint,4,opt,name=CartPurchasesAmount,proto3" json:"CartPurchasesAmount,omitempty"` CartPurchasesAmount uint64 `protobuf:"varint,4,opt,name=CartPurchasesAmount,proto3" json:"CartPurchasesAmount,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
} }
func (x *UserInformation) Reset() { func (x *UserInformation) Reset() {
*x = UserInformation{} *x = UserInformation{}
if protoimpl.UnsafeEnabled {
mi := &file_discount_discount_model_proto_msgTypes[7] mi := &file_discount_discount_model_proto_msgTypes[7]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi) ms.StoreMessageInfo(mi)
} }
}
func (x *UserInformation) String() string { func (x *UserInformation) String() string {
return protoimpl.X.MessageStringOf(x) return protoimpl.X.MessageStringOf(x)
@ -669,7 +646,7 @@ func (*UserInformation) ProtoMessage() {}
func (x *UserInformation) ProtoReflect() protoreflect.Message { func (x *UserInformation) ProtoReflect() protoreflect.Message {
mi := &file_discount_discount_model_proto_msgTypes[7] mi := &file_discount_discount_model_proto_msgTypes[7]
if protoimpl.UnsafeEnabled && x != nil { if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil { if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi) ms.StoreMessageInfo(mi)
@ -713,25 +690,22 @@ func (x *UserInformation) GetCartPurchasesAmount() uint64 {
} }
type ProductInformation struct { type ProductInformation struct {
state protoimpl.MessageState state protoimpl.MessageState `protogen:"open.v1"`
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
ID string `protobuf:"bytes,1,opt,name=ID,proto3" json:"ID,omitempty"` ID string `protobuf:"bytes,1,opt,name=ID,proto3" json:"ID,omitempty"`
Price uint64 `protobuf:"varint,2,opt,name=Price,proto3" json:"Price,omitempty"` Price uint64 `protobuf:"varint,2,opt,name=Price,proto3" json:"Price,omitempty"`
Term *uint64 `protobuf:"varint,3,opt,name=Term,proto3,oneof" json:"Term,omitempty"` Term *uint64 `protobuf:"varint,3,opt,name=Term,proto3,oneof" json:"Term,omitempty"`
Usage *uint64 `protobuf:"varint,4,opt,name=Usage,proto3,oneof" json:"Usage,omitempty"` Usage *uint64 `protobuf:"varint,4,opt,name=Usage,proto3,oneof" json:"Usage,omitempty"`
Group *string `protobuf:"bytes,5,opt,name=Group,proto3,oneof" json:"Group,omitempty"` Group *string `protobuf:"bytes,5,opt,name=Group,proto3,oneof" json:"Group,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
} }
func (x *ProductInformation) Reset() { func (x *ProductInformation) Reset() {
*x = ProductInformation{} *x = ProductInformation{}
if protoimpl.UnsafeEnabled {
mi := &file_discount_discount_model_proto_msgTypes[8] mi := &file_discount_discount_model_proto_msgTypes[8]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi) ms.StoreMessageInfo(mi)
} }
}
func (x *ProductInformation) String() string { func (x *ProductInformation) String() string {
return protoimpl.X.MessageStringOf(x) return protoimpl.X.MessageStringOf(x)
@ -741,7 +715,7 @@ func (*ProductInformation) ProtoMessage() {}
func (x *ProductInformation) ProtoReflect() protoreflect.Message { func (x *ProductInformation) ProtoReflect() protoreflect.Message {
mi := &file_discount_discount_model_proto_msgTypes[8] mi := &file_discount_discount_model_proto_msgTypes[8]
if protoimpl.UnsafeEnabled && x != nil { if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil { if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi) ms.StoreMessageInfo(mi)
@ -793,170 +767,118 @@ func (x *ProductInformation) GetGroup() string {
var File_discount_discount_model_proto protoreflect.FileDescriptor var File_discount_discount_model_proto protoreflect.FileDescriptor
var file_discount_discount_model_proto_rawDesc = []byte{ const file_discount_discount_model_proto_rawDesc = "" +
0x0a, 0x1d, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x2f, 0x64, 0x69, 0x73, 0x63, 0x6f, "\n" +
0x75, 0x6e, 0x74, 0x2e, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, "\x1ddiscount/discount.model.proto\x12\bdiscount\x1a\x1cgoogle/api/annotations.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a\x1adiscount/audit.model.proto\"\xef\x02\n" +
0x08, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, "\x10DiscountOptional\x12\x0e\n" +
0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, "\x02ID\x18\x01 \x01(\tR\x02ID\x12\x17\n" +
0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, "\x04Name\x18\x02 \x01(\tH\x00R\x04Name\x88\x01\x01\x12\x19\n" +
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, "\x05Layer\x18\x03 \x01(\rH\x01R\x05Layer\x88\x01\x01\x12%\n" +
0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, "\vDescription\x18\x04 \x01(\tH\x02R\vDescription\x88\x01\x01\x12>\n" +
0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x2e, "\tCondition\x18\x05 \x01(\v2\x1b.discount.DiscountConditionH\x03R\tCondition\x88\x01\x01\x12@\n" +
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1a, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x2f, "\x06Target\x18\x06 \x01(\v2#.discount.DiscountCalculationTargetH\x04R\x06Target\x88\x01\x01\x12#\n" +
0x61, 0x75, 0x64, 0x69, 0x74, 0x2e, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, "\n" +
0x6f, 0x22, 0xef, 0x02, 0x0a, 0x10, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4f, 0x70, "Deprecated\x18\a \x01(\bH\x05R\n" +
0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x12, 0x0e, 0x0a, 0x02, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, "Deprecated\x88\x01\x01B\a\n" +
0x28, 0x09, 0x52, 0x02, 0x49, 0x44, 0x12, 0x17, 0x0a, 0x04, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x02, "\x05_NameB\b\n" +
0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x4e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, "\x06_LayerB\x0e\n" +
0x19, 0x0a, 0x05, 0x4c, 0x61, 0x79, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, "\f_DescriptionB\f\n" +
0x52, 0x05, 0x4c, 0x61, 0x79, 0x65, 0x72, 0x88, 0x01, 0x01, 0x12, 0x25, 0x0a, 0x0b, 0x44, 0x65, "\n" +
0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x48, "_ConditionB\t\n" +
0x02, 0x52, 0x0b, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x88, 0x01, "\a_TargetB\r\n" +
0x01, 0x12, 0x3e, 0x0a, 0x09, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, "\v_Deprecated\"=\n" +
0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x2e, "\tDiscounts\x120\n" +
0x44, 0x69, 0x73, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, "\tDiscounts\x18\x01 \x03(\v2\x12.discount.DiscountR\tDiscounts\"\xa5\x02\n" +
0x6e, 0x48, 0x03, 0x52, 0x09, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x88, 0x01, "\bDiscount\x12\x0e\n" +
0x01, 0x12, 0x40, 0x0a, 0x06, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, "\x02ID\x18\x01 \x01(\tR\x02ID\x12\x12\n" +
0x0b, 0x32, 0x23, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x2e, 0x44, 0x69, 0x73, "\x04Name\x18\x02 \x01(\tR\x04Name\x12\x14\n" +
0x63, 0x6f, 0x75, 0x6e, 0x74, 0x43, 0x61, 0x6c, 0x63, 0x75, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, "\x05Layer\x18\x03 \x01(\rR\x05Layer\x12 \n" +
0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x48, 0x04, 0x52, 0x06, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, "\vDescription\x18\x04 \x01(\tR\vDescription\x129\n" +
0x88, 0x01, 0x01, 0x12, 0x23, 0x0a, 0x0a, 0x44, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, "\tCondition\x18\x05 \x01(\v2\x1b.discount.DiscountConditionR\tCondition\x12;\n" +
0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x48, 0x05, 0x52, 0x0a, 0x44, 0x65, 0x70, 0x72, 0x65, "\x06Target\x18\x06 \x01(\v2#.discount.DiscountCalculationTargetR\x06Target\x12%\n" +
0x63, 0x61, 0x74, 0x65, 0x64, 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x4e, 0x61, 0x6d, "\x05Audit\x18\a \x01(\v2\x0f.discount.AuditR\x05Audit\x12\x1e\n" +
0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x4c, 0x61, 0x79, 0x65, 0x72, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, "\n" +
0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, "Deprecated\x18\b \x01(\bR\n" +
0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x54, 0x61, "Deprecated\"\x9b\x02\n" +
0x72, 0x67, 0x65, 0x74, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x44, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, "\x19DiscountCalculationTarget\x123\n" +
0x74, 0x65, 0x64, 0x22, 0x3d, 0x0a, 0x09, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, "\bProducts\x18\x01 \x03(\v2\x17.discount.ProductTargetR\bProducts\x12\x16\n" +
0x12, 0x30, 0x0a, 0x09, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, "\x06Factor\x18\x02 \x01(\x01R\x06Factor\x12<\n" +
0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x2e, 0x44, "\vTargetScope\x18\x03 \x01(\x0e2\x15.discount.TargetScopeH\x00R\vTargetScope\x88\x01\x01\x12%\n" +
0x69, 0x73, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x09, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x75, 0x6e, "\vTargetGroup\x18\x04 \x01(\tH\x01R\vTargetGroup\x88\x01\x01\x12\x1f\n" +
0x74, 0x73, 0x22, 0xa5, 0x02, 0x0a, 0x08, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, "\bOverhelm\x18\x05 \x01(\bH\x02R\bOverhelm\x88\x01\x01B\x0e\n" +
0x0e, 0x0a, 0x02, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x49, 0x44, 0x12, "\f_TargetScopeB\x0e\n" +
0x12, 0x0a, 0x04, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x4e, "\f_TargetGroupB\v\n" +
0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x4c, 0x61, 0x79, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, "\t_Overhelm\"\xa8\x04\n" +
0x28, 0x0d, 0x52, 0x05, 0x4c, 0x61, 0x79, 0x65, 0x72, 0x12, 0x20, 0x0a, 0x0b, 0x44, 0x65, 0x73, "\x11DiscountCondition\x126\n" +
0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, "\x06Period\x18\x01 \x01(\v2\x19.discount.PeriodConditionH\x00R\x06Period\x88\x01\x01\x12\x17\n" +
0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x39, 0x0a, 0x09, 0x43, "\x04User\x18\x02 \x01(\tH\x01R\x04User\x88\x01\x01\x12\x1f\n" +
0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, "\bUserType\x18\x03 \x01(\tH\x02R\bUserType\x88\x01\x01\x12\x1b\n" +
0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x2e, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x75, "\x06Coupon\x18\x04 \x01(\tH\x03R\x06Coupon\x88\x01\x01\x12-\n" +
0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x09, 0x43, 0x6f, 0x6e, "\x0fPurchasesAmount\x18\x05 \x01(\x04H\x04R\x0fPurchasesAmount\x88\x01\x01\x125\n" +
0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3b, 0x0a, 0x06, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, "\x13CartPurchasesAmount\x18\x06 \x01(\x04H\x05R\x13CartPurchasesAmount\x88\x01\x01\x12\x1d\n" +
0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x75, 0x6e, "\aProduct\x18\a \x01(\tH\x06R\aProduct\x88\x01\x01\x12\x17\n" +
0x74, 0x2e, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x43, 0x61, 0x6c, 0x63, 0x75, 0x6c, "\x04Term\x18\b \x01(\x04H\aR\x04Term\x88\x01\x01\x12\x19\n" +
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x52, 0x06, 0x54, 0x61, 0x72, "\x05Usage\x18\t \x01(\x04H\bR\x05Usage\x88\x01\x01\x12!\n" +
0x67, 0x65, 0x74, 0x12, 0x25, 0x0a, 0x05, 0x41, 0x75, 0x64, 0x69, 0x74, 0x18, 0x07, 0x20, 0x01, "\tPriceFrom\x18\n" +
0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x2e, 0x41, 0x75, " \x01(\x04H\tR\tPriceFrom\x88\x01\x01\x12\x19\n" +
0x64, 0x69, 0x74, 0x52, 0x05, 0x41, 0x75, 0x64, 0x69, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x44, 0x65, "\x05Group\x18\v \x01(\tH\n" +
0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, "R\x05Group\x88\x01\x01B\t\n" +
0x44, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x22, 0x9b, 0x02, 0x0a, 0x19, 0x44, "\a_PeriodB\a\n" +
0x69, 0x73, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x43, 0x61, 0x6c, 0x63, 0x75, 0x6c, 0x61, 0x74, 0x69, "\x05_UserB\v\n" +
0x6f, 0x6e, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x12, 0x33, 0x0a, 0x08, 0x50, 0x72, 0x6f, 0x64, "\t_UserTypeB\t\n" +
0x75, 0x63, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x64, 0x69, 0x73, "\a_CouponB\x12\n" +
0x63, 0x6f, 0x75, 0x6e, 0x74, 0x2e, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x54, 0x61, 0x72, "\x10_PurchasesAmountB\x16\n" +
0x67, 0x65, 0x74, 0x52, 0x08, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x73, 0x12, 0x16, 0x0a, "\x14_CartPurchasesAmountB\n" +
0x06, 0x46, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x01, 0x52, 0x06, 0x46, "\n" +
0x61, 0x63, 0x74, 0x6f, 0x72, 0x12, 0x3c, 0x0a, 0x0b, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x53, "\b_ProductB\a\n" +
0x63, 0x6f, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x15, 0x2e, 0x64, 0x69, 0x73, "\x05_TermB\b\n" +
0x63, 0x6f, 0x75, 0x6e, 0x74, 0x2e, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x53, 0x63, 0x6f, 0x70, "\x06_UsageB\f\n" +
0x65, 0x48, 0x00, 0x52, 0x0b, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x53, 0x63, 0x6f, 0x70, 0x65, "\n" +
0x88, 0x01, 0x01, 0x12, 0x25, 0x0a, 0x0b, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x47, 0x72, 0x6f, "_PriceFromB\b\n" +
0x75, 0x70, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x0b, 0x54, 0x61, 0x72, 0x67, "\x06_Group\"e\n" +
0x65, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x88, 0x01, 0x01, 0x12, 0x1f, 0x0a, 0x08, 0x4f, 0x76, "\rProductTarget\x12\x0e\n" +
0x65, 0x72, 0x68, 0x65, 0x6c, 0x6d, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x48, 0x02, 0x52, 0x08, "\x02ID\x18\x01 \x01(\tR\x02ID\x12\x16\n" +
0x4f, 0x76, 0x65, 0x72, 0x68, 0x65, 0x6c, 0x6d, 0x88, 0x01, 0x01, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, "\x06Factor\x18\x02 \x01(\x01R\x06Factor\x12\x1f\n" +
0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, "\bOverhelm\x18\x03 \x01(\bH\x00R\bOverhelm\x88\x01\x01B\v\n" +
0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x42, 0x0b, 0x0a, 0x09, 0x5f, "\t_Overhelm\"m\n" +
0x4f, 0x76, 0x65, 0x72, 0x68, 0x65, 0x6c, 0x6d, 0x22, 0xa8, 0x04, 0x0a, 0x11, 0x44, 0x69, 0x73, "\x0fPeriodCondition\x12.\n" +
0x63, 0x6f, 0x75, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x36, "\x04From\x18\x01 \x01(\v2\x1a.google.protobuf.TimestampR\x04From\x12*\n" +
0x0a, 0x06, 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, "\x02To\x18\x02 \x01(\v2\x1a.google.protobuf.TimestampR\x02To\"\x91\x01\n" +
0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x2e, 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, "\x0fUserInformation\x12\x0e\n" +
0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x06, 0x50, 0x65, 0x72, "\x02ID\x18\x01 \x01(\tR\x02ID\x12\x12\n" +
0x69, 0x6f, 0x64, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x55, 0x73, 0x65, 0x72, 0x18, 0x02, "\x04Type\x18\x02 \x01(\tR\x04Type\x12(\n" +
0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x04, 0x55, 0x73, 0x65, 0x72, 0x88, 0x01, 0x01, 0x12, "\x0fPurchasesAmount\x18\x03 \x01(\x04R\x0fPurchasesAmount\x120\n" +
0x1f, 0x0a, 0x08, 0x55, 0x73, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, "\x13CartPurchasesAmount\x18\x04 \x01(\x04R\x13CartPurchasesAmount\"\xa6\x01\n" +
0x09, 0x48, 0x02, 0x52, 0x08, 0x55, 0x73, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x88, 0x01, 0x01, "\x12ProductInformation\x12\x0e\n" +
0x12, 0x1b, 0x0a, 0x06, 0x43, 0x6f, 0x75, 0x70, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, "\x02ID\x18\x01 \x01(\tR\x02ID\x12\x14\n" +
0x48, 0x03, 0x52, 0x06, 0x43, 0x6f, 0x75, 0x70, 0x6f, 0x6e, 0x88, 0x01, 0x01, 0x12, 0x2d, 0x0a, "\x05Price\x18\x02 \x01(\x04R\x05Price\x12\x17\n" +
0x0f, 0x50, 0x75, 0x72, 0x63, 0x68, 0x61, 0x73, 0x65, 0x73, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, "\x04Term\x18\x03 \x01(\x04H\x00R\x04Term\x88\x01\x01\x12\x19\n" +
0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x48, 0x04, 0x52, 0x0f, 0x50, 0x75, 0x72, 0x63, 0x68, 0x61, "\x05Usage\x18\x04 \x01(\x04H\x01R\x05Usage\x88\x01\x01\x12\x19\n" +
0x73, 0x65, 0x73, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x12, 0x35, 0x0a, 0x13, "\x05Group\x18\x05 \x01(\tH\x02R\x05Group\x88\x01\x01B\a\n" +
0x43, 0x61, 0x72, 0x74, 0x50, 0x75, 0x72, 0x63, 0x68, 0x61, 0x73, 0x65, 0x73, 0x41, 0x6d, 0x6f, "\x05_TermB\b\n" +
0x75, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x04, 0x48, 0x05, 0x52, 0x13, 0x43, 0x61, 0x72, "\x06_UsageB\b\n" +
0x74, 0x50, 0x75, 0x72, 0x63, 0x68, 0x61, 0x73, 0x65, 0x73, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, "\x06_Group*+\n" +
0x88, 0x01, 0x01, 0x12, 0x1d, 0x0a, 0x07, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x18, 0x07, "\vTargetScope\x12\a\n" +
0x20, 0x01, 0x28, 0x09, 0x48, 0x06, 0x52, 0x07, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x88, "\x03Sum\x10\x00\x12\t\n" +
0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x54, 0x65, 0x72, 0x6d, 0x18, 0x08, 0x20, 0x01, 0x28, 0x04, "\x05Group\x10\x01\x12\b\n" +
0x48, 0x07, 0x52, 0x04, 0x54, 0x65, 0x72, 0x6d, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x55, "\x04Each\x10\x02B\fZ\n" +
0x73, 0x61, 0x67, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x04, 0x48, 0x08, 0x52, 0x05, 0x55, 0x73, "./discountb\x06proto3"
0x61, 0x67, 0x65, 0x88, 0x01, 0x01, 0x12, 0x21, 0x0a, 0x09, 0x50, 0x72, 0x69, 0x63, 0x65, 0x46,
0x72, 0x6f, 0x6d, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x04, 0x48, 0x09, 0x52, 0x09, 0x50, 0x72, 0x69,
0x63, 0x65, 0x46, 0x72, 0x6f, 0x6d, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x47, 0x72, 0x6f,
0x75, 0x70, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x48, 0x0a, 0x52, 0x05, 0x47, 0x72, 0x6f, 0x75,
0x70, 0x88, 0x01, 0x01, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x42,
0x07, 0x0a, 0x05, 0x5f, 0x55, 0x73, 0x65, 0x72, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x55, 0x73, 0x65,
0x72, 0x54, 0x79, 0x70, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x43, 0x6f, 0x75, 0x70, 0x6f, 0x6e,
0x42, 0x12, 0x0a, 0x10, 0x5f, 0x50, 0x75, 0x72, 0x63, 0x68, 0x61, 0x73, 0x65, 0x73, 0x41, 0x6d,
0x6f, 0x75, 0x6e, 0x74, 0x42, 0x16, 0x0a, 0x14, 0x5f, 0x43, 0x61, 0x72, 0x74, 0x50, 0x75, 0x72,
0x63, 0x68, 0x61, 0x73, 0x65, 0x73, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x0a, 0x0a, 0x08,
0x5f, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x54, 0x65, 0x72,
0x6d, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x55, 0x73, 0x61, 0x67, 0x65, 0x42, 0x0c, 0x0a, 0x0a, 0x5f,
0x50, 0x72, 0x69, 0x63, 0x65, 0x46, 0x72, 0x6f, 0x6d, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x47, 0x72,
0x6f, 0x75, 0x70, 0x22, 0x65, 0x0a, 0x0d, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x54, 0x61,
0x72, 0x67, 0x65, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
0x52, 0x02, 0x49, 0x44, 0x12, 0x16, 0x0a, 0x06, 0x46, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x18, 0x02,
0x20, 0x01, 0x28, 0x01, 0x52, 0x06, 0x46, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x12, 0x1f, 0x0a, 0x08,
0x4f, 0x76, 0x65, 0x72, 0x68, 0x65, 0x6c, 0x6d, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00,
0x52, 0x08, 0x4f, 0x76, 0x65, 0x72, 0x68, 0x65, 0x6c, 0x6d, 0x88, 0x01, 0x01, 0x42, 0x0b, 0x0a,
0x09, 0x5f, 0x4f, 0x76, 0x65, 0x72, 0x68, 0x65, 0x6c, 0x6d, 0x22, 0x6d, 0x0a, 0x0f, 0x50, 0x65,
0x72, 0x69, 0x6f, 0x64, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2e, 0x0a,
0x04, 0x46, 0x72, 0x6f, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f,
0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69,
0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x04, 0x46, 0x72, 0x6f, 0x6d, 0x12, 0x2a, 0x0a,
0x02, 0x54, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67,
0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65,
0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x02, 0x54, 0x6f, 0x22, 0x91, 0x01, 0x0a, 0x0f, 0x55, 0x73,
0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x0e, 0x0a,
0x02, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x49, 0x44, 0x12, 0x12, 0x0a,
0x04, 0x54, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x54, 0x79, 0x70,
0x65, 0x12, 0x28, 0x0a, 0x0f, 0x50, 0x75, 0x72, 0x63, 0x68, 0x61, 0x73, 0x65, 0x73, 0x41, 0x6d,
0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0f, 0x50, 0x75, 0x72, 0x63,
0x68, 0x61, 0x73, 0x65, 0x73, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x30, 0x0a, 0x13, 0x43,
0x61, 0x72, 0x74, 0x50, 0x75, 0x72, 0x63, 0x68, 0x61, 0x73, 0x65, 0x73, 0x41, 0x6d, 0x6f, 0x75,
0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x13, 0x43, 0x61, 0x72, 0x74, 0x50, 0x75,
0x72, 0x63, 0x68, 0x61, 0x73, 0x65, 0x73, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0xa6, 0x01,
0x0a, 0x12, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61,
0x74, 0x69, 0x6f, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
0x52, 0x02, 0x49, 0x44, 0x12, 0x14, 0x0a, 0x05, 0x50, 0x72, 0x69, 0x63, 0x65, 0x18, 0x02, 0x20,
0x01, 0x28, 0x04, 0x52, 0x05, 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, 0x17, 0x0a, 0x04, 0x54, 0x65,
0x72, 0x6d, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x48, 0x00, 0x52, 0x04, 0x54, 0x65, 0x72, 0x6d,
0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x55, 0x73, 0x61, 0x67, 0x65, 0x18, 0x04, 0x20, 0x01,
0x28, 0x04, 0x48, 0x01, 0x52, 0x05, 0x55, 0x73, 0x61, 0x67, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19,
0x0a, 0x05, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x48, 0x02, 0x52,
0x05, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x54, 0x65,
0x72, 0x6d, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x55, 0x73, 0x61, 0x67, 0x65, 0x42, 0x08, 0x0a, 0x06,
0x5f, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x2a, 0x2b, 0x0a, 0x0b, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74,
0x53, 0x63, 0x6f, 0x70, 0x65, 0x12, 0x07, 0x0a, 0x03, 0x53, 0x75, 0x6d, 0x10, 0x00, 0x12, 0x09,
0x0a, 0x05, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x45, 0x61, 0x63,
0x68, 0x10, 0x02, 0x42, 0x0c, 0x5a, 0x0a, 0x2e, 0x2f, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x75, 0x6e,
0x74, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var ( var (
file_discount_discount_model_proto_rawDescOnce sync.Once file_discount_discount_model_proto_rawDescOnce sync.Once
file_discount_discount_model_proto_rawDescData = file_discount_discount_model_proto_rawDesc file_discount_discount_model_proto_rawDescData []byte
) )
func file_discount_discount_model_proto_rawDescGZIP() []byte { func file_discount_discount_model_proto_rawDescGZIP() []byte {
file_discount_discount_model_proto_rawDescOnce.Do(func() { file_discount_discount_model_proto_rawDescOnce.Do(func() {
file_discount_discount_model_proto_rawDescData = protoimpl.X.CompressGZIP(file_discount_discount_model_proto_rawDescData) file_discount_discount_model_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_discount_discount_model_proto_rawDesc), len(file_discount_discount_model_proto_rawDesc)))
}) })
return file_discount_discount_model_proto_rawDescData return file_discount_discount_model_proto_rawDescData
} }
var file_discount_discount_model_proto_enumTypes = make([]protoimpl.EnumInfo, 1) var file_discount_discount_model_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
var file_discount_discount_model_proto_msgTypes = make([]protoimpl.MessageInfo, 9) var file_discount_discount_model_proto_msgTypes = make([]protoimpl.MessageInfo, 9)
var file_discount_discount_model_proto_goTypes = []interface{}{ var file_discount_discount_model_proto_goTypes = []any{
(TargetScope)(0), // 0: discount.TargetScope (TargetScope)(0), // 0: discount.TargetScope
(*DiscountOptional)(nil), // 1: discount.DiscountOptional (*DiscountOptional)(nil), // 1: discount.DiscountOptional
(*Discounts)(nil), // 2: discount.Discounts (*Discounts)(nil), // 2: discount.Discounts
@ -995,126 +917,16 @@ func file_discount_discount_model_proto_init() {
return return
} }
file_discount_audit_model_proto_init() file_discount_audit_model_proto_init()
if !protoimpl.UnsafeEnabled { file_discount_discount_model_proto_msgTypes[0].OneofWrappers = []any{}
file_discount_discount_model_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { file_discount_discount_model_proto_msgTypes[3].OneofWrappers = []any{}
switch v := v.(*DiscountOptional); i { file_discount_discount_model_proto_msgTypes[4].OneofWrappers = []any{}
case 0: file_discount_discount_model_proto_msgTypes[5].OneofWrappers = []any{}
return &v.state file_discount_discount_model_proto_msgTypes[8].OneofWrappers = []any{}
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_discount_discount_model_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Discounts); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_discount_discount_model_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Discount); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_discount_discount_model_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*DiscountCalculationTarget); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_discount_discount_model_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*DiscountCondition); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_discount_discount_model_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ProductTarget); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_discount_discount_model_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*PeriodCondition); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_discount_discount_model_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*UserInformation); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_discount_discount_model_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ProductInformation); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
file_discount_discount_model_proto_msgTypes[0].OneofWrappers = []interface{}{}
file_discount_discount_model_proto_msgTypes[3].OneofWrappers = []interface{}{}
file_discount_discount_model_proto_msgTypes[4].OneofWrappers = []interface{}{}
file_discount_discount_model_proto_msgTypes[5].OneofWrappers = []interface{}{}
file_discount_discount_model_proto_msgTypes[8].OneofWrappers = []interface{}{}
type x struct{} type x struct{}
out := protoimpl.TypeBuilder{ out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{ File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(), GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_discount_discount_model_proto_rawDesc, RawDescriptor: unsafe.Slice(unsafe.StringData(file_discount_discount_model_proto_rawDesc), len(file_discount_discount_model_proto_rawDesc)),
NumEnums: 1, NumEnums: 1,
NumMessages: 9, NumMessages: 9,
NumExtensions: 0, NumExtensions: 0,
@ -1126,7 +938,6 @@ func file_discount_discount_model_proto_init() {
MessageInfos: file_discount_discount_model_proto_msgTypes, MessageInfos: file_discount_discount_model_proto_msgTypes,
}.Build() }.Build()
File_discount_discount_model_proto = out.File File_discount_discount_model_proto = out.File
file_discount_discount_model_proto_rawDesc = nil
file_discount_discount_model_proto_goTypes = nil file_discount_discount_model_proto_goTypes = nil
file_discount_discount_model_proto_depIdxs = nil file_discount_discount_model_proto_depIdxs = nil
} }

@ -0,0 +1,386 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.36.7
// protoc (unknown)
// source: discount/discount.proto
package discount
import (
_ "google.golang.org/genproto/googleapis/api/annotations"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
emptypb "google.golang.org/protobuf/types/known/emptypb"
timestamppb "google.golang.org/protobuf/types/known/timestamppb"
reflect "reflect"
sync "sync"
unsafe "unsafe"
)
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 GetDiscountByIDRequest struct {
state protoimpl.MessageState `protogen:"open.v1"`
ID string `protobuf:"bytes,1,opt,name=ID,proto3" json:"ID,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *GetDiscountByIDRequest) Reset() {
*x = GetDiscountByIDRequest{}
mi := &file_discount_discount_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *GetDiscountByIDRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetDiscountByIDRequest) ProtoMessage() {}
func (x *GetDiscountByIDRequest) ProtoReflect() protoreflect.Message {
mi := &file_discount_discount_proto_msgTypes[0]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GetDiscountByIDRequest.ProtoReflect.Descriptor instead.
func (*GetDiscountByIDRequest) Descriptor() ([]byte, []int) {
return file_discount_discount_proto_rawDescGZIP(), []int{0}
}
func (x *GetDiscountByIDRequest) GetID() string {
if x != nil {
return x.ID
}
return ""
}
type ApplyDiscountRequest struct {
state protoimpl.MessageState `protogen:"open.v1"`
UserInformation *UserInformation `protobuf:"bytes,1,opt,name=UserInformation,proto3" json:"UserInformation,omitempty"`
Products []*ProductInformation `protobuf:"bytes,2,rep,name=Products,proto3" json:"Products,omitempty"`
Date *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=Date,proto3" json:"Date,omitempty"`
Coupon *string `protobuf:"bytes,4,opt,name=Coupon,proto3,oneof" json:"Coupon,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *ApplyDiscountRequest) Reset() {
*x = ApplyDiscountRequest{}
mi := &file_discount_discount_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *ApplyDiscountRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ApplyDiscountRequest) ProtoMessage() {}
func (x *ApplyDiscountRequest) ProtoReflect() protoreflect.Message {
mi := &file_discount_discount_proto_msgTypes[1]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ApplyDiscountRequest.ProtoReflect.Descriptor instead.
func (*ApplyDiscountRequest) Descriptor() ([]byte, []int) {
return file_discount_discount_proto_rawDescGZIP(), []int{1}
}
func (x *ApplyDiscountRequest) GetUserInformation() *UserInformation {
if x != nil {
return x.UserInformation
}
return nil
}
func (x *ApplyDiscountRequest) GetProducts() []*ProductInformation {
if x != nil {
return x.Products
}
return nil
}
func (x *ApplyDiscountRequest) GetDate() *timestamppb.Timestamp {
if x != nil {
return x.Date
}
return nil
}
func (x *ApplyDiscountRequest) GetCoupon() string {
if x != nil && x.Coupon != nil {
return *x.Coupon
}
return ""
}
type ApplyDiscountResponse struct {
state protoimpl.MessageState `protogen:"open.v1"`
Price uint64 `protobuf:"varint,1,opt,name=Price,proto3" json:"Price,omitempty"`
AppliedDiscounts []*Discount `protobuf:"bytes,2,rep,name=AppliedDiscounts,proto3" json:"AppliedDiscounts,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *ApplyDiscountResponse) Reset() {
*x = ApplyDiscountResponse{}
mi := &file_discount_discount_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *ApplyDiscountResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ApplyDiscountResponse) ProtoMessage() {}
func (x *ApplyDiscountResponse) ProtoReflect() protoreflect.Message {
mi := &file_discount_discount_proto_msgTypes[2]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ApplyDiscountResponse.ProtoReflect.Descriptor instead.
func (*ApplyDiscountResponse) Descriptor() ([]byte, []int) {
return file_discount_discount_proto_rawDescGZIP(), []int{2}
}
func (x *ApplyDiscountResponse) GetPrice() uint64 {
if x != nil {
return x.Price
}
return 0
}
func (x *ApplyDiscountResponse) GetAppliedDiscounts() []*Discount {
if x != nil {
return x.AppliedDiscounts
}
return nil
}
type CreateDiscountRequest struct {
state protoimpl.MessageState `protogen:"open.v1"`
Name string `protobuf:"bytes,1,opt,name=Name,proto3" json:"Name,omitempty"`
Layer uint32 `protobuf:"varint,2,opt,name=Layer,proto3" json:"Layer,omitempty"`
Description string `protobuf:"bytes,3,opt,name=Description,proto3" json:"Description,omitempty"`
Condition *DiscountCondition `protobuf:"bytes,4,opt,name=Condition,proto3" json:"Condition,omitempty"`
Target *DiscountCalculationTarget `protobuf:"bytes,5,opt,name=Target,proto3" json:"Target,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *CreateDiscountRequest) Reset() {
*x = CreateDiscountRequest{}
mi := &file_discount_discount_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *CreateDiscountRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CreateDiscountRequest) ProtoMessage() {}
func (x *CreateDiscountRequest) ProtoReflect() protoreflect.Message {
mi := &file_discount_discount_proto_msgTypes[3]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use CreateDiscountRequest.ProtoReflect.Descriptor instead.
func (*CreateDiscountRequest) Descriptor() ([]byte, []int) {
return file_discount_discount_proto_rawDescGZIP(), []int{3}
}
func (x *CreateDiscountRequest) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *CreateDiscountRequest) GetLayer() uint32 {
if x != nil {
return x.Layer
}
return 0
}
func (x *CreateDiscountRequest) GetDescription() string {
if x != nil {
return x.Description
}
return ""
}
func (x *CreateDiscountRequest) GetCondition() *DiscountCondition {
if x != nil {
return x.Condition
}
return nil
}
func (x *CreateDiscountRequest) GetTarget() *DiscountCalculationTarget {
if x != nil {
return x.Target
}
return nil
}
var File_discount_discount_proto protoreflect.FileDescriptor
const file_discount_discount_proto_rawDesc = "" +
"\n" +
"\x17discount/discount.proto\x12\bdiscount\x1a\x1cgoogle/api/annotations.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a\x1ddiscount/discount.model.proto\"(\n" +
"\x16GetDiscountByIDRequest\x12\x0e\n" +
"\x02ID\x18\x01 \x01(\tR\x02ID\"\xed\x01\n" +
"\x14ApplyDiscountRequest\x12C\n" +
"\x0fUserInformation\x18\x01 \x01(\v2\x19.discount.UserInformationR\x0fUserInformation\x128\n" +
"\bProducts\x18\x02 \x03(\v2\x1c.discount.ProductInformationR\bProducts\x12.\n" +
"\x04Date\x18\x03 \x01(\v2\x1a.google.protobuf.TimestampR\x04Date\x12\x1b\n" +
"\x06Coupon\x18\x04 \x01(\tH\x00R\x06Coupon\x88\x01\x01B\t\n" +
"\a_Coupon\"m\n" +
"\x15ApplyDiscountResponse\x12\x14\n" +
"\x05Price\x18\x01 \x01(\x04R\x05Price\x12>\n" +
"\x10AppliedDiscounts\x18\x02 \x03(\v2\x12.discount.DiscountR\x10AppliedDiscounts\"\xdb\x01\n" +
"\x15CreateDiscountRequest\x12\x12\n" +
"\x04Name\x18\x01 \x01(\tR\x04Name\x12\x14\n" +
"\x05Layer\x18\x02 \x01(\rR\x05Layer\x12 \n" +
"\vDescription\x18\x03 \x01(\tR\vDescription\x129\n" +
"\tCondition\x18\x04 \x01(\v2\x1b.discount.DiscountConditionR\tCondition\x12;\n" +
"\x06Target\x18\x05 \x01(\v2#.discount.DiscountCalculationTargetR\x06Target2\x80\a\n" +
"\x0fDiscountService\x12R\n" +
"\x0fGetAllDiscounts\x12\x16.google.protobuf.Empty\x1a\x13.discount.Discounts\"\x12\x82\xd3\xe4\x93\x02\f\x12\n" +
"/discounts\x12f\n" +
"\x10GetUserDiscounts\x12 .discount.GetDiscountByIDRequest\x1a\x13.discount.Discounts\"\x1b\x82\xd3\xe4\x93\x02\x15\x12\x13/discount/user/{ID}\x12i\n" +
"\x12DetermineDiscounts\x12\x1e.discount.ApplyDiscountRequest\x1a\x13.discount.Discounts\"\x1e\x82\xd3\xe4\x93\x02\x18:\x01*\"\x13/discount/determine\x12m\n" +
"\x0eApplyDiscounts\x12\x1e.discount.ApplyDiscountRequest\x1a\x1f.discount.ApplyDiscountResponse\"\x1a\x82\xd3\xe4\x93\x02\x14:\x01*\"\x0f/discount/apply\x12_\n" +
"\x0fGetDiscountByID\x12 .discount.GetDiscountByIDRequest\x1a\x12.discount.Discount\"\x16\x82\xd3\xe4\x93\x02\x10\x12\x0e/discount/{ID}\x12[\n" +
"\x0eCreateDiscount\x12\x1f.discount.CreateDiscountRequest\x1a\x12.discount.Discount\"\x14\x82\xd3\xe4\x93\x02\x0e:\x01*\"\t/discount\x12\\\n" +
"\x0fReplaceDiscount\x12\x1a.discount.DiscountOptional\x1a\x12.discount.Discount\"\x19\x82\xd3\xe4\x93\x02\x13:\x01*\x1a\x0e/discount/{ID}\x12[\n" +
"\x0eUpdateDiscount\x12\x1a.discount.DiscountOptional\x1a\x12.discount.Discount\"\x19\x82\xd3\xe4\x93\x02\x13:\x01*2\x0e/discount/{ID}\x12^\n" +
"\x0eDeleteDiscount\x12 .discount.GetDiscountByIDRequest\x1a\x12.discount.Discount\"\x16\x82\xd3\xe4\x93\x02\x10*\x0e/discount/{ID}B\fZ\n" +
"./discountb\x06proto3"
var (
file_discount_discount_proto_rawDescOnce sync.Once
file_discount_discount_proto_rawDescData []byte
)
func file_discount_discount_proto_rawDescGZIP() []byte {
file_discount_discount_proto_rawDescOnce.Do(func() {
file_discount_discount_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_discount_discount_proto_rawDesc), len(file_discount_discount_proto_rawDesc)))
})
return file_discount_discount_proto_rawDescData
}
var file_discount_discount_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
var file_discount_discount_proto_goTypes = []any{
(*GetDiscountByIDRequest)(nil), // 0: discount.GetDiscountByIDRequest
(*ApplyDiscountRequest)(nil), // 1: discount.ApplyDiscountRequest
(*ApplyDiscountResponse)(nil), // 2: discount.ApplyDiscountResponse
(*CreateDiscountRequest)(nil), // 3: discount.CreateDiscountRequest
(*UserInformation)(nil), // 4: discount.UserInformation
(*ProductInformation)(nil), // 5: discount.ProductInformation
(*timestamppb.Timestamp)(nil), // 6: google.protobuf.Timestamp
(*Discount)(nil), // 7: discount.Discount
(*DiscountCondition)(nil), // 8: discount.DiscountCondition
(*DiscountCalculationTarget)(nil), // 9: discount.DiscountCalculationTarget
(*emptypb.Empty)(nil), // 10: google.protobuf.Empty
(*DiscountOptional)(nil), // 11: discount.DiscountOptional
(*Discounts)(nil), // 12: discount.Discounts
}
var file_discount_discount_proto_depIdxs = []int32{
4, // 0: discount.ApplyDiscountRequest.UserInformation:type_name -> discount.UserInformation
5, // 1: discount.ApplyDiscountRequest.Products:type_name -> discount.ProductInformation
6, // 2: discount.ApplyDiscountRequest.Date:type_name -> google.protobuf.Timestamp
7, // 3: discount.ApplyDiscountResponse.AppliedDiscounts:type_name -> discount.Discount
8, // 4: discount.CreateDiscountRequest.Condition:type_name -> discount.DiscountCondition
9, // 5: discount.CreateDiscountRequest.Target:type_name -> discount.DiscountCalculationTarget
10, // 6: discount.DiscountService.GetAllDiscounts:input_type -> google.protobuf.Empty
0, // 7: discount.DiscountService.GetUserDiscounts:input_type -> discount.GetDiscountByIDRequest
1, // 8: discount.DiscountService.DetermineDiscounts:input_type -> discount.ApplyDiscountRequest
1, // 9: discount.DiscountService.ApplyDiscounts:input_type -> discount.ApplyDiscountRequest
0, // 10: discount.DiscountService.GetDiscountByID:input_type -> discount.GetDiscountByIDRequest
3, // 11: discount.DiscountService.CreateDiscount:input_type -> discount.CreateDiscountRequest
11, // 12: discount.DiscountService.ReplaceDiscount:input_type -> discount.DiscountOptional
11, // 13: discount.DiscountService.UpdateDiscount:input_type -> discount.DiscountOptional
0, // 14: discount.DiscountService.DeleteDiscount:input_type -> discount.GetDiscountByIDRequest
12, // 15: discount.DiscountService.GetAllDiscounts:output_type -> discount.Discounts
12, // 16: discount.DiscountService.GetUserDiscounts:output_type -> discount.Discounts
12, // 17: discount.DiscountService.DetermineDiscounts:output_type -> discount.Discounts
2, // 18: discount.DiscountService.ApplyDiscounts:output_type -> discount.ApplyDiscountResponse
7, // 19: discount.DiscountService.GetDiscountByID:output_type -> discount.Discount
7, // 20: discount.DiscountService.CreateDiscount:output_type -> discount.Discount
7, // 21: discount.DiscountService.ReplaceDiscount:output_type -> discount.Discount
7, // 22: discount.DiscountService.UpdateDiscount:output_type -> discount.Discount
7, // 23: discount.DiscountService.DeleteDiscount:output_type -> discount.Discount
15, // [15:24] is the sub-list for method output_type
6, // [6:15] is the sub-list for method input_type
6, // [6:6] is the sub-list for extension type_name
6, // [6:6] is the sub-list for extension extendee
0, // [0:6] is the sub-list for field type_name
}
func init() { file_discount_discount_proto_init() }
func file_discount_discount_proto_init() {
if File_discount_discount_proto != nil {
return
}
file_discount_discount_model_proto_init()
file_discount_discount_proto_msgTypes[1].OneofWrappers = []any{}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: unsafe.Slice(unsafe.StringData(file_discount_discount_proto_rawDesc), len(file_discount_discount_proto_rawDesc)),
NumEnums: 0,
NumMessages: 4,
NumExtensions: 0,
NumServices: 1,
},
GoTypes: file_discount_discount_proto_goTypes,
DependencyIndexes: file_discount_discount_proto_depIdxs,
MessageInfos: file_discount_discount_proto_msgTypes,
}.Build()
File_discount_discount_proto = out.File
file_discount_discount_proto_goTypes = nil
file_discount_discount_proto_depIdxs = nil
}

@ -1,8 +1,8 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT. // Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions: // versions:
// - protoc-gen-go-grpc v1.3.0 // - protoc-gen-go-grpc v1.5.1
// - protoc (unknown) // - protoc (unknown)
// source: discount/service.proto // source: discount/discount.proto
package discount package discount
@ -16,8 +16,8 @@ import (
// This is a compile-time assertion to ensure that this generated file // This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against. // is compatible with the grpc package it is being compiled against.
// Requires gRPC-Go v1.32.0 or later. // Requires gRPC-Go v1.64.0 or later.
const _ = grpc.SupportPackageIsVersion7 const _ = grpc.SupportPackageIsVersion9
const ( const (
DiscountService_GetAllDiscounts_FullMethodName = "/discount.DiscountService/GetAllDiscounts" DiscountService_GetAllDiscounts_FullMethodName = "/discount.DiscountService/GetAllDiscounts"
@ -55,8 +55,9 @@ func NewDiscountServiceClient(cc grpc.ClientConnInterface) DiscountServiceClient
} }
func (c *discountServiceClient) GetAllDiscounts(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*Discounts, error) { func (c *discountServiceClient) GetAllDiscounts(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*Discounts, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(Discounts) out := new(Discounts)
err := c.cc.Invoke(ctx, DiscountService_GetAllDiscounts_FullMethodName, in, out, opts...) err := c.cc.Invoke(ctx, DiscountService_GetAllDiscounts_FullMethodName, in, out, cOpts...)
if err != nil { if err != nil {
return nil, err return nil, err
} }
@ -64,8 +65,9 @@ func (c *discountServiceClient) GetAllDiscounts(ctx context.Context, in *emptypb
} }
func (c *discountServiceClient) GetUserDiscounts(ctx context.Context, in *GetDiscountByIDRequest, opts ...grpc.CallOption) (*Discounts, error) { func (c *discountServiceClient) GetUserDiscounts(ctx context.Context, in *GetDiscountByIDRequest, opts ...grpc.CallOption) (*Discounts, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(Discounts) out := new(Discounts)
err := c.cc.Invoke(ctx, DiscountService_GetUserDiscounts_FullMethodName, in, out, opts...) err := c.cc.Invoke(ctx, DiscountService_GetUserDiscounts_FullMethodName, in, out, cOpts...)
if err != nil { if err != nil {
return nil, err return nil, err
} }
@ -73,8 +75,9 @@ func (c *discountServiceClient) GetUserDiscounts(ctx context.Context, in *GetDis
} }
func (c *discountServiceClient) DetermineDiscounts(ctx context.Context, in *ApplyDiscountRequest, opts ...grpc.CallOption) (*Discounts, error) { func (c *discountServiceClient) DetermineDiscounts(ctx context.Context, in *ApplyDiscountRequest, opts ...grpc.CallOption) (*Discounts, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(Discounts) out := new(Discounts)
err := c.cc.Invoke(ctx, DiscountService_DetermineDiscounts_FullMethodName, in, out, opts...) err := c.cc.Invoke(ctx, DiscountService_DetermineDiscounts_FullMethodName, in, out, cOpts...)
if err != nil { if err != nil {
return nil, err return nil, err
} }
@ -82,8 +85,9 @@ func (c *discountServiceClient) DetermineDiscounts(ctx context.Context, in *Appl
} }
func (c *discountServiceClient) ApplyDiscounts(ctx context.Context, in *ApplyDiscountRequest, opts ...grpc.CallOption) (*ApplyDiscountResponse, error) { func (c *discountServiceClient) ApplyDiscounts(ctx context.Context, in *ApplyDiscountRequest, opts ...grpc.CallOption) (*ApplyDiscountResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(ApplyDiscountResponse) out := new(ApplyDiscountResponse)
err := c.cc.Invoke(ctx, DiscountService_ApplyDiscounts_FullMethodName, in, out, opts...) err := c.cc.Invoke(ctx, DiscountService_ApplyDiscounts_FullMethodName, in, out, cOpts...)
if err != nil { if err != nil {
return nil, err return nil, err
} }
@ -91,8 +95,9 @@ func (c *discountServiceClient) ApplyDiscounts(ctx context.Context, in *ApplyDis
} }
func (c *discountServiceClient) GetDiscountByID(ctx context.Context, in *GetDiscountByIDRequest, opts ...grpc.CallOption) (*Discount, error) { func (c *discountServiceClient) GetDiscountByID(ctx context.Context, in *GetDiscountByIDRequest, opts ...grpc.CallOption) (*Discount, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(Discount) out := new(Discount)
err := c.cc.Invoke(ctx, DiscountService_GetDiscountByID_FullMethodName, in, out, opts...) err := c.cc.Invoke(ctx, DiscountService_GetDiscountByID_FullMethodName, in, out, cOpts...)
if err != nil { if err != nil {
return nil, err return nil, err
} }
@ -100,8 +105,9 @@ func (c *discountServiceClient) GetDiscountByID(ctx context.Context, in *GetDisc
} }
func (c *discountServiceClient) CreateDiscount(ctx context.Context, in *CreateDiscountRequest, opts ...grpc.CallOption) (*Discount, error) { func (c *discountServiceClient) CreateDiscount(ctx context.Context, in *CreateDiscountRequest, opts ...grpc.CallOption) (*Discount, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(Discount) out := new(Discount)
err := c.cc.Invoke(ctx, DiscountService_CreateDiscount_FullMethodName, in, out, opts...) err := c.cc.Invoke(ctx, DiscountService_CreateDiscount_FullMethodName, in, out, cOpts...)
if err != nil { if err != nil {
return nil, err return nil, err
} }
@ -109,8 +115,9 @@ func (c *discountServiceClient) CreateDiscount(ctx context.Context, in *CreateDi
} }
func (c *discountServiceClient) ReplaceDiscount(ctx context.Context, in *DiscountOptional, opts ...grpc.CallOption) (*Discount, error) { func (c *discountServiceClient) ReplaceDiscount(ctx context.Context, in *DiscountOptional, opts ...grpc.CallOption) (*Discount, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(Discount) out := new(Discount)
err := c.cc.Invoke(ctx, DiscountService_ReplaceDiscount_FullMethodName, in, out, opts...) err := c.cc.Invoke(ctx, DiscountService_ReplaceDiscount_FullMethodName, in, out, cOpts...)
if err != nil { if err != nil {
return nil, err return nil, err
} }
@ -118,8 +125,9 @@ func (c *discountServiceClient) ReplaceDiscount(ctx context.Context, in *Discoun
} }
func (c *discountServiceClient) UpdateDiscount(ctx context.Context, in *DiscountOptional, opts ...grpc.CallOption) (*Discount, error) { func (c *discountServiceClient) UpdateDiscount(ctx context.Context, in *DiscountOptional, opts ...grpc.CallOption) (*Discount, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(Discount) out := new(Discount)
err := c.cc.Invoke(ctx, DiscountService_UpdateDiscount_FullMethodName, in, out, opts...) err := c.cc.Invoke(ctx, DiscountService_UpdateDiscount_FullMethodName, in, out, cOpts...)
if err != nil { if err != nil {
return nil, err return nil, err
} }
@ -127,8 +135,9 @@ func (c *discountServiceClient) UpdateDiscount(ctx context.Context, in *Discount
} }
func (c *discountServiceClient) DeleteDiscount(ctx context.Context, in *GetDiscountByIDRequest, opts ...grpc.CallOption) (*Discount, error) { func (c *discountServiceClient) DeleteDiscount(ctx context.Context, in *GetDiscountByIDRequest, opts ...grpc.CallOption) (*Discount, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(Discount) out := new(Discount)
err := c.cc.Invoke(ctx, DiscountService_DeleteDiscount_FullMethodName, in, out, opts...) err := c.cc.Invoke(ctx, DiscountService_DeleteDiscount_FullMethodName, in, out, cOpts...)
if err != nil { if err != nil {
return nil, err return nil, err
} }
@ -137,7 +146,7 @@ func (c *discountServiceClient) DeleteDiscount(ctx context.Context, in *GetDisco
// DiscountServiceServer is the server API for DiscountService service. // DiscountServiceServer is the server API for DiscountService service.
// All implementations should embed UnimplementedDiscountServiceServer // All implementations should embed UnimplementedDiscountServiceServer
// for forward compatibility // for forward compatibility.
type DiscountServiceServer interface { type DiscountServiceServer interface {
GetAllDiscounts(context.Context, *emptypb.Empty) (*Discounts, error) GetAllDiscounts(context.Context, *emptypb.Empty) (*Discounts, error)
GetUserDiscounts(context.Context, *GetDiscountByIDRequest) (*Discounts, error) GetUserDiscounts(context.Context, *GetDiscountByIDRequest) (*Discounts, error)
@ -150,9 +159,12 @@ type DiscountServiceServer interface {
DeleteDiscount(context.Context, *GetDiscountByIDRequest) (*Discount, error) DeleteDiscount(context.Context, *GetDiscountByIDRequest) (*Discount, error)
} }
// UnimplementedDiscountServiceServer should be embedded to have forward compatible implementations. // UnimplementedDiscountServiceServer should be embedded to have
type UnimplementedDiscountServiceServer struct { // forward compatible implementations.
} //
// NOTE: this should be embedded by value instead of pointer to avoid a nil
// pointer dereference when methods are called.
type UnimplementedDiscountServiceServer struct{}
func (UnimplementedDiscountServiceServer) GetAllDiscounts(context.Context, *emptypb.Empty) (*Discounts, error) { func (UnimplementedDiscountServiceServer) GetAllDiscounts(context.Context, *emptypb.Empty) (*Discounts, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetAllDiscounts not implemented") return nil, status.Errorf(codes.Unimplemented, "method GetAllDiscounts not implemented")
@ -181,6 +193,7 @@ func (UnimplementedDiscountServiceServer) UpdateDiscount(context.Context, *Disco
func (UnimplementedDiscountServiceServer) DeleteDiscount(context.Context, *GetDiscountByIDRequest) (*Discount, error) { func (UnimplementedDiscountServiceServer) DeleteDiscount(context.Context, *GetDiscountByIDRequest) (*Discount, error) {
return nil, status.Errorf(codes.Unimplemented, "method DeleteDiscount not implemented") return nil, status.Errorf(codes.Unimplemented, "method DeleteDiscount not implemented")
} }
func (UnimplementedDiscountServiceServer) testEmbeddedByValue() {}
// UnsafeDiscountServiceServer may be embedded to opt out of forward compatibility for this service. // UnsafeDiscountServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to DiscountServiceServer will // Use of this interface is not recommended, as added methods to DiscountServiceServer will
@ -190,6 +203,13 @@ type UnsafeDiscountServiceServer interface {
} }
func RegisterDiscountServiceServer(s grpc.ServiceRegistrar, srv DiscountServiceServer) { func RegisterDiscountServiceServer(s grpc.ServiceRegistrar, srv DiscountServiceServer) {
// If the following call pancis, it indicates UnimplementedDiscountServiceServer was
// embedded by pointer and is nil. This will cause panics if an
// unimplemented method is ever invoked, so we test this at initialization
// time to prevent it from happening at runtime later due to I/O.
if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
t.testEmbeddedByValue()
}
s.RegisterService(&DiscountService_ServiceDesc, srv) s.RegisterService(&DiscountService_ServiceDesc, srv)
} }
@ -400,5 +420,5 @@ var DiscountService_ServiceDesc = grpc.ServiceDesc{
}, },
}, },
Streams: []grpc.StreamDesc{}, Streams: []grpc.StreamDesc{},
Metadata: "discount/service.proto", Metadata: "discount/discount.proto",
} }

@ -1,524 +0,0 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.33.0
// protoc (unknown)
// source: discount/service.proto
package discount
import (
_ "google.golang.org/genproto/googleapis/api/annotations"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
emptypb "google.golang.org/protobuf/types/known/emptypb"
timestamppb "google.golang.org/protobuf/types/known/timestamppb"
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 GetDiscountByIDRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
ID string `protobuf:"bytes,1,opt,name=ID,proto3" json:"ID,omitempty"`
}
func (x *GetDiscountByIDRequest) Reset() {
*x = GetDiscountByIDRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_discount_service_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetDiscountByIDRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetDiscountByIDRequest) ProtoMessage() {}
func (x *GetDiscountByIDRequest) ProtoReflect() protoreflect.Message {
mi := &file_discount_service_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 GetDiscountByIDRequest.ProtoReflect.Descriptor instead.
func (*GetDiscountByIDRequest) Descriptor() ([]byte, []int) {
return file_discount_service_proto_rawDescGZIP(), []int{0}
}
func (x *GetDiscountByIDRequest) GetID() string {
if x != nil {
return x.ID
}
return ""
}
type ApplyDiscountRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
UserInformation *UserInformation `protobuf:"bytes,1,opt,name=UserInformation,proto3" json:"UserInformation,omitempty"`
Products []*ProductInformation `protobuf:"bytes,2,rep,name=Products,proto3" json:"Products,omitempty"`
Date *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=Date,proto3" json:"Date,omitempty"`
Coupon *string `protobuf:"bytes,4,opt,name=Coupon,proto3,oneof" json:"Coupon,omitempty"`
}
func (x *ApplyDiscountRequest) Reset() {
*x = ApplyDiscountRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_discount_service_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ApplyDiscountRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ApplyDiscountRequest) ProtoMessage() {}
func (x *ApplyDiscountRequest) ProtoReflect() protoreflect.Message {
mi := &file_discount_service_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 ApplyDiscountRequest.ProtoReflect.Descriptor instead.
func (*ApplyDiscountRequest) Descriptor() ([]byte, []int) {
return file_discount_service_proto_rawDescGZIP(), []int{1}
}
func (x *ApplyDiscountRequest) GetUserInformation() *UserInformation {
if x != nil {
return x.UserInformation
}
return nil
}
func (x *ApplyDiscountRequest) GetProducts() []*ProductInformation {
if x != nil {
return x.Products
}
return nil
}
func (x *ApplyDiscountRequest) GetDate() *timestamppb.Timestamp {
if x != nil {
return x.Date
}
return nil
}
func (x *ApplyDiscountRequest) GetCoupon() string {
if x != nil && x.Coupon != nil {
return *x.Coupon
}
return ""
}
type ApplyDiscountResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Price uint64 `protobuf:"varint,1,opt,name=Price,proto3" json:"Price,omitempty"`
AppliedDiscounts []*Discount `protobuf:"bytes,2,rep,name=AppliedDiscounts,proto3" json:"AppliedDiscounts,omitempty"`
}
func (x *ApplyDiscountResponse) Reset() {
*x = ApplyDiscountResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_discount_service_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ApplyDiscountResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ApplyDiscountResponse) ProtoMessage() {}
func (x *ApplyDiscountResponse) ProtoReflect() protoreflect.Message {
mi := &file_discount_service_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 ApplyDiscountResponse.ProtoReflect.Descriptor instead.
func (*ApplyDiscountResponse) Descriptor() ([]byte, []int) {
return file_discount_service_proto_rawDescGZIP(), []int{2}
}
func (x *ApplyDiscountResponse) GetPrice() uint64 {
if x != nil {
return x.Price
}
return 0
}
func (x *ApplyDiscountResponse) GetAppliedDiscounts() []*Discount {
if x != nil {
return x.AppliedDiscounts
}
return nil
}
type CreateDiscountRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Name string `protobuf:"bytes,1,opt,name=Name,proto3" json:"Name,omitempty"`
Layer uint32 `protobuf:"varint,2,opt,name=Layer,proto3" json:"Layer,omitempty"`
Description string `protobuf:"bytes,3,opt,name=Description,proto3" json:"Description,omitempty"`
Condition *DiscountCondition `protobuf:"bytes,4,opt,name=Condition,proto3" json:"Condition,omitempty"`
Target *DiscountCalculationTarget `protobuf:"bytes,5,opt,name=Target,proto3" json:"Target,omitempty"`
}
func (x *CreateDiscountRequest) Reset() {
*x = CreateDiscountRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_discount_service_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *CreateDiscountRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CreateDiscountRequest) ProtoMessage() {}
func (x *CreateDiscountRequest) ProtoReflect() protoreflect.Message {
mi := &file_discount_service_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 CreateDiscountRequest.ProtoReflect.Descriptor instead.
func (*CreateDiscountRequest) Descriptor() ([]byte, []int) {
return file_discount_service_proto_rawDescGZIP(), []int{3}
}
func (x *CreateDiscountRequest) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *CreateDiscountRequest) GetLayer() uint32 {
if x != nil {
return x.Layer
}
return 0
}
func (x *CreateDiscountRequest) GetDescription() string {
if x != nil {
return x.Description
}
return ""
}
func (x *CreateDiscountRequest) GetCondition() *DiscountCondition {
if x != nil {
return x.Condition
}
return nil
}
func (x *CreateDiscountRequest) GetTarget() *DiscountCalculationTarget {
if x != nil {
return x.Target
}
return nil
}
var File_discount_service_proto protoreflect.FileDescriptor
var file_discount_service_proto_rawDesc = []byte{
0x0a, 0x16, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69,
0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x08, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x75,
0x6e, 0x74, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61,
0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75,
0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x1a, 0x1b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62,
0x75, 0x66, 0x2f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d,
0x64, 0x69, 0x73, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x2f, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x75, 0x6e,
0x74, 0x2e, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x28, 0x0a,
0x16, 0x47, 0x65, 0x74, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x79, 0x49, 0x44,
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x49, 0x44, 0x18, 0x01, 0x20,
0x01, 0x28, 0x09, 0x52, 0x02, 0x49, 0x44, 0x22, 0xed, 0x01, 0x0a, 0x14, 0x41, 0x70, 0x70, 0x6c,
0x79, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
0x12, 0x43, 0x0a, 0x0f, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74,
0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x64, 0x69, 0x73, 0x63,
0x6f, 0x75, 0x6e, 0x74, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61,
0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0f, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x72, 0x6d,
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x38, 0x0a, 0x08, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74,
0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x75,
0x6e, 0x74, 0x2e, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x72, 0x6d,
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x08, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x73, 0x12,
0x2e, 0x0a, 0x04, 0x44, 0x61, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e,
0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e,
0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x04, 0x44, 0x61, 0x74, 0x65, 0x12,
0x1b, 0x0a, 0x06, 0x43, 0x6f, 0x75, 0x70, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x48,
0x00, 0x52, 0x06, 0x43, 0x6f, 0x75, 0x70, 0x6f, 0x6e, 0x88, 0x01, 0x01, 0x42, 0x09, 0x0a, 0x07,
0x5f, 0x43, 0x6f, 0x75, 0x70, 0x6f, 0x6e, 0x22, 0x6d, 0x0a, 0x15, 0x41, 0x70, 0x70, 0x6c, 0x79,
0x44, 0x69, 0x73, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
0x12, 0x14, 0x0a, 0x05, 0x50, 0x72, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52,
0x05, 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, 0x3e, 0x0a, 0x10, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x65,
0x64, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b,
0x32, 0x12, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x2e, 0x44, 0x69, 0x73, 0x63,
0x6f, 0x75, 0x6e, 0x74, 0x52, 0x10, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x65, 0x64, 0x44, 0x69, 0x73,
0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x22, 0xdb, 0x01, 0x0a, 0x15, 0x43, 0x72, 0x65, 0x61, 0x74,
0x65, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
0x12, 0x12, 0x0a, 0x04, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04,
0x4e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x4c, 0x61, 0x79, 0x65, 0x72, 0x18, 0x02, 0x20,
0x01, 0x28, 0x0d, 0x52, 0x05, 0x4c, 0x61, 0x79, 0x65, 0x72, 0x12, 0x20, 0x0a, 0x0b, 0x44, 0x65,
0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52,
0x0b, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x39, 0x0a, 0x09,
0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32,
0x1b, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x2e, 0x44, 0x69, 0x73, 0x63, 0x6f,
0x75, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x09, 0x43, 0x6f,
0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3b, 0x0a, 0x06, 0x54, 0x61, 0x72, 0x67, 0x65,
0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x75,
0x6e, 0x74, 0x2e, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x43, 0x61, 0x6c, 0x63, 0x75,
0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x52, 0x06, 0x54, 0x61,
0x72, 0x67, 0x65, 0x74, 0x32, 0x80, 0x07, 0x0a, 0x0f, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x75, 0x6e,
0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x52, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x41,
0x6c, 0x6c, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x12, 0x16, 0x2e, 0x67, 0x6f,
0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d,
0x70, 0x74, 0x79, 0x1a, 0x13, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x2e, 0x44,
0x69, 0x73, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x22, 0x12, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0c,
0x12, 0x0a, 0x2f, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x12, 0x66, 0x0a, 0x10,
0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73,
0x12, 0x20, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x2e, 0x47, 0x65, 0x74, 0x44,
0x69, 0x73, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x79, 0x49, 0x44, 0x52, 0x65, 0x71, 0x75, 0x65,
0x73, 0x74, 0x1a, 0x13, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x2e, 0x44, 0x69,
0x73, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x22, 0x1b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x15, 0x12,
0x13, 0x2f, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x2f,
0x7b, 0x49, 0x44, 0x7d, 0x12, 0x69, 0x0a, 0x12, 0x44, 0x65, 0x74, 0x65, 0x72, 0x6d, 0x69, 0x6e,
0x65, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x12, 0x1e, 0x2e, 0x64, 0x69, 0x73,
0x63, 0x6f, 0x75, 0x6e, 0x74, 0x2e, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x44, 0x69, 0x73, 0x63, 0x6f,
0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x13, 0x2e, 0x64, 0x69, 0x73,
0x63, 0x6f, 0x75, 0x6e, 0x74, 0x2e, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x22,
0x1e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x18, 0x3a, 0x01, 0x2a, 0x22, 0x13, 0x2f, 0x64, 0x69, 0x73,
0x63, 0x6f, 0x75, 0x6e, 0x74, 0x2f, 0x64, 0x65, 0x74, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x65, 0x12,
0x6d, 0x0a, 0x0e, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x75, 0x6e, 0x74,
0x73, 0x12, 0x1e, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x2e, 0x41, 0x70, 0x70,
0x6c, 0x79, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
0x74, 0x1a, 0x1f, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x2e, 0x41, 0x70, 0x70,
0x6c, 0x79, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
0x73, 0x65, 0x22, 0x1a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x14, 0x3a, 0x01, 0x2a, 0x22, 0x0f, 0x2f,
0x64, 0x69, 0x73, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x2f, 0x61, 0x70, 0x70, 0x6c, 0x79, 0x12, 0x5f,
0x0a, 0x0f, 0x47, 0x65, 0x74, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x79, 0x49,
0x44, 0x12, 0x20, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x2e, 0x47, 0x65, 0x74,
0x44, 0x69, 0x73, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x79, 0x49, 0x44, 0x52, 0x65, 0x71, 0x75,
0x65, 0x73, 0x74, 0x1a, 0x12, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x2e, 0x44,
0x69, 0x73, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x16, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x10, 0x12,
0x0e, 0x2f, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x2f, 0x7b, 0x49, 0x44, 0x7d, 0x12,
0x5b, 0x0a, 0x0e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x75, 0x6e,
0x74, 0x12, 0x1f, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x2e, 0x43, 0x72, 0x65,
0x61, 0x74, 0x65, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65,
0x73, 0x74, 0x1a, 0x12, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x2e, 0x44, 0x69,
0x73, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x14, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0e, 0x3a, 0x01,
0x2a, 0x22, 0x09, 0x2f, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x5c, 0x0a, 0x0f,
0x52, 0x65, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12,
0x1a, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x2e, 0x44, 0x69, 0x73, 0x63, 0x6f,
0x75, 0x6e, 0x74, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x1a, 0x12, 0x2e, 0x64, 0x69,
0x73, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x2e, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22,
0x19, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x13, 0x3a, 0x01, 0x2a, 0x1a, 0x0e, 0x2f, 0x64, 0x69, 0x73,
0x63, 0x6f, 0x75, 0x6e, 0x74, 0x2f, 0x7b, 0x49, 0x44, 0x7d, 0x12, 0x5b, 0x0a, 0x0e, 0x55, 0x70,
0x64, 0x61, 0x74, 0x65, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1a, 0x2e, 0x64,
0x69, 0x73, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x2e, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x75, 0x6e, 0x74,
0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x1a, 0x12, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f,
0x75, 0x6e, 0x74, 0x2e, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x19, 0x82, 0xd3,
0xe4, 0x93, 0x02, 0x13, 0x3a, 0x01, 0x2a, 0x32, 0x0e, 0x2f, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x75,
0x6e, 0x74, 0x2f, 0x7b, 0x49, 0x44, 0x7d, 0x12, 0x5e, 0x0a, 0x0e, 0x44, 0x65, 0x6c, 0x65, 0x74,
0x65, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x20, 0x2e, 0x64, 0x69, 0x73, 0x63,
0x6f, 0x75, 0x6e, 0x74, 0x2e, 0x47, 0x65, 0x74, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x75, 0x6e, 0x74,
0x42, 0x79, 0x49, 0x44, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x12, 0x2e, 0x64, 0x69,
0x73, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x2e, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22,
0x16, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x10, 0x2a, 0x0e, 0x2f, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x75,
0x6e, 0x74, 0x2f, 0x7b, 0x49, 0x44, 0x7d, 0x42, 0x0c, 0x5a, 0x0a, 0x2e, 0x2f, 0x64, 0x69, 0x73,
0x63, 0x6f, 0x75, 0x6e, 0x74, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_discount_service_proto_rawDescOnce sync.Once
file_discount_service_proto_rawDescData = file_discount_service_proto_rawDesc
)
func file_discount_service_proto_rawDescGZIP() []byte {
file_discount_service_proto_rawDescOnce.Do(func() {
file_discount_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_discount_service_proto_rawDescData)
})
return file_discount_service_proto_rawDescData
}
var file_discount_service_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
var file_discount_service_proto_goTypes = []interface{}{
(*GetDiscountByIDRequest)(nil), // 0: discount.GetDiscountByIDRequest
(*ApplyDiscountRequest)(nil), // 1: discount.ApplyDiscountRequest
(*ApplyDiscountResponse)(nil), // 2: discount.ApplyDiscountResponse
(*CreateDiscountRequest)(nil), // 3: discount.CreateDiscountRequest
(*UserInformation)(nil), // 4: discount.UserInformation
(*ProductInformation)(nil), // 5: discount.ProductInformation
(*timestamppb.Timestamp)(nil), // 6: google.protobuf.Timestamp
(*Discount)(nil), // 7: discount.Discount
(*DiscountCondition)(nil), // 8: discount.DiscountCondition
(*DiscountCalculationTarget)(nil), // 9: discount.DiscountCalculationTarget
(*emptypb.Empty)(nil), // 10: google.protobuf.Empty
(*DiscountOptional)(nil), // 11: discount.DiscountOptional
(*Discounts)(nil), // 12: discount.Discounts
}
var file_discount_service_proto_depIdxs = []int32{
4, // 0: discount.ApplyDiscountRequest.UserInformation:type_name -> discount.UserInformation
5, // 1: discount.ApplyDiscountRequest.Products:type_name -> discount.ProductInformation
6, // 2: discount.ApplyDiscountRequest.Date:type_name -> google.protobuf.Timestamp
7, // 3: discount.ApplyDiscountResponse.AppliedDiscounts:type_name -> discount.Discount
8, // 4: discount.CreateDiscountRequest.Condition:type_name -> discount.DiscountCondition
9, // 5: discount.CreateDiscountRequest.Target:type_name -> discount.DiscountCalculationTarget
10, // 6: discount.DiscountService.GetAllDiscounts:input_type -> google.protobuf.Empty
0, // 7: discount.DiscountService.GetUserDiscounts:input_type -> discount.GetDiscountByIDRequest
1, // 8: discount.DiscountService.DetermineDiscounts:input_type -> discount.ApplyDiscountRequest
1, // 9: discount.DiscountService.ApplyDiscounts:input_type -> discount.ApplyDiscountRequest
0, // 10: discount.DiscountService.GetDiscountByID:input_type -> discount.GetDiscountByIDRequest
3, // 11: discount.DiscountService.CreateDiscount:input_type -> discount.CreateDiscountRequest
11, // 12: discount.DiscountService.ReplaceDiscount:input_type -> discount.DiscountOptional
11, // 13: discount.DiscountService.UpdateDiscount:input_type -> discount.DiscountOptional
0, // 14: discount.DiscountService.DeleteDiscount:input_type -> discount.GetDiscountByIDRequest
12, // 15: discount.DiscountService.GetAllDiscounts:output_type -> discount.Discounts
12, // 16: discount.DiscountService.GetUserDiscounts:output_type -> discount.Discounts
12, // 17: discount.DiscountService.DetermineDiscounts:output_type -> discount.Discounts
2, // 18: discount.DiscountService.ApplyDiscounts:output_type -> discount.ApplyDiscountResponse
7, // 19: discount.DiscountService.GetDiscountByID:output_type -> discount.Discount
7, // 20: discount.DiscountService.CreateDiscount:output_type -> discount.Discount
7, // 21: discount.DiscountService.ReplaceDiscount:output_type -> discount.Discount
7, // 22: discount.DiscountService.UpdateDiscount:output_type -> discount.Discount
7, // 23: discount.DiscountService.DeleteDiscount:output_type -> discount.Discount
15, // [15:24] is the sub-list for method output_type
6, // [6:15] is the sub-list for method input_type
6, // [6:6] is the sub-list for extension type_name
6, // [6:6] is the sub-list for extension extendee
0, // [0:6] is the sub-list for field type_name
}
func init() { file_discount_service_proto_init() }
func file_discount_service_proto_init() {
if File_discount_service_proto != nil {
return
}
file_discount_discount_model_proto_init()
if !protoimpl.UnsafeEnabled {
file_discount_service_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetDiscountByIDRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_discount_service_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ApplyDiscountRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_discount_service_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ApplyDiscountResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_discount_service_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CreateDiscountRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
file_discount_service_proto_msgTypes[1].OneofWrappers = []interface{}{}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_discount_service_proto_rawDesc,
NumEnums: 0,
NumMessages: 4,
NumExtensions: 0,
NumServices: 1,
},
GoTypes: file_discount_service_proto_goTypes,
DependencyIndexes: file_discount_service_proto_depIdxs,
MessageInfos: file_discount_service_proto_msgTypes,
}.Build()
File_discount_service_proto = out.File
file_discount_service_proto_rawDesc = nil
file_discount_service_proto_goTypes = nil
file_discount_service_proto_depIdxs = nil
}

@ -14,7 +14,7 @@
// Code generated by protoc-gen-go. DO NOT EDIT. // Code generated by protoc-gen-go. DO NOT EDIT.
// versions: // versions:
// protoc-gen-go v1.33.0 // protoc-gen-go v1.36.7
// protoc (unknown) // protoc (unknown)
// source: google/api/annotations.proto // source: google/api/annotations.proto
@ -25,6 +25,7 @@ import (
protoimpl "google.golang.org/protobuf/runtime/protoimpl" protoimpl "google.golang.org/protobuf/runtime/protoimpl"
descriptorpb "google.golang.org/protobuf/types/descriptorpb" descriptorpb "google.golang.org/protobuf/types/descriptorpb"
reflect "reflect" reflect "reflect"
unsafe "unsafe"
) )
const ( const (
@ -55,29 +56,14 @@ var (
var File_google_api_annotations_proto protoreflect.FileDescriptor var File_google_api_annotations_proto protoreflect.FileDescriptor
var file_google_api_annotations_proto_rawDesc = []byte{ const file_google_api_annotations_proto_rawDesc = "" +
0x0a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, "\n" +
0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0a, "\x1cgoogle/api/annotations.proto\x12\n" +
0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x1a, 0x15, 0x67, 0x6f, 0x6f, 0x67, "google.api\x1a\x15google/api/http.proto\x1a google/protobuf/descriptor.proto:K\n" +
0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, "\x04http\x12\x1e.google.protobuf.MethodOptions\x18\xb0ʼ\" \x01(\v2\x14.google.api.HttpRuleR\x04httpBn\n" +
0x6f, 0x1a, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, "\x0ecom.google.apiB\x10AnnotationsProtoP\x01ZAgoogle.golang.org/genproto/googleapis/api/annotations;annotations\xa2\x02\x04GAPIb\x06proto3"
0x75, 0x66, 0x2f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x3a, 0x4b, 0x0a, 0x04, 0x68, 0x74, 0x74, 0x70, 0x12, 0x1e, 0x2e, 0x67, 0x6f,
0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4d, 0x65,
0x74, 0x68, 0x6f, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xb0, 0xca, 0xbc, 0x22,
0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70,
0x69, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x52, 0x75, 0x6c, 0x65, 0x52, 0x04, 0x68, 0x74, 0x74, 0x70,
0x42, 0x6e, 0x0a, 0x0e, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61,
0x70, 0x69, 0x42, 0x10, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x50,
0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x41, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67,
0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x67, 0x65, 0x6e, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x61, 0x70,
0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x3b, 0x61, 0x6e,
0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0xa2, 0x02, 0x04, 0x47, 0x41, 0x50, 0x49,
0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var file_google_api_annotations_proto_goTypes = []interface{}{ var file_google_api_annotations_proto_goTypes = []any{
(*descriptorpb.MethodOptions)(nil), // 0: google.protobuf.MethodOptions (*descriptorpb.MethodOptions)(nil), // 0: google.protobuf.MethodOptions
(*HttpRule)(nil), // 1: google.api.HttpRule (*HttpRule)(nil), // 1: google.api.HttpRule
} }
@ -101,7 +87,7 @@ func file_google_api_annotations_proto_init() {
out := protoimpl.TypeBuilder{ out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{ File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(), GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_google_api_annotations_proto_rawDesc, RawDescriptor: unsafe.Slice(unsafe.StringData(file_google_api_annotations_proto_rawDesc), len(file_google_api_annotations_proto_rawDesc)),
NumEnums: 0, NumEnums: 0,
NumMessages: 0, NumMessages: 0,
NumExtensions: 1, NumExtensions: 1,
@ -112,7 +98,6 @@ func file_google_api_annotations_proto_init() {
ExtensionInfos: file_google_api_annotations_proto_extTypes, ExtensionInfos: file_google_api_annotations_proto_extTypes,
}.Build() }.Build()
File_google_api_annotations_proto = out.File File_google_api_annotations_proto = out.File
file_google_api_annotations_proto_rawDesc = nil
file_google_api_annotations_proto_goTypes = nil file_google_api_annotations_proto_goTypes = nil
file_google_api_annotations_proto_depIdxs = nil file_google_api_annotations_proto_depIdxs = nil
} }

@ -14,7 +14,7 @@
// Code generated by protoc-gen-go. DO NOT EDIT. // Code generated by protoc-gen-go. DO NOT EDIT.
// versions: // versions:
// protoc-gen-go v1.33.0 // protoc-gen-go v1.36.7
// protoc (unknown) // protoc (unknown)
// source: google/api/http.proto // source: google/api/http.proto
@ -25,6 +25,7 @@ import (
protoimpl "google.golang.org/protobuf/runtime/protoimpl" protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect" reflect "reflect"
sync "sync" sync "sync"
unsafe "unsafe"
) )
const ( const (
@ -38,10 +39,7 @@ const (
// [HttpRule][google.api.HttpRule], each specifying the mapping of an RPC method // [HttpRule][google.api.HttpRule], each specifying the mapping of an RPC method
// to one or more HTTP REST API methods. // to one or more HTTP REST API methods.
type Http struct { type Http struct {
state protoimpl.MessageState state protoimpl.MessageState `protogen:"open.v1"`
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// A list of HTTP configuration rules that apply to individual API methods. // A list of HTTP configuration rules that apply to individual API methods.
// //
// **NOTE:** All service configuration rules follow "last one wins" order. // **NOTE:** All service configuration rules follow "last one wins" order.
@ -53,16 +51,16 @@ type Http struct {
// The default behavior is to not decode RFC 6570 reserved characters in multi // The default behavior is to not decode RFC 6570 reserved characters in multi
// segment matches. // segment matches.
FullyDecodeReservedExpansion bool `protobuf:"varint,2,opt,name=fully_decode_reserved_expansion,json=fullyDecodeReservedExpansion,proto3" json:"fully_decode_reserved_expansion,omitempty"` FullyDecodeReservedExpansion bool `protobuf:"varint,2,opt,name=fully_decode_reserved_expansion,json=fullyDecodeReservedExpansion,proto3" json:"fully_decode_reserved_expansion,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
} }
func (x *Http) Reset() { func (x *Http) Reset() {
*x = Http{} *x = Http{}
if protoimpl.UnsafeEnabled {
mi := &file_google_api_http_proto_msgTypes[0] mi := &file_google_api_http_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi) ms.StoreMessageInfo(mi)
} }
}
func (x *Http) String() string { func (x *Http) String() string {
return protoimpl.X.MessageStringOf(x) return protoimpl.X.MessageStringOf(x)
@ -72,7 +70,7 @@ func (*Http) ProtoMessage() {}
func (x *Http) ProtoReflect() protoreflect.Message { func (x *Http) ProtoReflect() protoreflect.Message {
mi := &file_google_api_http_proto_msgTypes[0] mi := &file_google_api_http_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil { if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil { if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi) ms.StoreMessageInfo(mi)
@ -370,10 +368,7 @@ func (x *Http) GetFullyDecodeReservedExpansion() bool {
// the request or response body to a repeated field. However, some gRPC // the request or response body to a repeated field. However, some gRPC
// Transcoding implementations may not support this feature. // Transcoding implementations may not support this feature.
type HttpRule struct { type HttpRule struct {
state protoimpl.MessageState state protoimpl.MessageState `protogen:"open.v1"`
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Selects a method to which this rule applies. // Selects a method to which this rule applies.
// //
// Refer to [selector][google.api.DocumentationRule.selector] for syntax details. // Refer to [selector][google.api.DocumentationRule.selector] for syntax details.
@ -382,7 +377,7 @@ type HttpRule struct {
// used with any of the {get|put|post|delete|patch} methods. A custom method // used with any of the {get|put|post|delete|patch} methods. A custom method
// can be defined using the 'custom' field. // can be defined using the 'custom' field.
// //
// Types that are assignable to Pattern: // Types that are valid to be assigned to Pattern:
// //
// *HttpRule_Get // *HttpRule_Get
// *HttpRule_Put // *HttpRule_Put
@ -409,16 +404,16 @@ type HttpRule struct {
// not contain an `additional_bindings` field themselves (that is, // not contain an `additional_bindings` field themselves (that is,
// the nesting may only be one level deep). // the nesting may only be one level deep).
AdditionalBindings []*HttpRule `protobuf:"bytes,11,rep,name=additional_bindings,json=additionalBindings,proto3" json:"additional_bindings,omitempty"` AdditionalBindings []*HttpRule `protobuf:"bytes,11,rep,name=additional_bindings,json=additionalBindings,proto3" json:"additional_bindings,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
} }
func (x *HttpRule) Reset() { func (x *HttpRule) Reset() {
*x = HttpRule{} *x = HttpRule{}
if protoimpl.UnsafeEnabled {
mi := &file_google_api_http_proto_msgTypes[1] mi := &file_google_api_http_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi) ms.StoreMessageInfo(mi)
} }
}
func (x *HttpRule) String() string { func (x *HttpRule) String() string {
return protoimpl.X.MessageStringOf(x) return protoimpl.X.MessageStringOf(x)
@ -428,7 +423,7 @@ func (*HttpRule) ProtoMessage() {}
func (x *HttpRule) ProtoReflect() protoreflect.Message { func (x *HttpRule) ProtoReflect() protoreflect.Message {
mi := &file_google_api_http_proto_msgTypes[1] mi := &file_google_api_http_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil { if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil { if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi) ms.StoreMessageInfo(mi)
@ -450,52 +445,64 @@ func (x *HttpRule) GetSelector() string {
return "" return ""
} }
func (m *HttpRule) GetPattern() isHttpRule_Pattern { func (x *HttpRule) GetPattern() isHttpRule_Pattern {
if m != nil { if x != nil {
return m.Pattern return x.Pattern
} }
return nil return nil
} }
func (x *HttpRule) GetGet() string { func (x *HttpRule) GetGet() string {
if x, ok := x.GetPattern().(*HttpRule_Get); ok { if x != nil {
if x, ok := x.Pattern.(*HttpRule_Get); ok {
return x.Get return x.Get
} }
}
return "" return ""
} }
func (x *HttpRule) GetPut() string { func (x *HttpRule) GetPut() string {
if x, ok := x.GetPattern().(*HttpRule_Put); ok { if x != nil {
if x, ok := x.Pattern.(*HttpRule_Put); ok {
return x.Put return x.Put
} }
}
return "" return ""
} }
func (x *HttpRule) GetPost() string { func (x *HttpRule) GetPost() string {
if x, ok := x.GetPattern().(*HttpRule_Post); ok { if x != nil {
if x, ok := x.Pattern.(*HttpRule_Post); ok {
return x.Post return x.Post
} }
}
return "" return ""
} }
func (x *HttpRule) GetDelete() string { func (x *HttpRule) GetDelete() string {
if x, ok := x.GetPattern().(*HttpRule_Delete); ok { if x != nil {
if x, ok := x.Pattern.(*HttpRule_Delete); ok {
return x.Delete return x.Delete
} }
}
return "" return ""
} }
func (x *HttpRule) GetPatch() string { func (x *HttpRule) GetPatch() string {
if x, ok := x.GetPattern().(*HttpRule_Patch); ok { if x != nil {
if x, ok := x.Pattern.(*HttpRule_Patch); ok {
return x.Patch return x.Patch
} }
}
return "" return ""
} }
func (x *HttpRule) GetCustom() *CustomHttpPattern { func (x *HttpRule) GetCustom() *CustomHttpPattern {
if x, ok := x.GetPattern().(*HttpRule_Custom); ok { if x != nil {
if x, ok := x.Pattern.(*HttpRule_Custom); ok {
return x.Custom return x.Custom
} }
}
return nil return nil
} }
@ -572,24 +579,21 @@ func (*HttpRule_Custom) isHttpRule_Pattern() {}
// A custom pattern is used for defining custom HTTP verb. // A custom pattern is used for defining custom HTTP verb.
type CustomHttpPattern struct { type CustomHttpPattern struct {
state protoimpl.MessageState state protoimpl.MessageState `protogen:"open.v1"`
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// The name of this custom HTTP verb. // The name of this custom HTTP verb.
Kind string `protobuf:"bytes,1,opt,name=kind,proto3" json:"kind,omitempty"` Kind string `protobuf:"bytes,1,opt,name=kind,proto3" json:"kind,omitempty"`
// The path matched by this custom verb. // The path matched by this custom verb.
Path string `protobuf:"bytes,2,opt,name=path,proto3" json:"path,omitempty"` Path string `protobuf:"bytes,2,opt,name=path,proto3" json:"path,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
} }
func (x *CustomHttpPattern) Reset() { func (x *CustomHttpPattern) Reset() {
*x = CustomHttpPattern{} *x = CustomHttpPattern{}
if protoimpl.UnsafeEnabled {
mi := &file_google_api_http_proto_msgTypes[2] mi := &file_google_api_http_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi) ms.StoreMessageInfo(mi)
} }
}
func (x *CustomHttpPattern) String() string { func (x *CustomHttpPattern) String() string {
return protoimpl.X.MessageStringOf(x) return protoimpl.X.MessageStringOf(x)
@ -599,7 +603,7 @@ func (*CustomHttpPattern) ProtoMessage() {}
func (x *CustomHttpPattern) ProtoReflect() protoreflect.Message { func (x *CustomHttpPattern) ProtoReflect() protoreflect.Message {
mi := &file_google_api_http_proto_msgTypes[2] mi := &file_google_api_http_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil { if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil { if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi) ms.StoreMessageInfo(mi)
@ -630,66 +634,44 @@ func (x *CustomHttpPattern) GetPath() string {
var File_google_api_http_proto protoreflect.FileDescriptor var File_google_api_http_proto protoreflect.FileDescriptor
var file_google_api_http_proto_rawDesc = []byte{ const file_google_api_http_proto_rawDesc = "" +
0x0a, 0x15, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x68, 0x74, 0x74, "\n" +
0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0a, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, "\x15google/api/http.proto\x12\n" +
0x61, 0x70, 0x69, 0x22, 0x79, 0x0a, 0x04, 0x48, 0x74, 0x74, 0x70, 0x12, 0x2a, 0x0a, 0x05, 0x72, "google.api\"y\n" +
0x75, 0x6c, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, "\x04Http\x12*\n" +
0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x52, 0x75, 0x6c, 0x65, "\x05rules\x18\x01 \x03(\v2\x14.google.api.HttpRuleR\x05rules\x12E\n" +
0x52, 0x05, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x12, 0x45, 0x0a, 0x1f, 0x66, 0x75, 0x6c, 0x6c, 0x79, "\x1ffully_decode_reserved_expansion\x18\x02 \x01(\bR\x1cfullyDecodeReservedExpansion\"\xda\x02\n" +
0x5f, 0x64, 0x65, 0x63, 0x6f, 0x64, 0x65, 0x5f, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, "\bHttpRule\x12\x1a\n" +
0x5f, 0x65, 0x78, 0x70, 0x61, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, "\bselector\x18\x01 \x01(\tR\bselector\x12\x12\n" +
0x52, 0x1c, 0x66, 0x75, 0x6c, 0x6c, 0x79, 0x44, 0x65, 0x63, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, "\x03get\x18\x02 \x01(\tH\x00R\x03get\x12\x12\n" +
0x65, 0x72, 0x76, 0x65, 0x64, 0x45, 0x78, 0x70, 0x61, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0xda, "\x03put\x18\x03 \x01(\tH\x00R\x03put\x12\x14\n" +
0x02, 0x0a, 0x08, 0x48, 0x74, 0x74, 0x70, 0x52, 0x75, 0x6c, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x73, "\x04post\x18\x04 \x01(\tH\x00R\x04post\x12\x18\n" +
0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x73, "\x06delete\x18\x05 \x01(\tH\x00R\x06delete\x12\x16\n" +
0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x12, 0x12, 0x0a, 0x03, 0x67, 0x65, 0x74, 0x18, 0x02, "\x05patch\x18\x06 \x01(\tH\x00R\x05patch\x127\n" +
0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x03, 0x67, 0x65, 0x74, 0x12, 0x12, 0x0a, 0x03, 0x70, "\x06custom\x18\b \x01(\v2\x1d.google.api.CustomHttpPatternH\x00R\x06custom\x12\x12\n" +
0x75, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x03, 0x70, 0x75, 0x74, 0x12, "\x04body\x18\a \x01(\tR\x04body\x12#\n" +
0x14, 0x0a, 0x04, 0x70, 0x6f, 0x73, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, "\rresponse_body\x18\f \x01(\tR\fresponseBody\x12E\n" +
0x04, 0x70, 0x6f, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x06, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x18, "\x13additional_bindings\x18\v \x03(\v2\x14.google.api.HttpRuleR\x12additionalBindingsB\t\n" +
0x05, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x06, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x12, "\apattern\";\n" +
0x16, 0x0a, 0x05, 0x70, 0x61, 0x74, 0x63, 0x68, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, "\x11CustomHttpPattern\x12\x12\n" +
0x52, 0x05, 0x70, 0x61, 0x74, 0x63, 0x68, 0x12, 0x37, 0x0a, 0x06, 0x63, 0x75, 0x73, 0x74, 0x6f, "\x04kind\x18\x01 \x01(\tR\x04kind\x12\x12\n" +
0x6d, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, "\x04path\x18\x02 \x01(\tR\x04pathBj\n" +
0x2e, 0x61, 0x70, 0x69, 0x2e, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x48, 0x74, 0x74, 0x70, 0x50, "\x0ecom.google.apiB\tHttpProtoP\x01ZAgoogle.golang.org/genproto/googleapis/api/annotations;annotations\xf8\x01\x01\xa2\x02\x04GAPIb\x06proto3"
0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x48, 0x00, 0x52, 0x06, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d,
0x12, 0x12, 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04,
0x62, 0x6f, 0x64, 0x79, 0x12, 0x23, 0x0a, 0x0d, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
0x5f, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x72, 0x65, 0x73,
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x6f, 0x64, 0x79, 0x12, 0x45, 0x0a, 0x13, 0x61, 0x64, 0x64,
0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x62, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x73,
0x18, 0x0b, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e,
0x61, 0x70, 0x69, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x52, 0x75, 0x6c, 0x65, 0x52, 0x12, 0x61, 0x64,
0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x42, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x73,
0x42, 0x09, 0x0a, 0x07, 0x70, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x22, 0x3b, 0x0a, 0x11, 0x43,
0x75, 0x73, 0x74, 0x6f, 0x6d, 0x48, 0x74, 0x74, 0x70, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e,
0x12, 0x12, 0x0a, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04,
0x6b, 0x69, 0x6e, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01,
0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x42, 0x6a, 0x0a, 0x0e, 0x63, 0x6f, 0x6d, 0x2e,
0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x42, 0x09, 0x48, 0x74, 0x74, 0x70,
0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x41, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e,
0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x67, 0x65, 0x6e, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x61,
0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x3b, 0x61,
0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0xf8, 0x01, 0x01, 0xa2, 0x02, 0x04,
0x47, 0x41, 0x50, 0x49, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var ( var (
file_google_api_http_proto_rawDescOnce sync.Once file_google_api_http_proto_rawDescOnce sync.Once
file_google_api_http_proto_rawDescData = file_google_api_http_proto_rawDesc file_google_api_http_proto_rawDescData []byte
) )
func file_google_api_http_proto_rawDescGZIP() []byte { func file_google_api_http_proto_rawDescGZIP() []byte {
file_google_api_http_proto_rawDescOnce.Do(func() { file_google_api_http_proto_rawDescOnce.Do(func() {
file_google_api_http_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_api_http_proto_rawDescData) file_google_api_http_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_google_api_http_proto_rawDesc), len(file_google_api_http_proto_rawDesc)))
}) })
return file_google_api_http_proto_rawDescData return file_google_api_http_proto_rawDescData
} }
var file_google_api_http_proto_msgTypes = make([]protoimpl.MessageInfo, 3) var file_google_api_http_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
var file_google_api_http_proto_goTypes = []interface{}{ var file_google_api_http_proto_goTypes = []any{
(*Http)(nil), // 0: google.api.Http (*Http)(nil), // 0: google.api.Http
(*HttpRule)(nil), // 1: google.api.HttpRule (*HttpRule)(nil), // 1: google.api.HttpRule
(*CustomHttpPattern)(nil), // 2: google.api.CustomHttpPattern (*CustomHttpPattern)(nil), // 2: google.api.CustomHttpPattern
@ -710,45 +692,7 @@ func file_google_api_http_proto_init() {
if File_google_api_http_proto != nil { if File_google_api_http_proto != nil {
return return
} }
if !protoimpl.UnsafeEnabled { file_google_api_http_proto_msgTypes[1].OneofWrappers = []any{
file_google_api_http_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Http); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_google_api_http_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*HttpRule); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_google_api_http_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CustomHttpPattern); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
file_google_api_http_proto_msgTypes[1].OneofWrappers = []interface{}{
(*HttpRule_Get)(nil), (*HttpRule_Get)(nil),
(*HttpRule_Put)(nil), (*HttpRule_Put)(nil),
(*HttpRule_Post)(nil), (*HttpRule_Post)(nil),
@ -760,7 +704,7 @@ func file_google_api_http_proto_init() {
out := protoimpl.TypeBuilder{ out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{ File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(), GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_google_api_http_proto_rawDesc, RawDescriptor: unsafe.Slice(unsafe.StringData(file_google_api_http_proto_rawDesc), len(file_google_api_http_proto_rawDesc)),
NumEnums: 0, NumEnums: 0,
NumMessages: 3, NumMessages: 3,
NumExtensions: 0, NumExtensions: 0,
@ -771,7 +715,6 @@ func file_google_api_http_proto_init() {
MessageInfos: file_google_api_http_proto_msgTypes, MessageInfos: file_google_api_http_proto_msgTypes,
}.Build() }.Build()
File_google_api_http_proto = out.File File_google_api_http_proto = out.File
file_google_api_http_proto_rawDesc = nil
file_google_api_http_proto_goTypes = nil file_google_api_http_proto_goTypes = nil
file_google_api_http_proto_depIdxs = nil file_google_api_http_proto_depIdxs = nil
} }

@ -1,328 +0,0 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.25.0-devel
// protoc v3.14.0
// source: service.proto
package payment_callback
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
emptypb "google.golang.org/protobuf/types/known/emptypb"
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 Event struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Key string `protobuf:"bytes,1,opt,name=Key,proto3" json:"Key,omitempty"`
Message string `protobuf:"bytes,2,opt,name=Message,proto3" json:"Message,omitempty"`
Payment *Payment `protobuf:"bytes,3,opt,name=Payment,proto3" json:"Payment,omitempty"`
}
func (x *Event) Reset() {
*x = Event{}
if protoimpl.UnsafeEnabled {
mi := &file_service_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Event) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Event) ProtoMessage() {}
func (x *Event) ProtoReflect() protoreflect.Message {
mi := &file_service_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 Event.ProtoReflect.Descriptor instead.
func (*Event) Descriptor() ([]byte, []int) {
return file_service_proto_rawDescGZIP(), []int{0}
}
func (x *Event) GetKey() string {
if x != nil {
return x.Key
}
return ""
}
func (x *Event) GetMessage() string {
if x != nil {
return x.Message
}
return ""
}
func (x *Event) GetPayment() *Payment {
if x != nil {
return x.Payment
}
return nil
}
type Payment struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
ID string `protobuf:"bytes,1,opt,name=ID,proto3" json:"ID,omitempty"`
UserID string `protobuf:"bytes,2,opt,name=UserID,proto3" json:"UserID,omitempty"`
PaymentID string `protobuf:"bytes,3,opt,name=PaymentID,proto3" json:"PaymentID,omitempty"`
IdempotencePaymentID string `protobuf:"bytes,4,opt,name=IdempotencePaymentID,proto3" json:"IdempotencePaymentID,omitempty"`
Amount int64 `protobuf:"varint,5,opt,name=Amount,proto3" json:"Amount,omitempty"`
Currency string `protobuf:"bytes,6,opt,name=Currency,proto3" json:"Currency,omitempty"`
Type string `protobuf:"bytes,7,opt,name=Type,proto3" json:"Type,omitempty"`
Status string `protobuf:"bytes,8,opt,name=Status,proto3" json:"Status,omitempty"`
Completed bool `protobuf:"varint,9,opt,name=Completed,proto3" json:"Completed,omitempty"`
}
func (x *Payment) Reset() {
*x = Payment{}
if protoimpl.UnsafeEnabled {
mi := &file_service_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Payment) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Payment) ProtoMessage() {}
func (x *Payment) ProtoReflect() protoreflect.Message {
mi := &file_service_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 Payment.ProtoReflect.Descriptor instead.
func (*Payment) Descriptor() ([]byte, []int) {
return file_service_proto_rawDescGZIP(), []int{1}
}
func (x *Payment) GetID() string {
if x != nil {
return x.ID
}
return ""
}
func (x *Payment) GetUserID() string {
if x != nil {
return x.UserID
}
return ""
}
func (x *Payment) GetPaymentID() string {
if x != nil {
return x.PaymentID
}
return ""
}
func (x *Payment) GetIdempotencePaymentID() string {
if x != nil {
return x.IdempotencePaymentID
}
return ""
}
func (x *Payment) GetAmount() int64 {
if x != nil {
return x.Amount
}
return 0
}
func (x *Payment) GetCurrency() string {
if x != nil {
return x.Currency
}
return ""
}
func (x *Payment) GetType() string {
if x != nil {
return x.Type
}
return ""
}
func (x *Payment) GetStatus() string {
if x != nil {
return x.Status
}
return ""
}
func (x *Payment) GetCompleted() bool {
if x != nil {
return x.Completed
}
return false
}
var File_service_proto protoreflect.FileDescriptor
var file_service_proto_rawDesc = []byte{
0x0a, 0x0d, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12,
0x10, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x63, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63,
0x6b, 0x1a, 0x1b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62,
0x75, 0x66, 0x2f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x68,
0x0a, 0x05, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x4b, 0x65, 0x79, 0x18, 0x01,
0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x4b, 0x65, 0x79, 0x12, 0x18, 0x0a, 0x07, 0x4d, 0x65, 0x73,
0x73, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x4d, 0x65, 0x73, 0x73,
0x61, 0x67, 0x65, 0x12, 0x33, 0x0a, 0x07, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x03,
0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x63,
0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x2e, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x52,
0x07, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x22, 0x81, 0x02, 0x0a, 0x07, 0x50, 0x61, 0x79,
0x6d, 0x65, 0x6e, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
0x52, 0x02, 0x49, 0x44, 0x12, 0x16, 0x0a, 0x06, 0x55, 0x73, 0x65, 0x72, 0x49, 0x44, 0x18, 0x02,
0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x55, 0x73, 0x65, 0x72, 0x49, 0x44, 0x12, 0x1c, 0x0a, 0x09,
0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x49, 0x44, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52,
0x09, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x49, 0x44, 0x12, 0x32, 0x0a, 0x14, 0x49, 0x64,
0x65, 0x6d, 0x70, 0x6f, 0x74, 0x65, 0x6e, 0x63, 0x65, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74,
0x49, 0x44, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x14, 0x49, 0x64, 0x65, 0x6d, 0x70, 0x6f,
0x74, 0x65, 0x6e, 0x63, 0x65, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x49, 0x44, 0x12, 0x16,
0x0a, 0x06, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06,
0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e,
0x63, 0x79, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e,
0x63, 0x79, 0x12, 0x12, 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09,
0x52, 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73,
0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1c,
0x0a, 0x09, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x18, 0x09, 0x20, 0x01, 0x28,
0x08, 0x52, 0x09, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x32, 0xdd, 0x01, 0x0a,
0x16, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x43, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b,
0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x3e, 0x0a, 0x09, 0x4f, 0x6e, 0x53, 0x75, 0x63,
0x63, 0x65, 0x73, 0x73, 0x12, 0x17, 0x2e, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x63,
0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x1a, 0x16, 0x2e,
0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e,
0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x3e, 0x0a, 0x09, 0x4f, 0x6e, 0x46, 0x61, 0x69,
0x6c, 0x75, 0x72, 0x65, 0x12, 0x17, 0x2e, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x63,
0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x1a, 0x16, 0x2e,
0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e,
0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x43, 0x0a, 0x0e, 0x4f, 0x6e, 0x43, 0x61, 0x72,
0x74, 0x50, 0x75, 0x72, 0x63, 0x68, 0x61, 0x73, 0x65, 0x12, 0x17, 0x2e, 0x70, 0x61, 0x79, 0x6d,
0x65, 0x6e, 0x74, 0x5f, 0x63, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x2e, 0x45, 0x76, 0x65,
0x6e, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x42, 0x14, 0x5a, 0x12,
0x2e, 0x2f, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x63, 0x61, 0x6c, 0x6c, 0x62, 0x61,
0x63, 0x6b, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_service_proto_rawDescOnce sync.Once
file_service_proto_rawDescData = file_service_proto_rawDesc
)
func file_service_proto_rawDescGZIP() []byte {
file_service_proto_rawDescOnce.Do(func() {
file_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_service_proto_rawDescData)
})
return file_service_proto_rawDescData
}
var file_service_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
var file_service_proto_goTypes = []interface{}{
(*Event)(nil), // 0: payment_callback.Event
(*Payment)(nil), // 1: payment_callback.Payment
(*emptypb.Empty)(nil), // 2: google.protobuf.Empty
}
var file_service_proto_depIdxs = []int32{
1, // 0: payment_callback.Event.Payment:type_name -> payment_callback.Payment
0, // 1: payment_callback.PaymentCallbackService.OnSuccess:input_type -> payment_callback.Event
0, // 2: payment_callback.PaymentCallbackService.OnFailure:input_type -> payment_callback.Event
0, // 3: payment_callback.PaymentCallbackService.OnCartPurchase:input_type -> payment_callback.Event
2, // 4: payment_callback.PaymentCallbackService.OnSuccess:output_type -> google.protobuf.Empty
2, // 5: payment_callback.PaymentCallbackService.OnFailure:output_type -> google.protobuf.Empty
2, // 6: payment_callback.PaymentCallbackService.OnCartPurchase:output_type -> google.protobuf.Empty
4, // [4:7] is the sub-list for method output_type
1, // [1:4] is the sub-list for method input_type
1, // [1:1] is the sub-list for extension type_name
1, // [1:1] is the sub-list for extension extendee
0, // [0:1] is the sub-list for field type_name
}
func init() { file_service_proto_init() }
func file_service_proto_init() {
if File_service_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_service_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Event); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_service_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Payment); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_service_proto_rawDesc,
NumEnums: 0,
NumMessages: 2,
NumExtensions: 0,
NumServices: 1,
},
GoTypes: file_service_proto_goTypes,
DependencyIndexes: file_service_proto_depIdxs,
MessageInfos: file_service_proto_msgTypes,
}.Build()
File_service_proto = out.File
file_service_proto_rawDesc = nil
file_service_proto_goTypes = nil
file_service_proto_depIdxs = nil
}

@ -1,6 +1,6 @@
// Code generated by protoc-gen-go. DO NOT EDIT. // Code generated by protoc-gen-go. DO NOT EDIT.
// versions: // versions:
// protoc-gen-go v1.33.0 // protoc-gen-go v1.36.7
// protoc (unknown) // protoc (unknown)
// source: treasurer/payment.model.proto // source: treasurer/payment.model.proto
@ -11,6 +11,7 @@ import (
protoimpl "google.golang.org/protobuf/runtime/protoimpl" protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect" reflect "reflect"
sync "sync" sync "sync"
unsafe "unsafe"
) )
const ( const (
@ -21,10 +22,7 @@ const (
) )
type MainPaymentSettings struct { type MainPaymentSettings struct {
state protoimpl.MessageState state protoimpl.MessageState `protogen:"open.v1"`
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Currency string `protobuf:"bytes,1,opt,name=Currency,proto3" json:"Currency,omitempty"` Currency string `protobuf:"bytes,1,opt,name=Currency,proto3" json:"Currency,omitempty"`
Amount int64 `protobuf:"varint,2,opt,name=Amount,proto3" json:"Amount,omitempty"` Amount int64 `protobuf:"varint,2,opt,name=Amount,proto3" json:"Amount,omitempty"`
CallbackHostGRPC []string `protobuf:"bytes,3,rep,name=CallbackHostGRPC,proto3" json:"CallbackHostGRPC,omitempty"` CallbackHostGRPC []string `protobuf:"bytes,3,rep,name=CallbackHostGRPC,proto3" json:"CallbackHostGRPC,omitempty"`
@ -33,16 +31,16 @@ type MainPaymentSettings struct {
ClientIP string `protobuf:"bytes,6,opt,name=ClientIP,proto3" json:"ClientIP,omitempty"` ClientIP string `protobuf:"bytes,6,opt,name=ClientIP,proto3" json:"ClientIP,omitempty"`
Customer *Customer `protobuf:"bytes,7,opt,name=Customer,proto3" json:"Customer,omitempty"` Customer *Customer `protobuf:"bytes,7,opt,name=Customer,proto3" json:"Customer,omitempty"`
Items []*Item `protobuf:"bytes,8,rep,name=Items,proto3" json:"Items,omitempty"` Items []*Item `protobuf:"bytes,8,rep,name=Items,proto3" json:"Items,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
} }
func (x *MainPaymentSettings) Reset() { func (x *MainPaymentSettings) Reset() {
*x = MainPaymentSettings{} *x = MainPaymentSettings{}
if protoimpl.UnsafeEnabled {
mi := &file_treasurer_payment_model_proto_msgTypes[0] mi := &file_treasurer_payment_model_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi) ms.StoreMessageInfo(mi)
} }
}
func (x *MainPaymentSettings) String() string { func (x *MainPaymentSettings) String() string {
return protoimpl.X.MessageStringOf(x) return protoimpl.X.MessageStringOf(x)
@ -52,7 +50,7 @@ func (*MainPaymentSettings) ProtoMessage() {}
func (x *MainPaymentSettings) ProtoReflect() protoreflect.Message { func (x *MainPaymentSettings) ProtoReflect() protoreflect.Message {
mi := &file_treasurer_payment_model_proto_msgTypes[0] mi := &file_treasurer_payment_model_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil { if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil { if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi) ms.StoreMessageInfo(mi)
@ -124,24 +122,21 @@ func (x *MainPaymentSettings) GetItems() []*Item {
} }
type Customer struct { type Customer struct {
state protoimpl.MessageState state protoimpl.MessageState `protogen:"open.v1"`
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
FullName string `protobuf:"bytes,1,opt,name=FullName,proto3" json:"FullName,omitempty"` FullName string `protobuf:"bytes,1,opt,name=FullName,proto3" json:"FullName,omitempty"`
INN string `protobuf:"bytes,2,opt,name=INN,proto3" json:"INN,omitempty"` INN string `protobuf:"bytes,2,opt,name=INN,proto3" json:"INN,omitempty"`
Email string `protobuf:"bytes,3,opt,name=Email,proto3" json:"Email,omitempty"` Email string `protobuf:"bytes,3,opt,name=Email,proto3" json:"Email,omitempty"`
Phone string `protobuf:"bytes,4,opt,name=Phone,proto3" json:"Phone,omitempty"` Phone string `protobuf:"bytes,4,opt,name=Phone,proto3" json:"Phone,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
} }
func (x *Customer) Reset() { func (x *Customer) Reset() {
*x = Customer{} *x = Customer{}
if protoimpl.UnsafeEnabled {
mi := &file_treasurer_payment_model_proto_msgTypes[1] mi := &file_treasurer_payment_model_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi) ms.StoreMessageInfo(mi)
} }
}
func (x *Customer) String() string { func (x *Customer) String() string {
return protoimpl.X.MessageStringOf(x) return protoimpl.X.MessageStringOf(x)
@ -151,7 +146,7 @@ func (*Customer) ProtoMessage() {}
func (x *Customer) ProtoReflect() protoreflect.Message { func (x *Customer) ProtoReflect() protoreflect.Message {
mi := &file_treasurer_payment_model_proto_msgTypes[1] mi := &file_treasurer_payment_model_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil { if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil { if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi) ms.StoreMessageInfo(mi)
@ -195,25 +190,22 @@ func (x *Customer) GetPhone() string {
} }
type Item struct { type Item struct {
state protoimpl.MessageState state protoimpl.MessageState `protogen:"open.v1"`
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Description string `protobuf:"bytes,1,opt,name=Description,proto3" json:"Description,omitempty"` Description string `protobuf:"bytes,1,opt,name=Description,proto3" json:"Description,omitempty"`
Measure string `protobuf:"bytes,2,opt,name=Measure,proto3" json:"Measure,omitempty"` Measure string `protobuf:"bytes,2,opt,name=Measure,proto3" json:"Measure,omitempty"`
Quantity string `protobuf:"bytes,3,opt,name=Quantity,proto3" json:"Quantity,omitempty"` Quantity string `protobuf:"bytes,3,opt,name=Quantity,proto3" json:"Quantity,omitempty"`
Money string `protobuf:"bytes,4,opt,name=Money,proto3" json:"Money,omitempty"` Money string `protobuf:"bytes,4,opt,name=Money,proto3" json:"Money,omitempty"`
Currency string `protobuf:"bytes,5,opt,name=Currency,proto3" json:"Currency,omitempty"` Currency string `protobuf:"bytes,5,opt,name=Currency,proto3" json:"Currency,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
} }
func (x *Item) Reset() { func (x *Item) Reset() {
*x = Item{} *x = Item{}
if protoimpl.UnsafeEnabled {
mi := &file_treasurer_payment_model_proto_msgTypes[2] mi := &file_treasurer_payment_model_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi) ms.StoreMessageInfo(mi)
} }
}
func (x *Item) String() string { func (x *Item) String() string {
return protoimpl.X.MessageStringOf(x) return protoimpl.X.MessageStringOf(x)
@ -223,7 +215,7 @@ func (*Item) ProtoMessage() {}
func (x *Item) ProtoReflect() protoreflect.Message { func (x *Item) ProtoReflect() protoreflect.Message {
mi := &file_treasurer_payment_model_proto_msgTypes[2] mi := &file_treasurer_payment_model_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil { if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil { if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi) ms.StoreMessageInfo(mi)
@ -275,61 +267,44 @@ func (x *Item) GetCurrency() string {
var File_treasurer_payment_model_proto protoreflect.FileDescriptor var File_treasurer_payment_model_proto protoreflect.FileDescriptor
var file_treasurer_payment_model_proto_rawDesc = []byte{ const file_treasurer_payment_model_proto_rawDesc = "" +
0x0a, 0x1d, 0x74, 0x72, 0x65, 0x61, 0x73, 0x75, 0x72, 0x65, 0x72, 0x2f, 0x70, 0x61, 0x79, 0x6d, "\n" +
0x65, 0x6e, 0x74, 0x2e, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, "\x1dtreasurer/payment.model.proto\x12\ttreasurer\"\x9f\x02\n" +
0x09, 0x74, 0x72, 0x65, 0x61, 0x73, 0x75, 0x72, 0x65, 0x72, 0x22, 0x9f, 0x02, 0x0a, 0x13, 0x4d, "\x13MainPaymentSettings\x12\x1a\n" +
0x61, 0x69, 0x6e, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, "\bCurrency\x18\x01 \x01(\tR\bCurrency\x12\x16\n" +
0x67, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x18, 0x01, "\x06Amount\x18\x02 \x01(\x03R\x06Amount\x12*\n" +
0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x12, 0x16, "\x10CallbackHostGRPC\x18\x03 \x03(\tR\x10CallbackHostGRPC\x12\x1c\n" +
0x0a, 0x06, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, "\tReturnURL\x18\x04 \x01(\tR\tReturnURL\x12\x16\n" +
0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x2a, 0x0a, 0x10, 0x43, 0x61, 0x6c, 0x6c, 0x62, 0x61, "\x06UserID\x18\x05 \x01(\tR\x06UserID\x12\x1a\n" +
0x63, 0x6b, 0x48, 0x6f, 0x73, 0x74, 0x47, 0x52, 0x50, 0x43, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, "\bClientIP\x18\x06 \x01(\tR\bClientIP\x12/\n" +
0x52, 0x10, 0x43, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x48, 0x6f, 0x73, 0x74, 0x47, 0x52, "\bCustomer\x18\a \x01(\v2\x13.treasurer.CustomerR\bCustomer\x12%\n" +
0x50, 0x43, 0x12, 0x1c, 0x0a, 0x09, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x55, 0x52, 0x4c, 0x18, "\x05Items\x18\b \x03(\v2\x0f.treasurer.ItemR\x05Items\"d\n" +
0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x55, 0x52, 0x4c, "\bCustomer\x12\x1a\n" +
0x12, 0x16, 0x0a, 0x06, 0x55, 0x73, 0x65, 0x72, 0x49, 0x44, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, "\bFullName\x18\x01 \x01(\tR\bFullName\x12\x10\n" +
0x52, 0x06, 0x55, 0x73, 0x65, 0x72, 0x49, 0x44, 0x12, 0x1a, 0x0a, 0x08, 0x43, 0x6c, 0x69, 0x65, "\x03INN\x18\x02 \x01(\tR\x03INN\x12\x14\n" +
0x6e, 0x74, 0x49, 0x50, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x43, 0x6c, 0x69, 0x65, "\x05Email\x18\x03 \x01(\tR\x05Email\x12\x14\n" +
0x6e, 0x74, 0x49, 0x50, 0x12, 0x2f, 0x0a, 0x08, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, "\x05Phone\x18\x04 \x01(\tR\x05Phone\"\x90\x01\n" +
0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x74, 0x72, 0x65, 0x61, 0x73, 0x75, 0x72, "\x04Item\x12 \n" +
0x65, 0x72, 0x2e, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x52, 0x08, 0x43, 0x75, 0x73, "\vDescription\x18\x01 \x01(\tR\vDescription\x12\x18\n" +
0x74, 0x6f, 0x6d, 0x65, 0x72, 0x12, 0x25, 0x0a, 0x05, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x08, "\aMeasure\x18\x02 \x01(\tR\aMeasure\x12\x1a\n" +
0x20, 0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x74, 0x72, 0x65, 0x61, 0x73, 0x75, 0x72, 0x65, 0x72, "\bQuantity\x18\x03 \x01(\tR\bQuantity\x12\x14\n" +
0x2e, 0x49, 0x74, 0x65, 0x6d, 0x52, 0x05, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x22, 0x64, 0x0a, 0x08, "\x05Money\x18\x04 \x01(\tR\x05Money\x12\x1a\n" +
0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x12, 0x1a, 0x0a, 0x08, 0x46, 0x75, 0x6c, 0x6c, "\bCurrency\x18\x05 \x01(\tR\bCurrencyB\rZ\v./treasurerb\x06proto3"
0x4e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x46, 0x75, 0x6c, 0x6c,
0x4e, 0x61, 0x6d, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x49, 0x4e, 0x4e, 0x18, 0x02, 0x20, 0x01, 0x28,
0x09, 0x52, 0x03, 0x49, 0x4e, 0x4e, 0x12, 0x14, 0x0a, 0x05, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x18,
0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x14, 0x0a, 0x05,
0x50, 0x68, 0x6f, 0x6e, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x50, 0x68, 0x6f,
0x6e, 0x65, 0x22, 0x90, 0x01, 0x0a, 0x04, 0x49, 0x74, 0x65, 0x6d, 0x12, 0x20, 0x0a, 0x0b, 0x44,
0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
0x52, 0x0b, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x18, 0x0a,
0x07, 0x4d, 0x65, 0x61, 0x73, 0x75, 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07,
0x4d, 0x65, 0x61, 0x73, 0x75, 0x72, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x51, 0x75, 0x61, 0x6e, 0x74,
0x69, 0x74, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x51, 0x75, 0x61, 0x6e, 0x74,
0x69, 0x74, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x4d, 0x6f, 0x6e, 0x65, 0x79, 0x18, 0x04, 0x20, 0x01,
0x28, 0x09, 0x52, 0x05, 0x4d, 0x6f, 0x6e, 0x65, 0x79, 0x12, 0x1a, 0x0a, 0x08, 0x43, 0x75, 0x72,
0x72, 0x65, 0x6e, 0x63, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x43, 0x75, 0x72,
0x72, 0x65, 0x6e, 0x63, 0x79, 0x42, 0x0d, 0x5a, 0x0b, 0x2e, 0x2f, 0x74, 0x72, 0x65, 0x61, 0x73,
0x75, 0x72, 0x65, 0x72, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var ( var (
file_treasurer_payment_model_proto_rawDescOnce sync.Once file_treasurer_payment_model_proto_rawDescOnce sync.Once
file_treasurer_payment_model_proto_rawDescData = file_treasurer_payment_model_proto_rawDesc file_treasurer_payment_model_proto_rawDescData []byte
) )
func file_treasurer_payment_model_proto_rawDescGZIP() []byte { func file_treasurer_payment_model_proto_rawDescGZIP() []byte {
file_treasurer_payment_model_proto_rawDescOnce.Do(func() { file_treasurer_payment_model_proto_rawDescOnce.Do(func() {
file_treasurer_payment_model_proto_rawDescData = protoimpl.X.CompressGZIP(file_treasurer_payment_model_proto_rawDescData) file_treasurer_payment_model_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_treasurer_payment_model_proto_rawDesc), len(file_treasurer_payment_model_proto_rawDesc)))
}) })
return file_treasurer_payment_model_proto_rawDescData return file_treasurer_payment_model_proto_rawDescData
} }
var file_treasurer_payment_model_proto_msgTypes = make([]protoimpl.MessageInfo, 3) var file_treasurer_payment_model_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
var file_treasurer_payment_model_proto_goTypes = []interface{}{ var file_treasurer_payment_model_proto_goTypes = []any{
(*MainPaymentSettings)(nil), // 0: treasurer.MainPaymentSettings (*MainPaymentSettings)(nil), // 0: treasurer.MainPaymentSettings
(*Customer)(nil), // 1: treasurer.Customer (*Customer)(nil), // 1: treasurer.Customer
(*Item)(nil), // 2: treasurer.Item (*Item)(nil), // 2: treasurer.Item
@ -349,49 +324,11 @@ func file_treasurer_payment_model_proto_init() {
if File_treasurer_payment_model_proto != nil { if File_treasurer_payment_model_proto != nil {
return return
} }
if !protoimpl.UnsafeEnabled {
file_treasurer_payment_model_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*MainPaymentSettings); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_treasurer_payment_model_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Customer); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_treasurer_payment_model_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Item); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{} type x struct{}
out := protoimpl.TypeBuilder{ out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{ File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(), GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_treasurer_payment_model_proto_rawDesc, RawDescriptor: unsafe.Slice(unsafe.StringData(file_treasurer_payment_model_proto_rawDesc), len(file_treasurer_payment_model_proto_rawDesc)),
NumEnums: 0, NumEnums: 0,
NumMessages: 3, NumMessages: 3,
NumExtensions: 0, NumExtensions: 0,
@ -402,7 +339,6 @@ func file_treasurer_payment_model_proto_init() {
MessageInfos: file_treasurer_payment_model_proto_msgTypes, MessageInfos: file_treasurer_payment_model_proto_msgTypes,
}.Build() }.Build()
File_treasurer_payment_model_proto = out.File File_treasurer_payment_model_proto = out.File
file_treasurer_payment_model_proto_rawDesc = nil
file_treasurer_payment_model_proto_goTypes = nil file_treasurer_payment_model_proto_goTypes = nil
file_treasurer_payment_model_proto_depIdxs = nil file_treasurer_payment_model_proto_depIdxs = nil
} }

@ -1,425 +0,0 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.33.0
// protoc (unknown)
// source: treasurer/service.proto
package treasurer
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
emptypb "google.golang.org/protobuf/types/known/emptypb"
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 GetBankCardPaymentLinkRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
MainSettings *MainPaymentSettings `protobuf:"bytes,1,opt,name=MainSettings,proto3" json:"MainSettings,omitempty"`
}
func (x *GetBankCardPaymentLinkRequest) Reset() {
*x = GetBankCardPaymentLinkRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_treasurer_service_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetBankCardPaymentLinkRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetBankCardPaymentLinkRequest) ProtoMessage() {}
func (x *GetBankCardPaymentLinkRequest) ProtoReflect() protoreflect.Message {
mi := &file_treasurer_service_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 GetBankCardPaymentLinkRequest.ProtoReflect.Descriptor instead.
func (*GetBankCardPaymentLinkRequest) Descriptor() ([]byte, []int) {
return file_treasurer_service_proto_rawDescGZIP(), []int{0}
}
func (x *GetBankCardPaymentLinkRequest) GetMainSettings() *MainPaymentSettings {
if x != nil {
return x.MainSettings
}
return nil
}
type GetPaymentLinkRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
MainSettings *MainPaymentSettings `protobuf:"bytes,1,opt,name=MainSettings,proto3" json:"MainSettings,omitempty"`
}
func (x *GetPaymentLinkRequest) Reset() {
*x = GetPaymentLinkRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_treasurer_service_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetPaymentLinkRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetPaymentLinkRequest) ProtoMessage() {}
func (x *GetPaymentLinkRequest) ProtoReflect() protoreflect.Message {
mi := &file_treasurer_service_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 GetPaymentLinkRequest.ProtoReflect.Descriptor instead.
func (*GetPaymentLinkRequest) Descriptor() ([]byte, []int) {
return file_treasurer_service_proto_rawDescGZIP(), []int{1}
}
func (x *GetPaymentLinkRequest) GetMainSettings() *MainPaymentSettings {
if x != nil {
return x.MainSettings
}
return nil
}
type GetB2BPaymentLinkRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
MainSettings *MainPaymentSettings `protobuf:"bytes,1,opt,name=MainSettings,proto3" json:"MainSettings,omitempty"`
PaymentPurpose string `protobuf:"bytes,2,opt,name=PaymentPurpose,proto3" json:"PaymentPurpose,omitempty"`
VatData *emptypb.Empty `protobuf:"bytes,3,opt,name=VatData,proto3" json:"VatData,omitempty"`
}
func (x *GetB2BPaymentLinkRequest) Reset() {
*x = GetB2BPaymentLinkRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_treasurer_service_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetB2BPaymentLinkRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetB2BPaymentLinkRequest) ProtoMessage() {}
func (x *GetB2BPaymentLinkRequest) ProtoReflect() protoreflect.Message {
mi := &file_treasurer_service_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 GetB2BPaymentLinkRequest.ProtoReflect.Descriptor instead.
func (*GetB2BPaymentLinkRequest) Descriptor() ([]byte, []int) {
return file_treasurer_service_proto_rawDescGZIP(), []int{2}
}
func (x *GetB2BPaymentLinkRequest) GetMainSettings() *MainPaymentSettings {
if x != nil {
return x.MainSettings
}
return nil
}
func (x *GetB2BPaymentLinkRequest) GetPaymentPurpose() string {
if x != nil {
return x.PaymentPurpose
}
return ""
}
func (x *GetB2BPaymentLinkRequest) GetVatData() *emptypb.Empty {
if x != nil {
return x.VatData
}
return nil
}
type GetPaymentLinkResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
RedirectURL string `protobuf:"bytes,1,opt,name=RedirectURL,proto3" json:"RedirectURL,omitempty"`
}
func (x *GetPaymentLinkResponse) Reset() {
*x = GetPaymentLinkResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_treasurer_service_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetPaymentLinkResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetPaymentLinkResponse) ProtoMessage() {}
func (x *GetPaymentLinkResponse) ProtoReflect() protoreflect.Message {
mi := &file_treasurer_service_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 GetPaymentLinkResponse.ProtoReflect.Descriptor instead.
func (*GetPaymentLinkResponse) Descriptor() ([]byte, []int) {
return file_treasurer_service_proto_rawDescGZIP(), []int{3}
}
func (x *GetPaymentLinkResponse) GetRedirectURL() string {
if x != nil {
return x.RedirectURL
}
return ""
}
var File_treasurer_service_proto protoreflect.FileDescriptor
var file_treasurer_service_proto_rawDesc = []byte{
0x0a, 0x17, 0x74, 0x72, 0x65, 0x61, 0x73, 0x75, 0x72, 0x65, 0x72, 0x2f, 0x73, 0x65, 0x72, 0x76,
0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x09, 0x74, 0x72, 0x65, 0x61, 0x73,
0x75, 0x72, 0x65, 0x72, 0x1a, 0x1b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x1a, 0x1d, 0x74, 0x72, 0x65, 0x61, 0x73, 0x75, 0x72, 0x65, 0x72, 0x2f, 0x70, 0x61, 0x79,
0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
0x22, 0x63, 0x0a, 0x1d, 0x47, 0x65, 0x74, 0x42, 0x61, 0x6e, 0x6b, 0x43, 0x61, 0x72, 0x64, 0x50,
0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x4c, 0x69, 0x6e, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
0x74, 0x12, 0x42, 0x0a, 0x0c, 0x4d, 0x61, 0x69, 0x6e, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67,
0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x74, 0x72, 0x65, 0x61, 0x73, 0x75,
0x72, 0x65, 0x72, 0x2e, 0x4d, 0x61, 0x69, 0x6e, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x53,
0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x0c, 0x4d, 0x61, 0x69, 0x6e, 0x53, 0x65, 0x74,
0x74, 0x69, 0x6e, 0x67, 0x73, 0x22, 0x5b, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x50, 0x61, 0x79, 0x6d,
0x65, 0x6e, 0x74, 0x4c, 0x69, 0x6e, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x42,
0x0a, 0x0c, 0x4d, 0x61, 0x69, 0x6e, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x01,
0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x74, 0x72, 0x65, 0x61, 0x73, 0x75, 0x72, 0x65, 0x72,
0x2e, 0x4d, 0x61, 0x69, 0x6e, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x53, 0x65, 0x74, 0x74,
0x69, 0x6e, 0x67, 0x73, 0x52, 0x0c, 0x4d, 0x61, 0x69, 0x6e, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e,
0x67, 0x73, 0x22, 0xb8, 0x01, 0x0a, 0x18, 0x47, 0x65, 0x74, 0x42, 0x32, 0x42, 0x50, 0x61, 0x79,
0x6d, 0x65, 0x6e, 0x74, 0x4c, 0x69, 0x6e, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12,
0x42, 0x0a, 0x0c, 0x4d, 0x61, 0x69, 0x6e, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x18,
0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x74, 0x72, 0x65, 0x61, 0x73, 0x75, 0x72, 0x65,
0x72, 0x2e, 0x4d, 0x61, 0x69, 0x6e, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x53, 0x65, 0x74,
0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x0c, 0x4d, 0x61, 0x69, 0x6e, 0x53, 0x65, 0x74, 0x74, 0x69,
0x6e, 0x67, 0x73, 0x12, 0x26, 0x0a, 0x0e, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x50, 0x75,
0x72, 0x70, 0x6f, 0x73, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x50, 0x61, 0x79,
0x6d, 0x65, 0x6e, 0x74, 0x50, 0x75, 0x72, 0x70, 0x6f, 0x73, 0x65, 0x12, 0x30, 0x0a, 0x07, 0x56,
0x61, 0x74, 0x44, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67,
0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45,
0x6d, 0x70, 0x74, 0x79, 0x52, 0x07, 0x56, 0x61, 0x74, 0x44, 0x61, 0x74, 0x61, 0x22, 0x3a, 0x0a,
0x16, 0x47, 0x65, 0x74, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x4c, 0x69, 0x6e, 0x6b, 0x52,
0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x52, 0x65, 0x64, 0x69, 0x72,
0x65, 0x63, 0x74, 0x55, 0x52, 0x4c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x52, 0x65,
0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x55, 0x52, 0x4c, 0x32, 0xd4, 0x04, 0x0a, 0x10, 0x54, 0x72,
0x65, 0x61, 0x73, 0x75, 0x72, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x5f,
0x0a, 0x16, 0x47, 0x65, 0x74, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x4c, 0x69, 0x6e, 0x6b,
0x42, 0x61, 0x6e, 0x6b, 0x43, 0x61, 0x72, 0x64, 0x12, 0x20, 0x2e, 0x74, 0x72, 0x65, 0x61, 0x73,
0x75, 0x72, 0x65, 0x72, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x4c,
0x69, 0x6e, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x74, 0x72, 0x65,
0x61, 0x73, 0x75, 0x72, 0x65, 0x72, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e,
0x74, 0x4c, 0x69, 0x6e, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12,
0x5f, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x4c, 0x69, 0x6e,
0x6b, 0x59, 0x6f, 0x6f, 0x4d, 0x6f, 0x6e, 0x65, 0x79, 0x12, 0x20, 0x2e, 0x74, 0x72, 0x65, 0x61,
0x73, 0x75, 0x72, 0x65, 0x72, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74,
0x4c, 0x69, 0x6e, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x74, 0x72,
0x65, 0x61, 0x73, 0x75, 0x72, 0x65, 0x72, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x61, 0x79, 0x6d, 0x65,
0x6e, 0x74, 0x4c, 0x69, 0x6e, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00,
0x12, 0x5e, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x4c, 0x69,
0x6e, 0x6b, 0x54, 0x69, 0x6e, 0x6b, 0x6f, 0x66, 0x66, 0x12, 0x20, 0x2e, 0x74, 0x72, 0x65, 0x61,
0x73, 0x75, 0x72, 0x65, 0x72, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74,
0x4c, 0x69, 0x6e, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x74, 0x72,
0x65, 0x61, 0x73, 0x75, 0x72, 0x65, 0x72, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x61, 0x79, 0x6d, 0x65,
0x6e, 0x74, 0x4c, 0x69, 0x6e, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00,
0x12, 0x62, 0x0a, 0x19, 0x47, 0x65, 0x74, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x4c, 0x69,
0x6e, 0x6b, 0x53, 0x62, 0x65, 0x72, 0x62, 0x61, 0x6e, 0x6b, 0x42, 0x32, 0x42, 0x12, 0x20, 0x2e,
0x74, 0x72, 0x65, 0x61, 0x73, 0x75, 0x72, 0x65, 0x72, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x61, 0x79,
0x6d, 0x65, 0x6e, 0x74, 0x4c, 0x69, 0x6e, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
0x21, 0x2e, 0x74, 0x72, 0x65, 0x61, 0x73, 0x75, 0x72, 0x65, 0x72, 0x2e, 0x47, 0x65, 0x74, 0x50,
0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x4c, 0x69, 0x6e, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
0x73, 0x65, 0x22, 0x00, 0x12, 0x5a, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x50, 0x61, 0x79, 0x6d, 0x65,
0x6e, 0x74, 0x4c, 0x69, 0x6e, 0x6b, 0x53, 0x42, 0x50, 0x12, 0x20, 0x2e, 0x74, 0x72, 0x65, 0x61,
0x73, 0x75, 0x72, 0x65, 0x72, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74,
0x4c, 0x69, 0x6e, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x74, 0x72,
0x65, 0x61, 0x73, 0x75, 0x72, 0x65, 0x72, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x61, 0x79, 0x6d, 0x65,
0x6e, 0x74, 0x4c, 0x69, 0x6e, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00,
0x12, 0x5e, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x4c, 0x69,
0x6e, 0x6b, 0x53, 0x62, 0x65, 0x72, 0x50, 0x61, 0x79, 0x12, 0x20, 0x2e, 0x74, 0x72, 0x65, 0x61,
0x73, 0x75, 0x72, 0x65, 0x72, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74,
0x4c, 0x69, 0x6e, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x74, 0x72,
0x65, 0x61, 0x73, 0x75, 0x72, 0x65, 0x72, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x61, 0x79, 0x6d, 0x65,
0x6e, 0x74, 0x4c, 0x69, 0x6e, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00,
0x42, 0x0d, 0x5a, 0x0b, 0x2e, 0x2f, 0x74, 0x72, 0x65, 0x61, 0x73, 0x75, 0x72, 0x65, 0x72, 0x62,
0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_treasurer_service_proto_rawDescOnce sync.Once
file_treasurer_service_proto_rawDescData = file_treasurer_service_proto_rawDesc
)
func file_treasurer_service_proto_rawDescGZIP() []byte {
file_treasurer_service_proto_rawDescOnce.Do(func() {
file_treasurer_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_treasurer_service_proto_rawDescData)
})
return file_treasurer_service_proto_rawDescData
}
var file_treasurer_service_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
var file_treasurer_service_proto_goTypes = []interface{}{
(*GetBankCardPaymentLinkRequest)(nil), // 0: treasurer.GetBankCardPaymentLinkRequest
(*GetPaymentLinkRequest)(nil), // 1: treasurer.GetPaymentLinkRequest
(*GetB2BPaymentLinkRequest)(nil), // 2: treasurer.GetB2BPaymentLinkRequest
(*GetPaymentLinkResponse)(nil), // 3: treasurer.GetPaymentLinkResponse
(*MainPaymentSettings)(nil), // 4: treasurer.MainPaymentSettings
(*emptypb.Empty)(nil), // 5: google.protobuf.Empty
}
var file_treasurer_service_proto_depIdxs = []int32{
4, // 0: treasurer.GetBankCardPaymentLinkRequest.MainSettings:type_name -> treasurer.MainPaymentSettings
4, // 1: treasurer.GetPaymentLinkRequest.MainSettings:type_name -> treasurer.MainPaymentSettings
4, // 2: treasurer.GetB2BPaymentLinkRequest.MainSettings:type_name -> treasurer.MainPaymentSettings
5, // 3: treasurer.GetB2BPaymentLinkRequest.VatData:type_name -> google.protobuf.Empty
1, // 4: treasurer.TreasurerService.GetPaymentLinkBankCard:input_type -> treasurer.GetPaymentLinkRequest
1, // 5: treasurer.TreasurerService.GetPaymentLinkYooMoney:input_type -> treasurer.GetPaymentLinkRequest
1, // 6: treasurer.TreasurerService.GetPaymentLinkTinkoff:input_type -> treasurer.GetPaymentLinkRequest
1, // 7: treasurer.TreasurerService.GetPaymentLinkSberbankB2B:input_type -> treasurer.GetPaymentLinkRequest
1, // 8: treasurer.TreasurerService.GetPaymentLinkSBP:input_type -> treasurer.GetPaymentLinkRequest
1, // 9: treasurer.TreasurerService.GetPaymentLinkSberPay:input_type -> treasurer.GetPaymentLinkRequest
3, // 10: treasurer.TreasurerService.GetPaymentLinkBankCard:output_type -> treasurer.GetPaymentLinkResponse
3, // 11: treasurer.TreasurerService.GetPaymentLinkYooMoney:output_type -> treasurer.GetPaymentLinkResponse
3, // 12: treasurer.TreasurerService.GetPaymentLinkTinkoff:output_type -> treasurer.GetPaymentLinkResponse
3, // 13: treasurer.TreasurerService.GetPaymentLinkSberbankB2B:output_type -> treasurer.GetPaymentLinkResponse
3, // 14: treasurer.TreasurerService.GetPaymentLinkSBP:output_type -> treasurer.GetPaymentLinkResponse
3, // 15: treasurer.TreasurerService.GetPaymentLinkSberPay:output_type -> treasurer.GetPaymentLinkResponse
10, // [10:16] is the sub-list for method output_type
4, // [4:10] 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_treasurer_service_proto_init() }
func file_treasurer_service_proto_init() {
if File_treasurer_service_proto != nil {
return
}
file_treasurer_payment_model_proto_init()
if !protoimpl.UnsafeEnabled {
file_treasurer_service_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetBankCardPaymentLinkRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_treasurer_service_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetPaymentLinkRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_treasurer_service_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetB2BPaymentLinkRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_treasurer_service_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetPaymentLinkResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_treasurer_service_proto_rawDesc,
NumEnums: 0,
NumMessages: 4,
NumExtensions: 0,
NumServices: 1,
},
GoTypes: file_treasurer_service_proto_goTypes,
DependencyIndexes: file_treasurer_service_proto_depIdxs,
MessageInfos: file_treasurer_service_proto_msgTypes,
}.Build()
File_treasurer_service_proto = out.File
file_treasurer_service_proto_rawDesc = nil
file_treasurer_service_proto_goTypes = nil
file_treasurer_service_proto_depIdxs = nil
}

@ -0,0 +1,308 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.36.7
// protoc (unknown)
// source: treasurer/treasurer.proto
package treasurer
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
emptypb "google.golang.org/protobuf/types/known/emptypb"
reflect "reflect"
sync "sync"
unsafe "unsafe"
)
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 GetBankCardPaymentLinkRequest struct {
state protoimpl.MessageState `protogen:"open.v1"`
MainSettings *MainPaymentSettings `protobuf:"bytes,1,opt,name=MainSettings,proto3" json:"MainSettings,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *GetBankCardPaymentLinkRequest) Reset() {
*x = GetBankCardPaymentLinkRequest{}
mi := &file_treasurer_treasurer_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *GetBankCardPaymentLinkRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetBankCardPaymentLinkRequest) ProtoMessage() {}
func (x *GetBankCardPaymentLinkRequest) ProtoReflect() protoreflect.Message {
mi := &file_treasurer_treasurer_proto_msgTypes[0]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GetBankCardPaymentLinkRequest.ProtoReflect.Descriptor instead.
func (*GetBankCardPaymentLinkRequest) Descriptor() ([]byte, []int) {
return file_treasurer_treasurer_proto_rawDescGZIP(), []int{0}
}
func (x *GetBankCardPaymentLinkRequest) GetMainSettings() *MainPaymentSettings {
if x != nil {
return x.MainSettings
}
return nil
}
type GetPaymentLinkRequest struct {
state protoimpl.MessageState `protogen:"open.v1"`
MainSettings *MainPaymentSettings `protobuf:"bytes,1,opt,name=MainSettings,proto3" json:"MainSettings,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *GetPaymentLinkRequest) Reset() {
*x = GetPaymentLinkRequest{}
mi := &file_treasurer_treasurer_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *GetPaymentLinkRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetPaymentLinkRequest) ProtoMessage() {}
func (x *GetPaymentLinkRequest) ProtoReflect() protoreflect.Message {
mi := &file_treasurer_treasurer_proto_msgTypes[1]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GetPaymentLinkRequest.ProtoReflect.Descriptor instead.
func (*GetPaymentLinkRequest) Descriptor() ([]byte, []int) {
return file_treasurer_treasurer_proto_rawDescGZIP(), []int{1}
}
func (x *GetPaymentLinkRequest) GetMainSettings() *MainPaymentSettings {
if x != nil {
return x.MainSettings
}
return nil
}
type GetB2BPaymentLinkRequest struct {
state protoimpl.MessageState `protogen:"open.v1"`
MainSettings *MainPaymentSettings `protobuf:"bytes,1,opt,name=MainSettings,proto3" json:"MainSettings,omitempty"`
PaymentPurpose string `protobuf:"bytes,2,opt,name=PaymentPurpose,proto3" json:"PaymentPurpose,omitempty"`
VatData *emptypb.Empty `protobuf:"bytes,3,opt,name=VatData,proto3" json:"VatData,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *GetB2BPaymentLinkRequest) Reset() {
*x = GetB2BPaymentLinkRequest{}
mi := &file_treasurer_treasurer_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *GetB2BPaymentLinkRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetB2BPaymentLinkRequest) ProtoMessage() {}
func (x *GetB2BPaymentLinkRequest) ProtoReflect() protoreflect.Message {
mi := &file_treasurer_treasurer_proto_msgTypes[2]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GetB2BPaymentLinkRequest.ProtoReflect.Descriptor instead.
func (*GetB2BPaymentLinkRequest) Descriptor() ([]byte, []int) {
return file_treasurer_treasurer_proto_rawDescGZIP(), []int{2}
}
func (x *GetB2BPaymentLinkRequest) GetMainSettings() *MainPaymentSettings {
if x != nil {
return x.MainSettings
}
return nil
}
func (x *GetB2BPaymentLinkRequest) GetPaymentPurpose() string {
if x != nil {
return x.PaymentPurpose
}
return ""
}
func (x *GetB2BPaymentLinkRequest) GetVatData() *emptypb.Empty {
if x != nil {
return x.VatData
}
return nil
}
type GetPaymentLinkResponse struct {
state protoimpl.MessageState `protogen:"open.v1"`
RedirectURL string `protobuf:"bytes,1,opt,name=RedirectURL,proto3" json:"RedirectURL,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *GetPaymentLinkResponse) Reset() {
*x = GetPaymentLinkResponse{}
mi := &file_treasurer_treasurer_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *GetPaymentLinkResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetPaymentLinkResponse) ProtoMessage() {}
func (x *GetPaymentLinkResponse) ProtoReflect() protoreflect.Message {
mi := &file_treasurer_treasurer_proto_msgTypes[3]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GetPaymentLinkResponse.ProtoReflect.Descriptor instead.
func (*GetPaymentLinkResponse) Descriptor() ([]byte, []int) {
return file_treasurer_treasurer_proto_rawDescGZIP(), []int{3}
}
func (x *GetPaymentLinkResponse) GetRedirectURL() string {
if x != nil {
return x.RedirectURL
}
return ""
}
var File_treasurer_treasurer_proto protoreflect.FileDescriptor
const file_treasurer_treasurer_proto_rawDesc = "" +
"\n" +
"\x19treasurer/treasurer.proto\x12\ttreasurer\x1a\x1bgoogle/protobuf/empty.proto\x1a\x1dtreasurer/payment.model.proto\"c\n" +
"\x1dGetBankCardPaymentLinkRequest\x12B\n" +
"\fMainSettings\x18\x01 \x01(\v2\x1e.treasurer.MainPaymentSettingsR\fMainSettings\"[\n" +
"\x15GetPaymentLinkRequest\x12B\n" +
"\fMainSettings\x18\x01 \x01(\v2\x1e.treasurer.MainPaymentSettingsR\fMainSettings\"\xb8\x01\n" +
"\x18GetB2BPaymentLinkRequest\x12B\n" +
"\fMainSettings\x18\x01 \x01(\v2\x1e.treasurer.MainPaymentSettingsR\fMainSettings\x12&\n" +
"\x0ePaymentPurpose\x18\x02 \x01(\tR\x0ePaymentPurpose\x120\n" +
"\aVatData\x18\x03 \x01(\v2\x16.google.protobuf.EmptyR\aVatData\":\n" +
"\x16GetPaymentLinkResponse\x12 \n" +
"\vRedirectURL\x18\x01 \x01(\tR\vRedirectURL2\xd4\x04\n" +
"\x10TreasurerService\x12_\n" +
"\x16GetPaymentLinkBankCard\x12 .treasurer.GetPaymentLinkRequest\x1a!.treasurer.GetPaymentLinkResponse\"\x00\x12_\n" +
"\x16GetPaymentLinkYooMoney\x12 .treasurer.GetPaymentLinkRequest\x1a!.treasurer.GetPaymentLinkResponse\"\x00\x12^\n" +
"\x15GetPaymentLinkTinkoff\x12 .treasurer.GetPaymentLinkRequest\x1a!.treasurer.GetPaymentLinkResponse\"\x00\x12b\n" +
"\x19GetPaymentLinkSberbankB2B\x12 .treasurer.GetPaymentLinkRequest\x1a!.treasurer.GetPaymentLinkResponse\"\x00\x12Z\n" +
"\x11GetPaymentLinkSBP\x12 .treasurer.GetPaymentLinkRequest\x1a!.treasurer.GetPaymentLinkResponse\"\x00\x12^\n" +
"\x15GetPaymentLinkSberPay\x12 .treasurer.GetPaymentLinkRequest\x1a!.treasurer.GetPaymentLinkResponse\"\x00B\rZ\v./treasurerb\x06proto3"
var (
file_treasurer_treasurer_proto_rawDescOnce sync.Once
file_treasurer_treasurer_proto_rawDescData []byte
)
func file_treasurer_treasurer_proto_rawDescGZIP() []byte {
file_treasurer_treasurer_proto_rawDescOnce.Do(func() {
file_treasurer_treasurer_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_treasurer_treasurer_proto_rawDesc), len(file_treasurer_treasurer_proto_rawDesc)))
})
return file_treasurer_treasurer_proto_rawDescData
}
var file_treasurer_treasurer_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
var file_treasurer_treasurer_proto_goTypes = []any{
(*GetBankCardPaymentLinkRequest)(nil), // 0: treasurer.GetBankCardPaymentLinkRequest
(*GetPaymentLinkRequest)(nil), // 1: treasurer.GetPaymentLinkRequest
(*GetB2BPaymentLinkRequest)(nil), // 2: treasurer.GetB2BPaymentLinkRequest
(*GetPaymentLinkResponse)(nil), // 3: treasurer.GetPaymentLinkResponse
(*MainPaymentSettings)(nil), // 4: treasurer.MainPaymentSettings
(*emptypb.Empty)(nil), // 5: google.protobuf.Empty
}
var file_treasurer_treasurer_proto_depIdxs = []int32{
4, // 0: treasurer.GetBankCardPaymentLinkRequest.MainSettings:type_name -> treasurer.MainPaymentSettings
4, // 1: treasurer.GetPaymentLinkRequest.MainSettings:type_name -> treasurer.MainPaymentSettings
4, // 2: treasurer.GetB2BPaymentLinkRequest.MainSettings:type_name -> treasurer.MainPaymentSettings
5, // 3: treasurer.GetB2BPaymentLinkRequest.VatData:type_name -> google.protobuf.Empty
1, // 4: treasurer.TreasurerService.GetPaymentLinkBankCard:input_type -> treasurer.GetPaymentLinkRequest
1, // 5: treasurer.TreasurerService.GetPaymentLinkYooMoney:input_type -> treasurer.GetPaymentLinkRequest
1, // 6: treasurer.TreasurerService.GetPaymentLinkTinkoff:input_type -> treasurer.GetPaymentLinkRequest
1, // 7: treasurer.TreasurerService.GetPaymentLinkSberbankB2B:input_type -> treasurer.GetPaymentLinkRequest
1, // 8: treasurer.TreasurerService.GetPaymentLinkSBP:input_type -> treasurer.GetPaymentLinkRequest
1, // 9: treasurer.TreasurerService.GetPaymentLinkSberPay:input_type -> treasurer.GetPaymentLinkRequest
3, // 10: treasurer.TreasurerService.GetPaymentLinkBankCard:output_type -> treasurer.GetPaymentLinkResponse
3, // 11: treasurer.TreasurerService.GetPaymentLinkYooMoney:output_type -> treasurer.GetPaymentLinkResponse
3, // 12: treasurer.TreasurerService.GetPaymentLinkTinkoff:output_type -> treasurer.GetPaymentLinkResponse
3, // 13: treasurer.TreasurerService.GetPaymentLinkSberbankB2B:output_type -> treasurer.GetPaymentLinkResponse
3, // 14: treasurer.TreasurerService.GetPaymentLinkSBP:output_type -> treasurer.GetPaymentLinkResponse
3, // 15: treasurer.TreasurerService.GetPaymentLinkSberPay:output_type -> treasurer.GetPaymentLinkResponse
10, // [10:16] is the sub-list for method output_type
4, // [4:10] 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_treasurer_treasurer_proto_init() }
func file_treasurer_treasurer_proto_init() {
if File_treasurer_treasurer_proto != nil {
return
}
file_treasurer_payment_model_proto_init()
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: unsafe.Slice(unsafe.StringData(file_treasurer_treasurer_proto_rawDesc), len(file_treasurer_treasurer_proto_rawDesc)),
NumEnums: 0,
NumMessages: 4,
NumExtensions: 0,
NumServices: 1,
},
GoTypes: file_treasurer_treasurer_proto_goTypes,
DependencyIndexes: file_treasurer_treasurer_proto_depIdxs,
MessageInfos: file_treasurer_treasurer_proto_msgTypes,
}.Build()
File_treasurer_treasurer_proto = out.File
file_treasurer_treasurer_proto_goTypes = nil
file_treasurer_treasurer_proto_depIdxs = nil
}

@ -1,8 +1,8 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT. // Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions: // versions:
// - protoc-gen-go-grpc v1.3.0 // - protoc-gen-go-grpc v1.5.1
// - protoc (unknown) // - protoc (unknown)
// source: treasurer/service.proto // source: treasurer/treasurer.proto
package treasurer package treasurer
@ -15,8 +15,8 @@ import (
// This is a compile-time assertion to ensure that this generated file // This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against. // is compatible with the grpc package it is being compiled against.
// Requires gRPC-Go v1.32.0 or later. // Requires gRPC-Go v1.64.0 or later.
const _ = grpc.SupportPackageIsVersion7 const _ = grpc.SupportPackageIsVersion9
const ( const (
TreasurerService_GetPaymentLinkBankCard_FullMethodName = "/treasurer.TreasurerService/GetPaymentLinkBankCard" TreasurerService_GetPaymentLinkBankCard_FullMethodName = "/treasurer.TreasurerService/GetPaymentLinkBankCard"
@ -48,8 +48,9 @@ func NewTreasurerServiceClient(cc grpc.ClientConnInterface) TreasurerServiceClie
} }
func (c *treasurerServiceClient) GetPaymentLinkBankCard(ctx context.Context, in *GetPaymentLinkRequest, opts ...grpc.CallOption) (*GetPaymentLinkResponse, error) { func (c *treasurerServiceClient) GetPaymentLinkBankCard(ctx context.Context, in *GetPaymentLinkRequest, opts ...grpc.CallOption) (*GetPaymentLinkResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(GetPaymentLinkResponse) out := new(GetPaymentLinkResponse)
err := c.cc.Invoke(ctx, TreasurerService_GetPaymentLinkBankCard_FullMethodName, in, out, opts...) err := c.cc.Invoke(ctx, TreasurerService_GetPaymentLinkBankCard_FullMethodName, in, out, cOpts...)
if err != nil { if err != nil {
return nil, err return nil, err
} }
@ -57,8 +58,9 @@ func (c *treasurerServiceClient) GetPaymentLinkBankCard(ctx context.Context, in
} }
func (c *treasurerServiceClient) GetPaymentLinkYooMoney(ctx context.Context, in *GetPaymentLinkRequest, opts ...grpc.CallOption) (*GetPaymentLinkResponse, error) { func (c *treasurerServiceClient) GetPaymentLinkYooMoney(ctx context.Context, in *GetPaymentLinkRequest, opts ...grpc.CallOption) (*GetPaymentLinkResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(GetPaymentLinkResponse) out := new(GetPaymentLinkResponse)
err := c.cc.Invoke(ctx, TreasurerService_GetPaymentLinkYooMoney_FullMethodName, in, out, opts...) err := c.cc.Invoke(ctx, TreasurerService_GetPaymentLinkYooMoney_FullMethodName, in, out, cOpts...)
if err != nil { if err != nil {
return nil, err return nil, err
} }
@ -66,8 +68,9 @@ func (c *treasurerServiceClient) GetPaymentLinkYooMoney(ctx context.Context, in
} }
func (c *treasurerServiceClient) GetPaymentLinkTinkoff(ctx context.Context, in *GetPaymentLinkRequest, opts ...grpc.CallOption) (*GetPaymentLinkResponse, error) { func (c *treasurerServiceClient) GetPaymentLinkTinkoff(ctx context.Context, in *GetPaymentLinkRequest, opts ...grpc.CallOption) (*GetPaymentLinkResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(GetPaymentLinkResponse) out := new(GetPaymentLinkResponse)
err := c.cc.Invoke(ctx, TreasurerService_GetPaymentLinkTinkoff_FullMethodName, in, out, opts...) err := c.cc.Invoke(ctx, TreasurerService_GetPaymentLinkTinkoff_FullMethodName, in, out, cOpts...)
if err != nil { if err != nil {
return nil, err return nil, err
} }
@ -75,8 +78,9 @@ func (c *treasurerServiceClient) GetPaymentLinkTinkoff(ctx context.Context, in *
} }
func (c *treasurerServiceClient) GetPaymentLinkSberbankB2B(ctx context.Context, in *GetPaymentLinkRequest, opts ...grpc.CallOption) (*GetPaymentLinkResponse, error) { func (c *treasurerServiceClient) GetPaymentLinkSberbankB2B(ctx context.Context, in *GetPaymentLinkRequest, opts ...grpc.CallOption) (*GetPaymentLinkResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(GetPaymentLinkResponse) out := new(GetPaymentLinkResponse)
err := c.cc.Invoke(ctx, TreasurerService_GetPaymentLinkSberbankB2B_FullMethodName, in, out, opts...) err := c.cc.Invoke(ctx, TreasurerService_GetPaymentLinkSberbankB2B_FullMethodName, in, out, cOpts...)
if err != nil { if err != nil {
return nil, err return nil, err
} }
@ -84,8 +88,9 @@ func (c *treasurerServiceClient) GetPaymentLinkSberbankB2B(ctx context.Context,
} }
func (c *treasurerServiceClient) GetPaymentLinkSBP(ctx context.Context, in *GetPaymentLinkRequest, opts ...grpc.CallOption) (*GetPaymentLinkResponse, error) { func (c *treasurerServiceClient) GetPaymentLinkSBP(ctx context.Context, in *GetPaymentLinkRequest, opts ...grpc.CallOption) (*GetPaymentLinkResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(GetPaymentLinkResponse) out := new(GetPaymentLinkResponse)
err := c.cc.Invoke(ctx, TreasurerService_GetPaymentLinkSBP_FullMethodName, in, out, opts...) err := c.cc.Invoke(ctx, TreasurerService_GetPaymentLinkSBP_FullMethodName, in, out, cOpts...)
if err != nil { if err != nil {
return nil, err return nil, err
} }
@ -93,8 +98,9 @@ func (c *treasurerServiceClient) GetPaymentLinkSBP(ctx context.Context, in *GetP
} }
func (c *treasurerServiceClient) GetPaymentLinkSberPay(ctx context.Context, in *GetPaymentLinkRequest, opts ...grpc.CallOption) (*GetPaymentLinkResponse, error) { func (c *treasurerServiceClient) GetPaymentLinkSberPay(ctx context.Context, in *GetPaymentLinkRequest, opts ...grpc.CallOption) (*GetPaymentLinkResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(GetPaymentLinkResponse) out := new(GetPaymentLinkResponse)
err := c.cc.Invoke(ctx, TreasurerService_GetPaymentLinkSberPay_FullMethodName, in, out, opts...) err := c.cc.Invoke(ctx, TreasurerService_GetPaymentLinkSberPay_FullMethodName, in, out, cOpts...)
if err != nil { if err != nil {
return nil, err return nil, err
} }
@ -103,7 +109,7 @@ func (c *treasurerServiceClient) GetPaymentLinkSberPay(ctx context.Context, in *
// TreasurerServiceServer is the server API for TreasurerService service. // TreasurerServiceServer is the server API for TreasurerService service.
// All implementations should embed UnimplementedTreasurerServiceServer // All implementations should embed UnimplementedTreasurerServiceServer
// for forward compatibility // for forward compatibility.
type TreasurerServiceServer interface { type TreasurerServiceServer interface {
GetPaymentLinkBankCard(context.Context, *GetPaymentLinkRequest) (*GetPaymentLinkResponse, error) GetPaymentLinkBankCard(context.Context, *GetPaymentLinkRequest) (*GetPaymentLinkResponse, error)
GetPaymentLinkYooMoney(context.Context, *GetPaymentLinkRequest) (*GetPaymentLinkResponse, error) GetPaymentLinkYooMoney(context.Context, *GetPaymentLinkRequest) (*GetPaymentLinkResponse, error)
@ -113,9 +119,12 @@ type TreasurerServiceServer interface {
GetPaymentLinkSberPay(context.Context, *GetPaymentLinkRequest) (*GetPaymentLinkResponse, error) GetPaymentLinkSberPay(context.Context, *GetPaymentLinkRequest) (*GetPaymentLinkResponse, error)
} }
// UnimplementedTreasurerServiceServer should be embedded to have forward compatible implementations. // UnimplementedTreasurerServiceServer should be embedded to have
type UnimplementedTreasurerServiceServer struct { // forward compatible implementations.
} //
// NOTE: this should be embedded by value instead of pointer to avoid a nil
// pointer dereference when methods are called.
type UnimplementedTreasurerServiceServer struct{}
func (UnimplementedTreasurerServiceServer) GetPaymentLinkBankCard(context.Context, *GetPaymentLinkRequest) (*GetPaymentLinkResponse, error) { func (UnimplementedTreasurerServiceServer) GetPaymentLinkBankCard(context.Context, *GetPaymentLinkRequest) (*GetPaymentLinkResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetPaymentLinkBankCard not implemented") return nil, status.Errorf(codes.Unimplemented, "method GetPaymentLinkBankCard not implemented")
@ -135,6 +144,7 @@ func (UnimplementedTreasurerServiceServer) GetPaymentLinkSBP(context.Context, *G
func (UnimplementedTreasurerServiceServer) GetPaymentLinkSberPay(context.Context, *GetPaymentLinkRequest) (*GetPaymentLinkResponse, error) { func (UnimplementedTreasurerServiceServer) GetPaymentLinkSberPay(context.Context, *GetPaymentLinkRequest) (*GetPaymentLinkResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetPaymentLinkSberPay not implemented") return nil, status.Errorf(codes.Unimplemented, "method GetPaymentLinkSberPay not implemented")
} }
func (UnimplementedTreasurerServiceServer) testEmbeddedByValue() {}
// UnsafeTreasurerServiceServer may be embedded to opt out of forward compatibility for this service. // UnsafeTreasurerServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to TreasurerServiceServer will // Use of this interface is not recommended, as added methods to TreasurerServiceServer will
@ -144,6 +154,13 @@ type UnsafeTreasurerServiceServer interface {
} }
func RegisterTreasurerServiceServer(s grpc.ServiceRegistrar, srv TreasurerServiceServer) { func RegisterTreasurerServiceServer(s grpc.ServiceRegistrar, srv TreasurerServiceServer) {
// If the following call pancis, it indicates UnimplementedTreasurerServiceServer was
// embedded by pointer and is nil. This will cause panics if an
// unimplemented method is ever invoked, so we test this at initialization
// time to prevent it from happening at runtime later due to I/O.
if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
t.testEmbeddedByValue()
}
s.RegisterService(&TreasurerService_ServiceDesc, srv) s.RegisterService(&TreasurerService_ServiceDesc, srv)
} }
@ -288,5 +305,5 @@ var TreasurerService_ServiceDesc = grpc.ServiceDesc{
}, },
}, },
Streams: []grpc.StreamDesc{}, Streams: []grpc.StreamDesc{},
Metadata: "treasurer/service.proto", Metadata: "treasurer/treasurer.proto",
} }

@ -7,8 +7,8 @@ import (
"gitea.pena/PenaSide/customer/internal/errors" "gitea.pena/PenaSide/customer/internal/errors"
"gitea.pena/PenaSide/customer/internal/initialize" "gitea.pena/PenaSide/customer/internal/initialize"
payment_callback "gitea.pena/PenaSide/customer/internal/proto/callback"
"gitea.pena/PenaSide/customer/internal/proto/customer" "gitea.pena/PenaSide/customer/internal/proto/customer"
"gitea.pena/PenaSide/customer/internal/proto/payment_callback"
grpc_middleware "github.com/grpc-ecosystem/go-grpc-middleware" grpc_middleware "github.com/grpc-ecosystem/go-grpc-middleware"
grpc_zap "github.com/grpc-ecosystem/go-grpc-middleware/logging/zap" grpc_zap "github.com/grpc-ecosystem/go-grpc-middleware/logging/zap"
grpc_recovery "github.com/grpc-ecosystem/go-grpc-middleware/recovery" grpc_recovery "github.com/grpc-ecosystem/go-grpc-middleware/recovery"