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

This commit is contained in:
skeris 2025-08-14 00:45:10 +03:00
parent c5e7cfc8d5
commit 88ba962910
23 changed files with 2411 additions and 1820 deletions

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

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

@ -5,12 +5,12 @@ import (
"fmt"
"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/proto/treasurer"
"gitea.pena/PenaSide/customer/pkg/validate"
"go.uber.org/zap"
"google.golang.org/grpc"
"google.golang.org/grpc/credentials/insecure"
)
type PaymentClientDeps struct {

@ -2,9 +2,10 @@ package payment
import (
"context"
"gitea.pena/PenaSide/hlog"
"log"
"gitea.pena/PenaSide/hlog"
"gitea.pena/PenaSide/customer/internal/errors"
"gitea.pena/PenaSide/customer/internal/models"
"gitea.pena/PenaSide/customer/internal/proto/payment_callback"

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

@ -0,0 +1,196 @@
// 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
import (
context "context"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
emptypb "google.golang.org/protobuf/types/known/emptypb"
)
// 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.64.0 or later.
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.
//
// 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 PaymentCallbackServiceClient interface {
OnSuccess(ctx context.Context, in *Event, opts ...grpc.CallOption) (*emptypb.Empty, error)
OnFailure(ctx context.Context, in *Event, opts ...grpc.CallOption) (*emptypb.Empty, error)
OnCartPurchase(ctx context.Context, in *Event, opts ...grpc.CallOption) (*emptypb.Empty, error)
}
type paymentCallbackServiceClient struct {
cc grpc.ClientConnInterface
}
func NewPaymentCallbackServiceClient(cc grpc.ClientConnInterface) PaymentCallbackServiceClient {
return &paymentCallbackServiceClient{cc}
}
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)
err := c.cc.Invoke(ctx, PaymentCallbackService_OnSuccess_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
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)
err := c.cc.Invoke(ctx, PaymentCallbackService_OnFailure_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
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)
err := c.cc.Invoke(ctx, PaymentCallbackService_OnCartPurchase_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
// PaymentCallbackServiceServer is the server API for PaymentCallbackService service.
// All implementations should embed UnimplementedPaymentCallbackServiceServer
// for forward compatibility.
type PaymentCallbackServiceServer interface {
OnSuccess(context.Context, *Event) (*emptypb.Empty, error)
OnFailure(context.Context, *Event) (*emptypb.Empty, error)
OnCartPurchase(context.Context, *Event) (*emptypb.Empty, error)
}
// UnimplementedPaymentCallbackServiceServer should be embedded to have
// 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) {
return nil, status.Errorf(codes.Unimplemented, "method OnSuccess not implemented")
}
func (UnimplementedPaymentCallbackServiceServer) OnFailure(context.Context, *Event) (*emptypb.Empty, error) {
return nil, status.Errorf(codes.Unimplemented, "method OnFailure not implemented")
}
func (UnimplementedPaymentCallbackServiceServer) OnCartPurchase(context.Context, *Event) (*emptypb.Empty, error) {
return nil, status.Errorf(codes.Unimplemented, "method OnCartPurchase not implemented")
}
func (UnimplementedPaymentCallbackServiceServer) testEmbeddedByValue() {}
// 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
// result in compilation errors.
type UnsafePaymentCallbackServiceServer interface {
mustEmbedUnimplementedPaymentCallbackServiceServer()
}
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)
}
func _PaymentCallbackService_OnSuccess_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(Event)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(PaymentCallbackServiceServer).OnSuccess(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: PaymentCallbackService_OnSuccess_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(PaymentCallbackServiceServer).OnSuccess(ctx, req.(*Event))
}
return interceptor(ctx, in, info, handler)
}
func _PaymentCallbackService_OnFailure_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(Event)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(PaymentCallbackServiceServer).OnFailure(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: PaymentCallbackService_OnFailure_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(PaymentCallbackServiceServer).OnFailure(ctx, req.(*Event))
}
return interceptor(ctx, in, info, handler)
}
func _PaymentCallbackService_OnCartPurchase_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(Event)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(PaymentCallbackServiceServer).OnCartPurchase(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: PaymentCallbackService_OnCartPurchase_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(PaymentCallbackServiceServer).OnCartPurchase(ctx, req.(*Event))
}
return interceptor(ctx, in, info, handler)
}
// PaymentCallbackService_ServiceDesc is the grpc.ServiceDesc for PaymentCallbackService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var PaymentCallbackService_ServiceDesc = grpc.ServiceDesc{
ServiceName: "payment_callback.PaymentCallbackService",
HandlerType: (*PaymentCallbackServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "OnSuccess",
Handler: _PaymentCallbackService_OnSuccess_Handler,
},
{
MethodName: "OnFailure",
Handler: _PaymentCallbackService_OnFailure_Handler,
},
{
MethodName: "OnCartPurchase",
Handler: _PaymentCallbackService_OnCartPurchase_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "callback/callback.proto",
}

