customer/internal/proto/broker/models.pb.go

278 lines
7.8 KiB
Go
Raw Normal View History

2023-07-07 01:57:06 +00:00
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
2025-08-13 21:45:10 +00:00
// protoc-gen-go v1.36.7
2023-07-07 01:57:06 +00:00
// protoc (unknown)
// source: broker/models.proto
package broker
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
2025-08-13 21:45:10 +00:00
unsafe "unsafe"
2023-07-07 01:57:06 +00:00
)
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)
)
2023-08-02 14:28:31 +00:00
type PrivilegeType int32
const (
PrivilegeType_Full PrivilegeType = 0
PrivilegeType_Day PrivilegeType = 1
PrivilegeType_Count PrivilegeType = 2
)
// Enum value maps for PrivilegeType.
var (
PrivilegeType_name = map[int32]string{
0: "Full",
1: "Day",
2: "Count",
}
PrivilegeType_value = map[string]int32{
"Full": 0,
"Day": 1,
"Count": 2,
}
)
func (x PrivilegeType) Enum() *PrivilegeType {
p := new(PrivilegeType)
*p = x
return p
}
func (x PrivilegeType) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (PrivilegeType) Descriptor() protoreflect.EnumDescriptor {
return file_broker_models_proto_enumTypes[0].Descriptor()
}
func (PrivilegeType) Type() protoreflect.EnumType {
return &file_broker_models_proto_enumTypes[0]
}
func (x PrivilegeType) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use PrivilegeType.Descriptor instead.
func (PrivilegeType) EnumDescriptor() ([]byte, []int) {
return file_broker_models_proto_rawDescGZIP(), []int{0}
}
2023-07-07 01:57:06 +00:00
type PrivilegeMessage struct {
2025-08-13 21:45:10 +00:00
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"`
2023-07-07 01:57:06 +00:00
unknownFields protoimpl.UnknownFields
2025-08-13 21:45:10 +00:00
sizeCache protoimpl.SizeCache
2023-07-07 01:57:06 +00:00
}
func (x *PrivilegeMessage) Reset() {
*x = PrivilegeMessage{}
2025-08-13 21:45:10 +00:00
mi := &file_broker_models_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
2023-07-07 01:57:06 +00:00
}
func (x *PrivilegeMessage) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*PrivilegeMessage) ProtoMessage() {}
func (x *PrivilegeMessage) ProtoReflect() protoreflect.Message {
mi := &file_broker_models_proto_msgTypes[0]
2025-08-13 21:45:10 +00:00
if x != nil {
2023-07-07 01:57:06 +00:00
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use PrivilegeMessage.ProtoReflect.Descriptor instead.
func (*PrivilegeMessage) Descriptor() ([]byte, []int) {
return file_broker_models_proto_rawDescGZIP(), []int{0}
}
func (x *PrivilegeMessage) GetPrivilegeID() string {
if x != nil {
return x.PrivilegeID
}
return ""
}
func (x *PrivilegeMessage) GetServiceKey() string {
if x != nil {
return x.ServiceKey
}
return ""
}
2023-08-02 14:28:31 +00:00
func (x *PrivilegeMessage) GetType() PrivilegeType {
2023-07-07 01:57:06 +00:00
if x != nil {
return x.Type
}
2023-08-02 14:28:31 +00:00
return PrivilegeType_Full
2023-07-07 01:57:06 +00:00
}
func (x *PrivilegeMessage) GetValue() string {
if x != nil {
return x.Value
}
return ""
}
2023-08-02 14:28:31 +00:00
func (x *PrivilegeMessage) GetAmount() uint64 {
if x != nil {
return x.Amount
}
return 0
}
2023-07-07 01:57:06 +00:00
type TariffMessage struct {
2025-08-13 21:45:10 +00:00
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"`
2023-07-07 01:57:06 +00:00
unknownFields protoimpl.UnknownFields
2025-08-13 21:45:10 +00:00
sizeCache protoimpl.SizeCache
2023-07-07 01:57:06 +00:00
}
func (x *TariffMessage) Reset() {
*x = TariffMessage{}
2025-08-13 21:45:10 +00:00
mi := &file_broker_models_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
2023-07-07 01:57:06 +00:00
}
func (x *TariffMessage) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*TariffMessage) ProtoMessage() {}
func (x *TariffMessage) ProtoReflect() protoreflect.Message {
mi := &file_broker_models_proto_msgTypes[1]
2025-08-13 21:45:10 +00:00
if x != nil {
2023-07-07 01:57:06 +00:00
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use TariffMessage.ProtoReflect.Descriptor instead.
func (*TariffMessage) Descriptor() ([]byte, []int) {
return file_broker_models_proto_rawDescGZIP(), []int{1}
}
func (x *TariffMessage) GetPrivileges() []*PrivilegeMessage {
if x != nil {
return x.Privileges
}
return nil
}
func (x *TariffMessage) GetUserID() string {
if x != nil {
return x.UserID
}
return ""
}
var File_broker_models_proto protoreflect.FileDescriptor
2025-08-13 21:45:10 +00:00
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"
2023-07-07 01:57:06 +00:00
var (
file_broker_models_proto_rawDescOnce sync.Once
2025-08-13 21:45:10 +00:00
file_broker_models_proto_rawDescData []byte
2023-07-07 01:57:06 +00:00
)
func file_broker_models_proto_rawDescGZIP() []byte {
file_broker_models_proto_rawDescOnce.Do(func() {
2025-08-13 21:45:10 +00:00
file_broker_models_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_broker_models_proto_rawDesc), len(file_broker_models_proto_rawDesc)))
2023-07-07 01:57:06 +00:00
})
return file_broker_models_proto_rawDescData
}
2023-08-02 14:28:31 +00:00
var file_broker_models_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
2023-07-07 01:57:06 +00:00
var file_broker_models_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
2025-08-13 21:45:10 +00:00
var file_broker_models_proto_goTypes = []any{
2023-08-02 14:28:31 +00:00
(PrivilegeType)(0), // 0: broker.PrivilegeType
(*PrivilegeMessage)(nil), // 1: broker.PrivilegeMessage
(*TariffMessage)(nil), // 2: broker.TariffMessage
2023-07-07 01:57:06 +00:00
}
var file_broker_models_proto_depIdxs = []int32{
2023-08-02 14:28:31 +00:00
0, // 0: broker.PrivilegeMessage.Type:type_name -> broker.PrivilegeType
1, // 1: broker.TariffMessage.Privileges:type_name -> broker.PrivilegeMessage
2, // [2:2] is the sub-list for method output_type
2, // [2:2] is the sub-list for method input_type
2, // [2:2] is the sub-list for extension type_name
2, // [2:2] is the sub-list for extension extendee
0, // [0:2] is the sub-list for field type_name
2023-07-07 01:57:06 +00:00
}
func init() { file_broker_models_proto_init() }
func file_broker_models_proto_init() {
if File_broker_models_proto != nil {
return
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
2025-08-13 21:45:10 +00:00
RawDescriptor: unsafe.Slice(unsafe.StringData(file_broker_models_proto_rawDesc), len(file_broker_models_proto_rawDesc)),
2023-08-02 14:28:31 +00:00
NumEnums: 1,
2023-07-07 01:57:06 +00:00
NumMessages: 2,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_broker_models_proto_goTypes,
DependencyIndexes: file_broker_models_proto_depIdxs,
2023-08-02 14:28:31 +00:00
EnumInfos: file_broker_models_proto_enumTypes,
2023-07-07 01:57:06 +00:00
MessageInfos: file_broker_models_proto_msgTypes,
}.Build()
File_broker_models_proto = out.File
file_broker_models_proto_goTypes = nil
file_broker_models_proto_depIdxs = nil
}