315 lines
9.8 KiB
Go
315 lines
9.8 KiB
Go
// Code generated by protoc-gen-go. DO NOT EDIT.
|
|
// versions:
|
|
// protoc-gen-go v1.31.0
|
|
// protoc (unknown)
|
|
// source: kafka/models.proto
|
|
|
|
package broker
|
|
|
|
import (
|
|
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
|
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
|
reflect "reflect"
|
|
sync "sync"
|
|
)
|
|
|
|
const (
|
|
// Verify that this generated code is sufficiently up-to-date.
|
|
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
|
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
|
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
|
)
|
|
|
|
type 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}
|
|
}
|
|
|
|
type PrivilegeMessage struct {
|
|
state protoimpl.MessageState
|
|
sizeCache protoimpl.SizeCache
|
|
unknownFields protoimpl.UnknownFields
|
|
|
|
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=kafka.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"`
|
|
}
|
|
|
|
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)
|
|
}
|
|
|
|
func (*PrivilegeMessage) ProtoMessage() {}
|
|
|
|
func (x *PrivilegeMessage) ProtoReflect() protoreflect.Message {
|
|
mi := &file_broker_models_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 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 ""
|
|
}
|
|
|
|
func (x *PrivilegeMessage) GetType() PrivilegeType {
|
|
if x != nil {
|
|
return x.Type
|
|
}
|
|
return PrivilegeType_Full
|
|
}
|
|
|
|
func (x *PrivilegeMessage) GetValue() string {
|
|
if x != nil {
|
|
return x.Value
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *PrivilegeMessage) GetAmount() uint64 {
|
|
if x != nil {
|
|
return x.Amount
|
|
}
|
|
return 0
|
|
}
|
|
|
|
type TariffMessage struct {
|
|
state protoimpl.MessageState
|
|
sizeCache protoimpl.SizeCache
|
|
unknownFields protoimpl.UnknownFields
|
|
|
|
Privileges []*PrivilegeMessage `protobuf:"bytes,1,rep,name=Privileges,proto3" json:"Privileges,omitempty"`
|
|
UserID string `protobuf:"bytes,2,opt,name=UserID,proto3" json:"UserID,omitempty"`
|
|
}
|
|
|
|
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)
|
|
}
|
|
|
|
func (*TariffMessage) ProtoMessage() {}
|
|
|
|
func (x *TariffMessage) ProtoReflect() protoreflect.Message {
|
|
mi := &file_broker_models_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 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
|
|
|
|
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,
|
|
}
|
|
|
|
var (
|
|
file_broker_models_proto_rawDescOnce sync.Once
|
|
file_broker_models_proto_rawDescData = file_broker_models_proto_rawDesc
|
|
)
|
|
|
|
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)
|
|
})
|
|
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{}{
|
|
(PrivilegeType)(0), // 0: kafka.PrivilegeType
|
|
(*PrivilegeMessage)(nil), // 1: kafka.PrivilegeMessage
|
|
(*TariffMessage)(nil), // 2: kafka.TariffMessage
|
|
}
|
|
var file_broker_models_proto_depIdxs = []int32{
|
|
0, // 0: kafka.PrivilegeMessage.Type:type_name -> kafka.PrivilegeType
|
|
1, // 1: kafka.TariffMessage.Privileges:type_name -> kafka.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
|
|
}
|
|
|
|
func init() { file_broker_models_proto_init() }
|
|
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,
|
|
NumEnums: 1,
|
|
NumMessages: 2,
|
|
NumExtensions: 0,
|
|
NumServices: 0,
|
|
},
|
|
GoTypes: file_broker_models_proto_goTypes,
|
|
DependencyIndexes: file_broker_models_proto_depIdxs,
|
|
EnumInfos: file_broker_models_proto_enumTypes,
|
|
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
|
|
}
|