@ -1,8 +1,8 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.25.0-devel
// protoc v3.14.0
// source: promo.proto
// protoc-gen-go v1.36.7
// protoc (unknown)
// source: codeword/promo.proto
package codeword_rpc
@ -11,6 +11,7 @@ import (
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
unsafe "unsafe"
)
const (
@ -21,22 +22,19 @@ const (
)
type Time struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
state protoimpl.MessageState `protogen:"open.v1"`
From int64 `protobuf:"varint,1,opt,name=from,proto3" json:"from,omitempty"`
To int64 `protobuf:"varint,2,opt,name=to,proto3" json:"to,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *Time) Reset() {
*x = Time{}
if protoimpl.UnsafeEnabled {
mi := &file_promo_proto_msgTypes[0]
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)
@ -45,8 +43,8 @@ func (x *Time) String() string {
func (*Time) ProtoMessage() {}
func (x *Time) ProtoReflect() protoreflect.Message {
mi := &file_promo_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
mi := &file_codeword_promo_proto_msgTypes[0]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@ -58,7 +56,7 @@ func (x *Time) ProtoReflect() protoreflect.Message {
// Deprecated: Use Time.ProtoReflect.Descriptor instead.
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 {
@ -76,22 +74,19 @@ func (x *Time) GetTo() int64 {
}
type PromoActivationResp struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
state protoimpl.MessageState `protogen:"open.v1"`
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"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *PromoActivationResp) Reset() {
*x = PromoActivationResp{}
if protoimpl.UnsafeEnabled {
mi := &file_promo_proto_msgTypes[1]
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)
@ -100,8 +95,8 @@ func (x *PromoActivationResp) String() string {
func (*PromoActivationResp) ProtoMessage() {}
func (x *PromoActivationResp) ProtoReflect() protoreflect.Message {
mi := &file_promo_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
mi := &file_codeword_promo_proto_msgTypes[1]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@ -113,7 +108,7 @@ func (x *PromoActivationResp) ProtoReflect() protoreflect.Message {
// Deprecated: Use PromoActivationResp.ProtoReflect.Descriptor instead.
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 {
@ -131,22 +126,19 @@ func (x *PromoActivationResp) GetUsers() []*PromoActivationResp_UserTime {
}
type PromoActivationResp_UserTime struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
state protoimpl.MessageState `protogen:"open.v1"`
UserID string `protobuf:"bytes,1,opt,name=UserID,proto3" json:"UserID,omitempty"`
Time int64 `protobuf:"varint,2,opt,name=Time,proto3" json:"Time,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *PromoActivationResp_UserTime) Reset() {
*x = PromoActivationResp_UserTime{}
if protoimpl.UnsafeEnabled {
mi := &file_promo_proto_msgTypes[2]
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)
@ -155,8 +147,8 @@ func (x *PromoActivationResp_UserTime) String() string {
func (*PromoActivationResp_UserTime) ProtoMessage() {}
func (x *PromoActivationResp_UserTime) ProtoReflect() protoreflect.Message {
mi := &file_promo_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
mi := &file_codeword_promo_proto_msgTypes[2]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@ -168,7 +160,7 @@ func (x *PromoActivationResp_UserTime) ProtoReflect() protoreflect.Message {
// Deprecated: Use PromoActivationResp_UserTime.ProtoReflect.Descriptor instead.
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 {
@ -185,52 +177,42 @@ func (x *PromoActivationResp_UserTime) GetTime() int64 {
return 0
}
var File_promo_proto protoreflect.FileDescriptor
var File_codeword_promo_proto protoreflect.FileDescriptor
var file_promo_proto_rawDesc = []byte{
0x0a, 0x0b, 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,
}
const file_codeword_promo_proto_rawDesc = "" +
"\n" +
"\x14codeword/promo.proto\x12\bcodeword\"*\n" +
"\x04Time\x12\x12\n" +
"\x04from\x18\x01 \x01(\x03R\x04from\x12\x0e\n" +
"\x02to\x18\x02 \x01(\x03R\x02to\"\x9b\x01\n" +
"\x13PromoActivationResp\x12\x0e\n" +
"\x02ID\x18\x01 \x01(\tR\x02ID\x12<\n" +
"\x05Users\x18\x02 \x03(\v2&.codeword.PromoActivationResp.UserTimeR\x05Users\x1a6\n" +
"\bUserTime\x12\x16\n" +
"\x06UserID\x18\x01 \x01(\tR\x06UserID\x12\x12\n" +
"\x04Time\x18\x02 \x01(\x03R\x04Time2]\n" +
"\x10PromoCodeService\x12I\n" +
"\x16GetAllPromoActivations\x12\x0e.codeword.Time\x1a\x1d.codeword.PromoActivationResp0\x01B\x10Z\x0e./codeword_rpcb\x06proto3"
var (
file_promo_proto_rawDescOnce sync.Once
file_promo_proto_rawDescData = file_promo_proto_rawDesc
file_codeword_promo_proto_rawDescOnce sync.Once
file_codeword_promo_proto_rawDescData []byte
)
func file_promo_proto_rawDescGZIP() []byte {
file_promo_proto_rawDescOnce.Do(func() {
file_promo_proto_rawDescData = protoimpl.X.CompressGZIP(file_promo_proto_rawDescData)
func file_codeword_promo_proto_rawDescGZIP() []byte {
file_codeword_promo_proto_rawDescOnce.Do(func() {
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_promo_proto_goTypes = []interface{}{
var file_codeword_promo_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
var file_codeword_promo_proto_goTypes = []any{
(*Time)(nil), // 0: codeword.Time
(*PromoActivationResp)(nil), // 1: codeword.PromoActivationResp
(*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
0, // 1: codeword.PromoCodeService.GetAllPromoActivations:input_type -> codeword.Time
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
}
func init() { file_promo_proto_init() }
func file_promo_proto_init() {
if File_promo_proto != nil {
func init() { file_codeword_promo_proto_init() }
func file_codeword_promo_proto_init() {
if File_codeword_promo_proto != nil {
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{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
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,
NumMessages: 3,
NumExtensions: 0,
NumServices: 1,
},
GoTypes: file_promo_proto_goTypes,
DependencyIndexes: file_promo_proto_depIdxs,
MessageInfos: file_promo_proto_msgTypes,
GoTypes: file_codeword_promo_proto_goTypes,
DependencyIndexes: file_codeword_promo_proto_depIdxs,
MessageInfos: file_codeword_promo_proto_msgTypes,
}.Build()
File_promo_proto = out.File
file_promo_proto_rawDesc = nil
file_promo_proto_goTypes = nil
file_promo_proto_depIdxs = nil
File_codeword_promo_proto = out.File
file_codeword_promo_proto_goTypes = nil
file_codeword_promo_proto_depIdxs = nil
}

@ -1,4 +1,8 @@
// 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
@ -11,14 +15,18 @@ import (
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
// Requires gRPC-Go v1.32.0 or later.
const _ = grpc.SupportPackageIsVersion7
// Requires gRPC-Go v1.64.0 or later.
const _ = grpc.SupportPackageIsVersion9
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)
GetAllPromoActivations(ctx context.Context, in *Time, opts ...grpc.CallOption) (grpc.ServerStreamingClient[PromoActivationResp], error)
}
type promoCodeServiceClient struct {
@ -29,12 +37,13 @@ func NewPromoCodeServiceClient(cc grpc.ClientConnInterface) PromoCodeServiceClie
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], "/codeword.PromoCodeService/GetAllPromoActivations", opts...)
func (c *promoCodeServiceClient) GetAllPromoActivations(ctx context.Context, in *Time, opts ...grpc.CallOption) (grpc.ServerStreamingClient[PromoActivationResp], error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
stream, err := c.cc.NewStream(ctx, &PromoCodeService_ServiceDesc.Streams[0], PromoCodeService_GetAllPromoActivations_FullMethodName, cOpts...)
if err != nil {
return nil, err
}
x := &promoCodeServiceGetAllPromoActivationsClient{stream}
x := &grpc.GenericClientStream[Time, PromoActivationResp]{ClientStream: stream}
if err := x.ClientStream.SendMsg(in); err != nil {
return nil, err
}
@ -44,39 +53,27 @@ func (c *promoCodeServiceClient) GetAllPromoActivations(ctx context.Context, in
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
}
// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type PromoCodeService_GetAllPromoActivationsClient = grpc.ServerStreamingClient[PromoActivationResp]
// PromoCodeServiceServer is the server API for PromoCodeService service.
// All implementations must embed UnimplementedPromoCodeServiceServer
// for forward compatibility
// All implementations should embed UnimplementedPromoCodeServiceServer
// for forward compatibility.
type PromoCodeServiceServer interface {
GetAllPromoActivations(*Time, PromoCodeService_GetAllPromoActivationsServer) error
mustEmbedUnimplementedPromoCodeServiceServer()
GetAllPromoActivations(*Time, grpc.ServerStreamingServer[PromoActivationResp]) error
}
// UnimplementedPromoCodeServiceServer must be embedded to have forward compatible implementations.
type UnimplementedPromoCodeServiceServer struct {
}
// UnimplementedPromoCodeServiceServer should be embedded to have
// 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")
}
func (UnimplementedPromoCodeServiceServer) mustEmbedUnimplementedPromoCodeServiceServer() {}
func (UnimplementedPromoCodeServiceServer) testEmbeddedByValue() {}
// 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
@ -86,6 +83,13 @@ type UnsafePromoCodeServiceServer interface {
}
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)
}
@ -94,21 +98,11 @@ func _PromoCodeService_GetAllPromoActivations_Handler(srv interface{}, stream gr
if err := stream.RecvMsg(m); err != nil {
return err
}
return srv.(PromoCodeServiceServer).GetAllPromoActivations(m, &promoCodeServiceGetAllPromoActivationsServer{stream})
return srv.(PromoCodeServiceServer).GetAllPromoActivations(m, &grpc.GenericServerStream[Time, PromoActivationResp]{ServerStream: 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)
}
// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type PromoCodeService_GetAllPromoActivationsServer = grpc.ServerStreamingServer[PromoActivationResp]
// PromoCodeService_ServiceDesc is the grpc.ServiceDesc for PromoCodeService service.
// It's only intended for direct use with grpc.RegisterService,
@ -124,5 +118,5 @@ var PromoCodeService_ServiceDesc = grpc.ServiceDesc{
ServerStreams: true,
},
},
Metadata: "promo.proto",
Metadata: "codeword/promo.proto",
}

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

@ -1,6 +1,6 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.3.0
// - protoc-gen-go-grpc v1.5.1
// - protoc (unknown)
// source: customer/service.proto
@ -16,11 +16,12 @@ import (
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
// Requires gRPC-Go v1.32.0 or later.
const _ = grpc.SupportPackageIsVersion7
// Requires gRPC-Go v1.64.0 or later.
const _ = grpc.SupportPackageIsVersion9
const (
CustomerService_InsertHistory_FullMethodName = "/customer.CustomerService/InsertHistory"
CustomerService_SetAccountVerificationStatus_FullMethodName = "/customer.CustomerService/SetAccountVerificationStatus"
)
// 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) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
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 {
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) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
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 {
return nil, err
}
@ -58,17 +61,19 @@ func (c *customerServiceClient) SetAccountVerificationStatus(ctx context.Context
}
// CustomerServiceServer is the server API for CustomerService service.
// All implementations must embed UnimplementedCustomerServiceServer
// for forward compatibility
// All implementations should embed UnimplementedCustomerServiceServer
// for forward compatibility.
type CustomerServiceServer interface {
InsertHistory(context.Context, *History) (*emptypb.Empty, error)
SetAccountVerificationStatus(context.Context, *SetVerificationReq) (*Account, error)
mustEmbedUnimplementedCustomerServiceServer()
}
// UnimplementedCustomerServiceServer must be embedded to have forward compatible implementations.
type UnimplementedCustomerServiceServer struct {
}
// UnimplementedCustomerServiceServer should be embedded to have
// 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) {
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) {
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.
// 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) {
// 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)
}
@ -117,7 +129,7 @@ func _CustomerService_SetAccountVerificationStatus_Handler(srv interface{}, ctx
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/customer.CustomerService/SetAccountVerificationStatus",
FullMethod: CustomerService_SetAccountVerificationStatus_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(CustomerServiceServer).SetAccountVerificationStatus(ctx, req.(*SetVerificationReq))
@ -142,5 +154,5 @@ var CustomerService_ServiceDesc = grpc.ServiceDesc{
},
},
Streams: []grpc.StreamDesc{},
Metadata: "service.proto",
Metadata: "customer/service.proto",
}

@ -1,6 +1,6 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.33.0
// protoc-gen-go v1.36.7
// protoc (unknown)
// source: discount/audit.model.proto
@ -14,6 +14,7 @@ import (
timestamppb "google.golang.org/protobuf/types/known/timestamppb"
reflect "reflect"
sync "sync"
unsafe "unsafe"
)
const (
@ -24,24 +25,21 @@ const (
)
type Audit struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
state protoimpl.MessageState `protogen:"open.v1"`
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"`
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"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *Audit) Reset() {
*x = Audit{}
if protoimpl.UnsafeEnabled {
mi := &file_discount_audit_model_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Audit) String() string {
return protoimpl.X.MessageStringOf(x)
@ -51,7 +49,7 @@ func (*Audit) ProtoMessage() {}
func (x *Audit) ProtoReflect() protoreflect.Message {
mi := &file_discount_audit_model_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
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_rawDesc = []byte{
0x0a, 0x1a, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x2f, 0x61, 0x75, 0x64, 0x69, 0x74,
0x2e, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 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, 0x22, 0xe2, 0x01, 0x0a, 0x05, 0x41, 0x75, 0x64, 0x69, 0x74, 0x12, 0x38, 0x0a, 0x09,
0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 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, 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,
}
const file_discount_audit_model_proto_rawDesc = "" +
"\n" +
"\x1adiscount/audit.model.proto\x12\bdiscount\x1a\x1cgoogle/api/annotations.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1bgoogle/protobuf/empty.proto\"\xe2\x01\n" +
"\x05Audit\x128\n" +
"\tUpdatedAt\x18\x01 \x01(\v2\x1a.google.protobuf.TimestampR\tUpdatedAt\x128\n" +
"\tCreatedAt\x18\x02 \x01(\v2\x1a.google.protobuf.TimestampR\tCreatedAt\x12=\n" +
"\tDeletedAt\x18\x03 \x01(\v2\x1a.google.protobuf.TimestampH\x00R\tDeletedAt\x88\x01\x01\x12\x18\n" +
"\aDeleted\x18\x04 \x01(\bR\aDeletedB\f\n" +
"\n" +
"_DeletedAtB\fZ\n" +
"./discountb\x06proto3"
var (
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 {
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
}
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
(*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 {
return
}
if !protoimpl.UnsafeEnabled {
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{}{}
file_discount_audit_model_proto_msgTypes[0].OneofWrappers = []any{}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
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,
NumMessages: 1,
NumExtensions: 0,
@ -186,7 +155,6 @@ func file_discount_audit_model_proto_init() {
MessageInfos: file_discount_audit_model_proto_msgTypes,
}.Build()
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_depIdxs = nil
}

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

@ -1,6 +1,6 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.33.0
// protoc-gen-go v1.36.7
// protoc (unknown)
// source: discount/service.proto
@ -14,6 +14,7 @@ import (
timestamppb "google.golang.org/protobuf/types/known/timestamppb"
reflect "reflect"
sync "sync"
unsafe "unsafe"
)
const (
@ -24,21 +25,18 @@ const (
)
type GetDiscountByIDRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
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{}
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)
@ -48,7 +46,7 @@ func (*GetDiscountByIDRequest) ProtoMessage() {}
func (x *GetDiscountByIDRequest) ProtoReflect() protoreflect.Message {
mi := &file_discount_service_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@ -71,24 +69,21 @@ func (x *GetDiscountByIDRequest) GetID() string {
}
type ApplyDiscountRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
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{}
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)
@ -98,7 +93,7 @@ func (*ApplyDiscountRequest) ProtoMessage() {}
func (x *ApplyDiscountRequest) ProtoReflect() protoreflect.Message {
mi := &file_discount_service_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@ -142,22 +137,19 @@ func (x *ApplyDiscountRequest) GetCoupon() string {
}
type ApplyDiscountResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
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{}
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)
@ -167,7 +159,7 @@ func (*ApplyDiscountResponse) ProtoMessage() {}
func (x *ApplyDiscountResponse) ProtoReflect() protoreflect.Message {
mi := &file_discount_service_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@ -197,25 +189,22 @@ func (x *ApplyDiscountResponse) GetAppliedDiscounts() []*Discount {
}
type CreateDiscountRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
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{}
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)
@ -225,7 +214,7 @@ func (*CreateDiscountRequest) ProtoMessage() {}
func (x *CreateDiscountRequest) ProtoReflect() protoreflect.Message {
mi := &file_discount_service_proto_msgTypes[3]
if protoimpl.UnsafeEnabled && x != nil {
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@ -277,129 +266,53 @@ func (x *CreateDiscountRequest) GetTarget() *DiscountCalculationTarget {
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,
}
const file_discount_service_proto_rawDesc = "" +
"\n" +
"\x16discount/service.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_service_proto_rawDescOnce sync.Once
file_discount_service_proto_rawDescData = file_discount_service_proto_rawDesc
file_discount_service_proto_rawDescData []byte
)
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)
file_discount_service_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_discount_service_proto_rawDesc), len(file_discount_service_proto_rawDesc)))
})
return file_discount_service_proto_rawDescData
}
var file_discount_service_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
var file_discount_service_proto_goTypes = []interface{}{
var file_discount_service_proto_goTypes = []any{
(*GetDiscountByIDRequest)(nil), // 0: discount.GetDiscountByIDRequest
(*ApplyDiscountRequest)(nil), // 1: discount.ApplyDiscountRequest
(*ApplyDiscountResponse)(nil), // 2: discount.ApplyDiscountResponse
@ -452,62 +365,12 @@ func file_discount_service_proto_init() {
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{}{}
file_discount_service_proto_msgTypes[1].OneofWrappers = []any{}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_discount_service_proto_rawDesc,
RawDescriptor: unsafe.Slice(unsafe.StringData(file_discount_service_proto_rawDesc), len(file_discount_service_proto_rawDesc)),
NumEnums: 0,
NumMessages: 4,
NumExtensions: 0,
@ -518,7 +381,6 @@ func file_discount_service_proto_init() {
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
}

@ -1,6 +1,6 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.3.0
// - protoc-gen-go-grpc v1.5.1
// - protoc (unknown)
// source: discount/service.proto
@ -16,8 +16,8 @@ import (
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
// Requires gRPC-Go v1.32.0 or later.
const _ = grpc.SupportPackageIsVersion7
// Requires gRPC-Go v1.64.0 or later.
const _ = grpc.SupportPackageIsVersion9
const (
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) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
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 {
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) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
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 {
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) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
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 {
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) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
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 {
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) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
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 {
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) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
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 {
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) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
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 {
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) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
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 {
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) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
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 {
return nil, err
}
@ -137,7 +146,7 @@ func (c *discountServiceClient) DeleteDiscount(ctx context.Context, in *GetDisco
// DiscountServiceServer is the server API for DiscountService service.
// All implementations should embed UnimplementedDiscountServiceServer
// for forward compatibility
// for forward compatibility.
type DiscountServiceServer interface {
GetAllDiscounts(context.Context, *emptypb.Empty) (*Discounts, error)
GetUserDiscounts(context.Context, *GetDiscountByIDRequest) (*Discounts, error)
@ -150,9 +159,12 @@ type DiscountServiceServer interface {
DeleteDiscount(context.Context, *GetDiscountByIDRequest) (*Discount, error)
}
// UnimplementedDiscountServiceServer should be embedded to have forward compatible implementations.
type UnimplementedDiscountServiceServer struct {
}
// UnimplementedDiscountServiceServer should be embedded to have
// 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) {
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) {
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.
// 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) {
// 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)
}

@ -0,0 +1,103 @@
// Copyright (c) 2015, Google Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.36.7
// protoc (unknown)
// source: google/api/annotations.proto
package annotations
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
descriptorpb "google.golang.org/protobuf/types/descriptorpb"
reflect "reflect"
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)
)
var file_google_api_annotations_proto_extTypes = []protoimpl.ExtensionInfo{
{
ExtendedType: (*descriptorpb.MethodOptions)(nil),
ExtensionType: (*HttpRule)(nil),
Field: 72295728,
Name: "google.api.http",
Tag: "bytes,72295728,opt,name=http",
Filename: "google/api/annotations.proto",
},
}
// Extension fields to descriptorpb.MethodOptions.
var (
// See `HttpRule`.
//
// optional google.api.HttpRule http = 72295728;
E_Http = &file_google_api_annotations_proto_extTypes[0]
)
var File_google_api_annotations_proto protoreflect.FileDescriptor
const file_google_api_annotations_proto_rawDesc = "" +
"\n" +
"\x1cgoogle/api/annotations.proto\x12\n" +
"google.api\x1a\x15google/api/http.proto\x1a google/protobuf/descriptor.proto:K\n" +
"\x04http\x12\x1e.google.protobuf.MethodOptions\x18\xb0ʼ\" \x01(\v2\x14.google.api.HttpRuleR\x04httpBn\n" +
"\x0ecom.google.apiB\x10AnnotationsProtoP\x01ZAgoogle.golang.org/genproto/googleapis/api/annotations;annotations\xa2\x02\x04GAPIb\x06proto3"
var file_google_api_annotations_proto_goTypes = []any{
(*descriptorpb.MethodOptions)(nil), // 0: google.protobuf.MethodOptions
(*HttpRule)(nil), // 1: google.api.HttpRule
}
var file_google_api_annotations_proto_depIdxs = []int32{
0, // 0: google.api.http:extendee -> google.protobuf.MethodOptions
1, // 1: google.api.http:type_name -> google.api.HttpRule
2, // [2:2] is the sub-list for method output_type
2, // [2:2] is the sub-list for method input_type
1, // [1:2] is the sub-list for extension type_name
0, // [0:1] is the sub-list for extension extendee
0, // [0:0] is the sub-list for field type_name
}
func init() { file_google_api_annotations_proto_init() }
func file_google_api_annotations_proto_init() {
if File_google_api_annotations_proto != nil {
return
}
file_google_api_http_proto_init()
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: unsafe.Slice(unsafe.StringData(file_google_api_annotations_proto_rawDesc), len(file_google_api_annotations_proto_rawDesc)),
NumEnums: 0,
NumMessages: 0,
NumExtensions: 1,
NumServices: 0,
},
GoTypes: file_google_api_annotations_proto_goTypes,
DependencyIndexes: file_google_api_annotations_proto_depIdxs,
ExtensionInfos: file_google_api_annotations_proto_extTypes,
}.Build()
File_google_api_annotations_proto = out.File
file_google_api_annotations_proto_goTypes = nil
file_google_api_annotations_proto_depIdxs = nil
}

@ -0,0 +1,720 @@
// Copyright 2020 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.36.7
// protoc (unknown)
// source: google/api/http.proto
package annotations
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
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)
)
// Defines the HTTP configuration for an API service. It contains a list of
// [HttpRule][google.api.HttpRule], each specifying the mapping of an RPC method
// to one or more HTTP REST API methods.
type Http struct {
state protoimpl.MessageState `protogen:"open.v1"`
// A list of HTTP configuration rules that apply to individual API methods.
//
// **NOTE:** All service configuration rules follow "last one wins" order.
Rules []*HttpRule `protobuf:"bytes,1,rep,name=rules,proto3" json:"rules,omitempty"`
// When set to true, URL path parameters will be fully URI-decoded except in
// cases of single segment matches in reserved expansion, where "%2F" will be
// left encoded.
//
// The default behavior is to not decode RFC 6570 reserved characters in multi
// segment matches.
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() {
*x = Http{}
mi := &file_google_api_http_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *Http) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Http) ProtoMessage() {}
func (x *Http) ProtoReflect() protoreflect.Message {
mi := &file_google_api_http_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 Http.ProtoReflect.Descriptor instead.
func (*Http) Descriptor() ([]byte, []int) {
return file_google_api_http_proto_rawDescGZIP(), []int{0}
}
func (x *Http) GetRules() []*HttpRule {
if x != nil {
return x.Rules
}
return nil
}
func (x *Http) GetFullyDecodeReservedExpansion() bool {
if x != nil {
return x.FullyDecodeReservedExpansion
}
return false
}
// # gRPC Transcoding
//
// gRPC Transcoding is a feature for mapping between a gRPC method and one or
// more HTTP REST endpoints. It allows developers to build a single API service
// that supports both gRPC APIs and REST APIs. Many systems, including [Google
// APIs](https://github.com/googleapis/googleapis),
// [Cloud Endpoints](https://cloud.google.com/endpoints), [gRPC
// Gateway](https://github.com/grpc-ecosystem/grpc-gateway),
// and [Envoy](https://github.com/envoyproxy/envoy) proxy support this feature
// and use it for large scale production services.
//
// `HttpRule` defines the schema of the gRPC/REST mapping. The mapping specifies
// how different portions of the gRPC request message are mapped to the URL
// path, URL query parameters, and HTTP request body. It also controls how the
// gRPC response message is mapped to the HTTP response body. `HttpRule` is
// typically specified as an `google.api.http` annotation on the gRPC method.
//
// Each mapping specifies a URL path template and an HTTP method. The path
// template may refer to one or more fields in the gRPC request message, as long
// as each field is a non-repeated field with a primitive (non-message) type.
// The path template controls how fields of the request message are mapped to
// the URL path.
//
// Example:
//
// service Messaging {
// rpc GetMessage(GetMessageRequest) returns (Message) {
// option (google.api.http) = {
// get: "/v1/{name=messages/*}"
// };
// }
// }
// message GetMessageRequest {
// string name = 1; // Mapped to URL path.
// }
// message Message {
// string text = 1; // The resource content.
// }
//
// This enables an HTTP REST to gRPC mapping as below:
//
// HTTP | gRPC
// -----|-----
// `GET /v1/messages/123456` | `GetMessage(name: "messages/123456")`
//
// Any fields in the request message which are not bound by the path template
// automatically become HTTP query parameters if there is no HTTP request body.
// For example:
//
// service Messaging {
// rpc GetMessage(GetMessageRequest) returns (Message) {
// option (google.api.http) = {
// get:"/v1/messages/{message_id}"
// };
// }
// }
// message GetMessageRequest {
// message SubMessage {
// string subfield = 1;
// }
// string message_id = 1; // Mapped to URL path.
// int64 revision = 2; // Mapped to URL query parameter `revision`.
// SubMessage sub = 3; // Mapped to URL query parameter `sub.subfield`.
// }
//
// This enables a HTTP JSON to RPC mapping as below:
//
// HTTP | gRPC
// -----|-----
// `GET /v1/messages/123456?revision=2&sub.subfield=foo` |
// `GetMessage(message_id: "123456" revision: 2 sub: SubMessage(subfield:
// "foo"))`
//
// Note that fields which are mapped to URL query parameters must have a
// primitive type or a repeated primitive type or a non-repeated message type.
// In the case of a repeated type, the parameter can be repeated in the URL
// as `...?param=A&param=B`. In the case of a message type, each field of the
// message is mapped to a separate parameter, such as
// `...?foo.a=A&foo.b=B&foo.c=C`.
//
// For HTTP methods that allow a request body, the `body` field
// specifies the mapping. Consider a REST update method on the
// message resource collection:
//
// service Messaging {
// rpc UpdateMessage(UpdateMessageRequest) returns (Message) {
// option (google.api.http) = {
// patch: "/v1/messages/{message_id}"
// body: "message"
// };
// }
// }
// message UpdateMessageRequest {
// string message_id = 1; // mapped to the URL
// Message message = 2; // mapped to the body
// }
//
// The following HTTP JSON to RPC mapping is enabled, where the
// representation of the JSON in the request body is determined by
// protos JSON encoding:
//
// HTTP | gRPC
// -----|-----
// `PATCH /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id:
// "123456" message { text: "Hi!" })`
//
// The special name `*` can be used in the body mapping to define that
// every field not bound by the path template should be mapped to the
// request body. This enables the following alternative definition of
// the update method:
//
// service Messaging {
// rpc UpdateMessage(Message) returns (Message) {
// option (google.api.http) = {
// patch: "/v1/messages/{message_id}"
// body: "*"
// };
// }
// }
// message Message {
// string message_id = 1;
// string text = 2;
// }
//
// The following HTTP JSON to RPC mapping is enabled:
//
// HTTP | gRPC
// -----|-----
// `PATCH /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id:
// "123456" text: "Hi!")`
//
// Note that when using `*` in the body mapping, it is not possible to
// have HTTP parameters, as all fields not bound by the path end in
// the body. This makes this option more rarely used in practice when
// defining REST APIs. The common usage of `*` is in custom methods
// which don't use the URL at all for transferring data.
//
// It is possible to define multiple HTTP methods for one RPC by using
// the `additional_bindings` option. Example:
//
// service Messaging {
// rpc GetMessage(GetMessageRequest) returns (Message) {
// option (google.api.http) = {
// get: "/v1/messages/{message_id}"
// additional_bindings {
// get: "/v1/users/{user_id}/messages/{message_id}"
// }
// };
// }
// }
// message GetMessageRequest {
// string message_id = 1;
// string user_id = 2;
// }
//
// This enables the following two alternative HTTP JSON to RPC mappings:
//
// HTTP | gRPC
// -----|-----
// `GET /v1/messages/123456` | `GetMessage(message_id: "123456")`
// `GET /v1/users/me/messages/123456` | `GetMessage(user_id: "me" message_id:
// "123456")`
//
// ## Rules for HTTP mapping
//
// 1. Leaf request fields (recursive expansion nested messages in the request
// message) are classified into three categories:
// - Fields referred by the path template. They are passed via the URL path.
// - Fields referred by the [HttpRule.body][google.api.HttpRule.body]. They are passed via the HTTP
// request body.
// - All other fields are passed via the URL query parameters, and the
// parameter name is the field path in the request message. A repeated
// field can be represented as multiple query parameters under the same
// name.
// 2. If [HttpRule.body][google.api.HttpRule.body] is "*", there is no URL query parameter, all fields
// are passed via URL path and HTTP request body.
// 3. If [HttpRule.body][google.api.HttpRule.body] is omitted, there is no HTTP request body, all
// fields are passed via URL path and URL query parameters.
//
// ### Path template syntax
//
// Template = "/" Segments [ Verb ] ;
// Segments = Segment { "/" Segment } ;
// Segment = "*" | "**" | LITERAL | Variable ;
// Variable = "{" FieldPath [ "=" Segments ] "}" ;
// FieldPath = IDENT { "." IDENT } ;
// Verb = ":" LITERAL ;
//
// The syntax `*` matches a single URL path segment. The syntax `**` matches
// zero or more URL path segments, which must be the last part of the URL path
// except the `Verb`.
//
// The syntax `Variable` matches part of the URL path as specified by its
// template. A variable template must not contain other variables. If a variable
// matches a single path segment, its template may be omitted, e.g. `{var}`
// is equivalent to `{var=*}`.
//
// The syntax `LITERAL` matches literal text in the URL path. If the `LITERAL`
// contains any reserved character, such characters should be percent-encoded
// before the matching.
//
// If a variable contains exactly one path segment, such as `"{var}"` or
// `"{var=*}"`, when such a variable is expanded into a URL path on the client
// side, all characters except `[-_.~0-9a-zA-Z]` are percent-encoded. The
// server side does the reverse decoding. Such variables show up in the
// [Discovery
// Document](https://developers.google.com/discovery/v1/reference/apis) as
// `{var}`.
//
// If a variable contains multiple path segments, such as `"{var=foo/*}"`
// or `"{var=**}"`, when such a variable is expanded into a URL path on the
// client side, all characters except `[-_.~/0-9a-zA-Z]` are percent-encoded.
// The server side does the reverse decoding, except "%2F" and "%2f" are left
// unchanged. Such variables show up in the
// [Discovery
// Document](https://developers.google.com/discovery/v1/reference/apis) as
// `{+var}`.
//
// ## Using gRPC API Service Configuration
//
// gRPC API Service Configuration (service config) is a configuration language
// for configuring a gRPC service to become a user-facing product. The
// service config is simply the YAML representation of the `google.api.Service`
// proto message.
//
// As an alternative to annotating your proto file, you can configure gRPC
// transcoding in your service config YAML files. You do this by specifying a
// `HttpRule` that maps the gRPC method to a REST endpoint, achieving the same
// effect as the proto annotation. This can be particularly useful if you
// have a proto that is reused in multiple services. Note that any transcoding
// specified in the service config will override any matching transcoding
// configuration in the proto.
//
// Example:
//
// http:
// rules:
// # Selects a gRPC method and applies HttpRule to it.
// - selector: example.v1.Messaging.GetMessage
// get: /v1/messages/{message_id}/{sub.subfield}
//
// ## Special notes
//
// When gRPC Transcoding is used to map a gRPC to JSON REST endpoints, the
// proto to JSON conversion must follow the [proto3
// specification](https://developers.google.com/protocol-buffers/docs/proto3#json).
//
// While the single segment variable follows the semantics of
// [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2 Simple String
// Expansion, the multi segment variable **does not** follow RFC 6570 Section
// 3.2.3 Reserved Expansion. The reason is that the Reserved Expansion
// does not expand special characters like `?` and `#`, which would lead
// to invalid URLs. As the result, gRPC Transcoding uses a custom encoding
// for multi segment variables.
//
// The path variables **must not** refer to any repeated or mapped field,
// because client libraries are not capable of handling such variable expansion.
//
// The path variables **must not** capture the leading "/" character. The reason
// is that the most common use case "{var}" does not capture the leading "/"
// character. For consistency, all path variables must share the same behavior.
//
// Repeated message fields must not be mapped to URL query parameters, because
// no client library can support such complicated mapping.
//
// If an API needs to use a JSON array for request or response body, it can map
// the request or response body to a repeated field. However, some gRPC
// Transcoding implementations may not support this feature.
type HttpRule struct {
state protoimpl.MessageState `protogen:"open.v1"`
// Selects a method to which this rule applies.
//
// Refer to [selector][google.api.DocumentationRule.selector] for syntax details.
Selector string `protobuf:"bytes,1,opt,name=selector,proto3" json:"selector,omitempty"`
// Determines the URL pattern is matched by this rules. This pattern can be
// used with any of the {get|put|post|delete|patch} methods. A custom method
// can be defined using the 'custom' field.
//
// Types that are valid to be assigned to Pattern:
//
// *HttpRule_Get
// *HttpRule_Put
// *HttpRule_Post
// *HttpRule_Delete
// *HttpRule_Patch
// *HttpRule_Custom
Pattern isHttpRule_Pattern `protobuf_oneof:"pattern"`
// The name of the request field whose value is mapped to the HTTP request
// body, or `*` for mapping all request fields not captured by the path
// pattern to the HTTP body, or omitted for not having any HTTP request body.
//
// NOTE: the referred field must be present at the top-level of the request
// message type.
Body string `protobuf:"bytes,7,opt,name=body,proto3" json:"body,omitempty"`
// Optional. The name of the response field whose value is mapped to the HTTP
// response body. When omitted, the entire response message will be used
// as the HTTP response body.
//
// NOTE: The referred field must be present at the top-level of the response
// message type.
ResponseBody string `protobuf:"bytes,12,opt,name=response_body,json=responseBody,proto3" json:"response_body,omitempty"`
// Additional HTTP bindings for the selector. Nested bindings must
// not contain an `additional_bindings` field themselves (that is,
// the nesting may only be one level deep).
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() {
*x = HttpRule{}
mi := &file_google_api_http_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *HttpRule) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*HttpRule) ProtoMessage() {}
func (x *HttpRule) ProtoReflect() protoreflect.Message {
mi := &file_google_api_http_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 HttpRule.ProtoReflect.Descriptor instead.
func (*HttpRule) Descriptor() ([]byte, []int) {
return file_google_api_http_proto_rawDescGZIP(), []int{1}
}
func (x *HttpRule) GetSelector() string {
if x != nil {
return x.Selector
}
return ""
}
func (x *HttpRule) GetPattern() isHttpRule_Pattern {
if x != nil {
return x.Pattern
}
return nil
}
func (x *HttpRule) GetGet() string {
if x != nil {
if x, ok := x.Pattern.(*HttpRule_Get); ok {
return x.Get
}
}
return ""
}
func (x *HttpRule) GetPut() string {
if x != nil {
if x, ok := x.Pattern.(*HttpRule_Put); ok {
return x.Put
}
}
return ""
}
func (x *HttpRule) GetPost() string {
if x != nil {
if x, ok := x.Pattern.(*HttpRule_Post); ok {
return x.Post
}
}
return ""
}
func (x *HttpRule) GetDelete() string {
if x != nil {
if x, ok := x.Pattern.(*HttpRule_Delete); ok {
return x.Delete
}
}
return ""
}
func (x *HttpRule) GetPatch() string {
if x != nil {
if x, ok := x.Pattern.(*HttpRule_Patch); ok {
return x.Patch
}
}
return ""
}
func (x *HttpRule) GetCustom() *CustomHttpPattern {
if x != nil {
if x, ok := x.Pattern.(*HttpRule_Custom); ok {
return x.Custom
}
}
return nil
}
func (x *HttpRule) GetBody() string {
if x != nil {
return x.Body
}
return ""
}
func (x *HttpRule) GetResponseBody() string {
if x != nil {
return x.ResponseBody
}
return ""
}
func (x *HttpRule) GetAdditionalBindings() []*HttpRule {
if x != nil {
return x.AdditionalBindings
}
return nil
}
type isHttpRule_Pattern interface {
isHttpRule_Pattern()
}
type HttpRule_Get struct {
// Maps to HTTP GET. Used for listing and getting information about
// resources.
Get string `protobuf:"bytes,2,opt,name=get,proto3,oneof"`
}
type HttpRule_Put struct {
// Maps to HTTP PUT. Used for replacing a resource.
Put string `protobuf:"bytes,3,opt,name=put,proto3,oneof"`
}
type HttpRule_Post struct {
// Maps to HTTP POST. Used for creating a resource or performing an action.
Post string `protobuf:"bytes,4,opt,name=post,proto3,oneof"`
}
type HttpRule_Delete struct {
// Maps to HTTP DELETE. Used for deleting a resource.
Delete string `protobuf:"bytes,5,opt,name=delete,proto3,oneof"`
}
type HttpRule_Patch struct {
// Maps to HTTP PATCH. Used for updating a resource.
Patch string `protobuf:"bytes,6,opt,name=patch,proto3,oneof"`
}
type HttpRule_Custom struct {
// The custom pattern is used for specifying an HTTP method that is not
// included in the `pattern` field, such as HEAD, or "*" to leave the
// HTTP method unspecified for this rule. The wild-card rule is useful
// for services that provide content to Web (HTML) clients.
Custom *CustomHttpPattern `protobuf:"bytes,8,opt,name=custom,proto3,oneof"`
}
func (*HttpRule_Get) isHttpRule_Pattern() {}
func (*HttpRule_Put) isHttpRule_Pattern() {}
func (*HttpRule_Post) isHttpRule_Pattern() {}
func (*HttpRule_Delete) isHttpRule_Pattern() {}
func (*HttpRule_Patch) isHttpRule_Pattern() {}
func (*HttpRule_Custom) isHttpRule_Pattern() {}
// A custom pattern is used for defining custom HTTP verb.
type CustomHttpPattern struct {
state protoimpl.MessageState `protogen:"open.v1"`
// The name of this custom HTTP verb.
Kind string `protobuf:"bytes,1,opt,name=kind,proto3" json:"kind,omitempty"`
// The path matched by this custom verb.
Path string `protobuf:"bytes,2,opt,name=path,proto3" json:"path,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *CustomHttpPattern) Reset() {
*x = CustomHttpPattern{}
mi := &file_google_api_http_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *CustomHttpPattern) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CustomHttpPattern) ProtoMessage() {}
func (x *CustomHttpPattern) ProtoReflect() protoreflect.Message {
mi := &file_google_api_http_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 CustomHttpPattern.ProtoReflect.Descriptor instead.
func (*CustomHttpPattern) Descriptor() ([]byte, []int) {
return file_google_api_http_proto_rawDescGZIP(), []int{2}
}
func (x *CustomHttpPattern) GetKind() string {
if x != nil {
return x.Kind
}
return ""
}
func (x *CustomHttpPattern) GetPath() string {
if x != nil {
return x.Path
}
return ""
}
var File_google_api_http_proto protoreflect.FileDescriptor
const file_google_api_http_proto_rawDesc = "" +
"\n" +
"\x15google/api/http.proto\x12\n" +
"google.api\"y\n" +
"\x04Http\x12*\n" +
"\x05rules\x18\x01 \x03(\v2\x14.google.api.HttpRuleR\x05rules\x12E\n" +
"\x1ffully_decode_reserved_expansion\x18\x02 \x01(\bR\x1cfullyDecodeReservedExpansion\"\xda\x02\n" +
"\bHttpRule\x12\x1a\n" +
"\bselector\x18\x01 \x01(\tR\bselector\x12\x12\n" +
"\x03get\x18\x02 \x01(\tH\x00R\x03get\x12\x12\n" +
"\x03put\x18\x03 \x01(\tH\x00R\x03put\x12\x14\n" +
"\x04post\x18\x04 \x01(\tH\x00R\x04post\x12\x18\n" +
"\x06delete\x18\x05 \x01(\tH\x00R\x06delete\x12\x16\n" +
"\x05patch\x18\x06 \x01(\tH\x00R\x05patch\x127\n" +
"\x06custom\x18\b \x01(\v2\x1d.google.api.CustomHttpPatternH\x00R\x06custom\x12\x12\n" +
"\x04body\x18\a \x01(\tR\x04body\x12#\n" +
"\rresponse_body\x18\f \x01(\tR\fresponseBody\x12E\n" +
"\x13additional_bindings\x18\v \x03(\v2\x14.google.api.HttpRuleR\x12additionalBindingsB\t\n" +
"\apattern\";\n" +
"\x11CustomHttpPattern\x12\x12\n" +
"\x04kind\x18\x01 \x01(\tR\x04kind\x12\x12\n" +
"\x04path\x18\x02 \x01(\tR\x04pathBj\n" +
"\x0ecom.google.apiB\tHttpProtoP\x01ZAgoogle.golang.org/genproto/googleapis/api/annotations;annotations\xf8\x01\x01\xa2\x02\x04GAPIb\x06proto3"
var (
file_google_api_http_proto_rawDescOnce sync.Once
file_google_api_http_proto_rawDescData []byte
)
func file_google_api_http_proto_rawDescGZIP() []byte {
file_google_api_http_proto_rawDescOnce.Do(func() {
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
}
var file_google_api_http_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
var file_google_api_http_proto_goTypes = []any{
(*Http)(nil), // 0: google.api.Http
(*HttpRule)(nil), // 1: google.api.HttpRule
(*CustomHttpPattern)(nil), // 2: google.api.CustomHttpPattern
}
var file_google_api_http_proto_depIdxs = []int32{
1, // 0: google.api.Http.rules:type_name -> google.api.HttpRule
2, // 1: google.api.HttpRule.custom:type_name -> google.api.CustomHttpPattern
1, // 2: google.api.HttpRule.additional_bindings:type_name -> google.api.HttpRule
3, // [3:3] is the sub-list for method output_type
3, // [3:3] is the sub-list for method input_type
3, // [3:3] is the sub-list for extension type_name
3, // [3:3] is the sub-list for extension extendee
0, // [0:3] is the sub-list for field type_name
}
func init() { file_google_api_http_proto_init() }
func file_google_api_http_proto_init() {
if File_google_api_http_proto != nil {
return
}
file_google_api_http_proto_msgTypes[1].OneofWrappers = []any{
(*HttpRule_Get)(nil),
(*HttpRule_Put)(nil),
(*HttpRule_Post)(nil),
(*HttpRule_Delete)(nil),
(*HttpRule_Patch)(nil),
(*HttpRule_Custom)(nil),
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: unsafe.Slice(unsafe.StringData(file_google_api_http_proto_rawDesc), len(file_google_api_http_proto_rawDesc)),
NumEnums: 0,
NumMessages: 3,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_google_api_http_proto_goTypes,
DependencyIndexes: file_google_api_http_proto_depIdxs,
MessageInfos: file_google_api_http_proto_msgTypes,
}.Build()
File_google_api_http_proto = out.File
file_google_api_http_proto_goTypes = nil
file_google_api_http_proto_depIdxs = nil
}

@ -1,6 +1,6 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.33.0
// protoc-gen-go v1.36.7
// protoc (unknown)
// source: treasurer/payment.model.proto
@ -11,6 +11,7 @@ import (
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
unsafe "unsafe"
)
const (
@ -21,10 +22,7 @@ const (
)
type MainPaymentSettings struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
state protoimpl.MessageState `protogen:"open.v1"`
Currency string `protobuf:"bytes,1,opt,name=Currency,proto3" json:"Currency,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"`
@ -33,16 +31,16 @@ type MainPaymentSettings struct {
ClientIP string `protobuf:"bytes,6,opt,name=ClientIP,proto3" json:"ClientIP,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"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *MainPaymentSettings) Reset() {
*x = MainPaymentSettings{}
if protoimpl.UnsafeEnabled {
mi := &file_treasurer_payment_model_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *MainPaymentSettings) String() string {
return protoimpl.X.MessageStringOf(x)
@ -52,7 +50,7 @@ func (*MainPaymentSettings) ProtoMessage() {}
func (x *MainPaymentSettings) ProtoReflect() protoreflect.Message {
mi := &file_treasurer_payment_model_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@ -124,24 +122,21 @@ func (x *MainPaymentSettings) GetItems() []*Item {
}
type Customer struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
state protoimpl.MessageState `protogen:"open.v1"`
FullName string `protobuf:"bytes,1,opt,name=FullName,proto3" json:"FullName,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"`
Phone string `protobuf:"bytes,4,opt,name=Phone,proto3" json:"Phone,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *Customer) Reset() {
*x = Customer{}
if protoimpl.UnsafeEnabled {
mi := &file_treasurer_payment_model_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Customer) String() string {
return protoimpl.X.MessageStringOf(x)
@ -151,7 +146,7 @@ func (*Customer) ProtoMessage() {}
func (x *Customer) ProtoReflect() protoreflect.Message {
mi := &file_treasurer_payment_model_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@ -195,25 +190,22 @@ func (x *Customer) GetPhone() string {
}
type Item struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
state protoimpl.MessageState `protogen:"open.v1"`
Description string `protobuf:"bytes,1,opt,name=Description,proto3" json:"Description,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"`
Money string `protobuf:"bytes,4,opt,name=Money,proto3" json:"Money,omitempty"`
Currency string `protobuf:"bytes,5,opt,name=Currency,proto3" json:"Currency,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *Item) Reset() {
*x = Item{}
if protoimpl.UnsafeEnabled {
mi := &file_treasurer_payment_model_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Item) String() string {
return protoimpl.X.MessageStringOf(x)
@ -223,7 +215,7 @@ func (*Item) ProtoMessage() {}
func (x *Item) ProtoReflect() protoreflect.Message {
mi := &file_treasurer_payment_model_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
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_rawDesc = []byte{
0x0a, 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, 0x12,
0x09, 0x74, 0x72, 0x65, 0x61, 0x73, 0x75, 0x72, 0x65, 0x72, 0x22, 0x9f, 0x02, 0x0a, 0x13, 0x4d,
0x61, 0x69, 0x6e, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e,
0x67, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x18, 0x01,
0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x12, 0x16,
0x0a, 0x06, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06,
0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x2a, 0x0a, 0x10, 0x43, 0x61, 0x6c, 0x6c, 0x62, 0x61,
0x63, 0x6b, 0x48, 0x6f, 0x73, 0x74, 0x47, 0x52, 0x50, 0x43, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09,
0x52, 0x10, 0x43, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x48, 0x6f, 0x73, 0x74, 0x47, 0x52,
0x50, 0x43, 0x12, 0x1c, 0x0a, 0x09, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x55, 0x52, 0x4c, 0x18,
0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x55, 0x52, 0x4c,
0x12, 0x16, 0x0a, 0x06, 0x55, 0x73, 0x65, 0x72, 0x49, 0x44, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09,
0x52, 0x06, 0x55, 0x73, 0x65, 0x72, 0x49, 0x44, 0x12, 0x1a, 0x0a, 0x08, 0x43, 0x6c, 0x69, 0x65,
0x6e, 0x74, 0x49, 0x50, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x43, 0x6c, 0x69, 0x65,
0x6e, 0x74, 0x49, 0x50, 0x12, 0x2f, 0x0a, 0x08, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72,
0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x74, 0x72, 0x65, 0x61, 0x73, 0x75, 0x72,
0x65, 0x72, 0x2e, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x52, 0x08, 0x43, 0x75, 0x73,
0x74, 0x6f, 0x6d, 0x65, 0x72, 0x12, 0x25, 0x0a, 0x05, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x08,
0x20, 0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x74, 0x72, 0x65, 0x61, 0x73, 0x75, 0x72, 0x65, 0x72,
0x2e, 0x49, 0x74, 0x65, 0x6d, 0x52, 0x05, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x22, 0x64, 0x0a, 0x08,
0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x12, 0x1a, 0x0a, 0x08, 0x46, 0x75, 0x6c, 0x6c,
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,
}
const file_treasurer_payment_model_proto_rawDesc = "" +
"\n" +
"\x1dtreasurer/payment.model.proto\x12\ttreasurer\"\x9f\x02\n" +
"\x13MainPaymentSettings\x12\x1a\n" +
"\bCurrency\x18\x01 \x01(\tR\bCurrency\x12\x16\n" +
"\x06Amount\x18\x02 \x01(\x03R\x06Amount\x12*\n" +
"\x10CallbackHostGRPC\x18\x03 \x03(\tR\x10CallbackHostGRPC\x12\x1c\n" +
"\tReturnURL\x18\x04 \x01(\tR\tReturnURL\x12\x16\n" +
"\x06UserID\x18\x05 \x01(\tR\x06UserID\x12\x1a\n" +
"\bClientIP\x18\x06 \x01(\tR\bClientIP\x12/\n" +
"\bCustomer\x18\a \x01(\v2\x13.treasurer.CustomerR\bCustomer\x12%\n" +
"\x05Items\x18\b \x03(\v2\x0f.treasurer.ItemR\x05Items\"d\n" +
"\bCustomer\x12\x1a\n" +
"\bFullName\x18\x01 \x01(\tR\bFullName\x12\x10\n" +
"\x03INN\x18\x02 \x01(\tR\x03INN\x12\x14\n" +
"\x05Email\x18\x03 \x01(\tR\x05Email\x12\x14\n" +
"\x05Phone\x18\x04 \x01(\tR\x05Phone\"\x90\x01\n" +
"\x04Item\x12 \n" +
"\vDescription\x18\x01 \x01(\tR\vDescription\x12\x18\n" +
"\aMeasure\x18\x02 \x01(\tR\aMeasure\x12\x1a\n" +
"\bQuantity\x18\x03 \x01(\tR\bQuantity\x12\x14\n" +
"\x05Money\x18\x04 \x01(\tR\x05Money\x12\x1a\n" +
"\bCurrency\x18\x05 \x01(\tR\bCurrencyB\rZ\v./treasurerb\x06proto3"
var (
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 {
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
}
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
(*Customer)(nil), // 1: treasurer.Customer
(*Item)(nil), // 2: treasurer.Item
@ -349,49 +324,11 @@ func file_treasurer_payment_model_proto_init() {
if File_treasurer_payment_model_proto != nil {
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{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
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,
NumMessages: 3,
NumExtensions: 0,
@ -402,7 +339,6 @@ func file_treasurer_payment_model_proto_init() {
MessageInfos: file_treasurer_payment_model_proto_msgTypes,
}.Build()
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_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.
// versions:
// - protoc-gen-go-grpc v1.3.0
// - protoc-gen-go-grpc v1.5.1
// - protoc (unknown)
// source: treasurer/service.proto
// source: treasurer/treasurer.proto
package treasurer
@ -15,8 +15,8 @@ import (
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
// Requires gRPC-Go v1.32.0 or later.
const _ = grpc.SupportPackageIsVersion7
// Requires gRPC-Go v1.64.0 or later.
const _ = grpc.SupportPackageIsVersion9
const (
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) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
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 {
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) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
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 {
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) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
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 {
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) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
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 {
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) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
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 {
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) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
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 {
return nil, err
}
@ -103,7 +109,7 @@ func (c *treasurerServiceClient) GetPaymentLinkSberPay(ctx context.Context, in *
// TreasurerServiceServer is the server API for TreasurerService service.
// All implementations should embed UnimplementedTreasurerServiceServer
// for forward compatibility
// for forward compatibility.
type TreasurerServiceServer interface {
GetPaymentLinkBankCard(context.Context, *GetPaymentLinkRequest) (*GetPaymentLinkResponse, error)
GetPaymentLinkYooMoney(context.Context, *GetPaymentLinkRequest) (*GetPaymentLinkResponse, error)
@ -113,9 +119,12 @@ type TreasurerServiceServer interface {
GetPaymentLinkSberPay(context.Context, *GetPaymentLinkRequest) (*GetPaymentLinkResponse, error)
}
// UnimplementedTreasurerServiceServer should be embedded to have forward compatible implementations.
type UnimplementedTreasurerServiceServer struct {
}
// UnimplementedTreasurerServiceServer should be embedded to have
// 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) {
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) {
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.
// 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) {
// 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)
}
@ -288,5 +305,5 @@ var TreasurerService_ServiceDesc = grpc.ServiceDesc{
},
},
Streams: []grpc.StreamDesc{},
Metadata: "treasurer/service.proto",
Metadata: "treasurer/treasurer.proto",
}