代码拉取完成,页面将自动刷新
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.28.1
// protoc v3.21.6
// source: pb/oneof.proto
package pb
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 TYPE int32
const (
TYPE_RESOURCE_CHANGE TYPE = 0
TYPE_RESOURCE_ALERT TYPE = 1
)
// Enum value maps for TYPE.
var (
TYPE_name = map[int32]string{
0: "RESOURCE_CHANGE",
1: "RESOURCE_ALERT",
}
TYPE_value = map[string]int32{
"RESOURCE_CHANGE": 0,
"RESOURCE_ALERT": 1,
}
)
func (x TYPE) Enum() *TYPE {
p := new(TYPE)
*p = x
return p
}
func (x TYPE) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (TYPE) Descriptor() protoreflect.EnumDescriptor {
return file_pb_oneof_proto_enumTypes[0].Descriptor()
}
func (TYPE) Type() protoreflect.EnumType {
return &file_pb_oneof_proto_enumTypes[0]
}
func (x TYPE) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use TYPE.Descriptor instead.
func (TYPE) EnumDescriptor() ([]byte, []int) {
return file_pb_oneof_proto_rawDescGZIP(), []int{0}
}
type ResourceChange struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
ResourceId string `protobuf:"bytes,1,opt,name=resource_id,json=resourceId,proto3" json:"resource_id,omitempty"`
// create,delete
Action string `protobuf:"bytes,2,opt,name=action,proto3" json:"action,omitempty"`
}
func (x *ResourceChange) Reset() {
*x = ResourceChange{}
if protoimpl.UnsafeEnabled {
mi := &file_pb_oneof_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ResourceChange) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ResourceChange) ProtoMessage() {}
func (x *ResourceChange) ProtoReflect() protoreflect.Message {
mi := &file_pb_oneof_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 ResourceChange.ProtoReflect.Descriptor instead.
func (*ResourceChange) Descriptor() ([]byte, []int) {
return file_pb_oneof_proto_rawDescGZIP(), []int{0}
}
func (x *ResourceChange) GetResourceId() string {
if x != nil {
return x.ResourceId
}
return ""
}
func (x *ResourceChange) GetAction() string {
if x != nil {
return x.Action
}
return ""
}
type ResourceAlert struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
ResourceId string `protobuf:"bytes,1,opt,name=resource_id,json=resourceId,proto3" json:"resource_id,omitempty"`
// info,warnning, danger
Levle string `protobuf:"bytes,2,opt,name=levle,proto3" json:"levle,omitempty"`
}
func (x *ResourceAlert) Reset() {
*x = ResourceAlert{}
if protoimpl.UnsafeEnabled {
mi := &file_pb_oneof_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ResourceAlert) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ResourceAlert) ProtoMessage() {}
func (x *ResourceAlert) ProtoReflect() protoreflect.Message {
mi := &file_pb_oneof_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 ResourceAlert.ProtoReflect.Descriptor instead.
func (*ResourceAlert) Descriptor() ([]byte, []int) {
return file_pb_oneof_proto_rawDescGZIP(), []int{1}
}
func (x *ResourceAlert) GetResourceId() string {
if x != nil {
return x.ResourceId
}
return ""
}
func (x *ResourceAlert) GetLevle() string {
if x != nil {
return x.Levle
}
return ""
}
type Event struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Type TYPE `protobuf:"varint,1,opt,name=type,proto3,enum=hello.TYPE" json:"type,omitempty"`
// Types that are assignable to Data:
// *Event_ResourceChange
// *Event_ResourceAlert
Data isEvent_Data `protobuf_oneof:"data"`
}
func (x *Event) Reset() {
*x = Event{}
if protoimpl.UnsafeEnabled {
mi := &file_pb_oneof_proto_msgTypes[2]
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_pb_oneof_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 Event.ProtoReflect.Descriptor instead.
func (*Event) Descriptor() ([]byte, []int) {
return file_pb_oneof_proto_rawDescGZIP(), []int{2}
}
func (x *Event) GetType() TYPE {
if x != nil {
return x.Type
}
return TYPE_RESOURCE_CHANGE
}
func (m *Event) GetData() isEvent_Data {
if m != nil {
return m.Data
}
return nil
}
func (x *Event) GetResourceChange() *ResourceChange {
if x, ok := x.GetData().(*Event_ResourceChange); ok {
return x.ResourceChange
}
return nil
}
func (x *Event) GetResourceAlert() *ResourceAlert {
if x, ok := x.GetData().(*Event_ResourceAlert); ok {
return x.ResourceAlert
}
return nil
}
type isEvent_Data interface {
isEvent_Data()
}
type Event_ResourceChange struct {
ResourceChange *ResourceChange `protobuf:"bytes,2,opt,name=resource_change,json=resourceChange,proto3,oneof"`
}
type Event_ResourceAlert struct {
ResourceAlert *ResourceAlert `protobuf:"bytes,3,opt,name=resource_alert,json=resourceAlert,proto3,oneof"`
}
func (*Event_ResourceChange) isEvent_Data() {}
func (*Event_ResourceAlert) isEvent_Data() {}
var File_pb_oneof_proto protoreflect.FileDescriptor
var file_pb_oneof_proto_rawDesc = []byte{
0x0a, 0x0e, 0x70, 0x62, 0x2f, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
0x12, 0x05, 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x22, 0x49, 0x0a, 0x0e, 0x52, 0x65, 0x73, 0x6f, 0x75,
0x72, 0x63, 0x65, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x72, 0x65, 0x73,
0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a,
0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x63,
0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x61, 0x63, 0x74, 0x69,
0x6f, 0x6e, 0x22, 0x46, 0x0a, 0x0d, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x41, 0x6c,
0x65, 0x72, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f,
0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72,
0x63, 0x65, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x65, 0x76, 0x6c, 0x65, 0x18, 0x02, 0x20,
0x01, 0x28, 0x09, 0x52, 0x05, 0x6c, 0x65, 0x76, 0x6c, 0x65, 0x22, 0xb1, 0x01, 0x0a, 0x05, 0x45,
0x76, 0x65, 0x6e, 0x74, 0x12, 0x1f, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01,
0x28, 0x0e, 0x32, 0x0b, 0x2e, 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x2e, 0x54, 0x59, 0x50, 0x45, 0x52,
0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x40, 0x0a, 0x0f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63,
0x65, 0x5f, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15,
0x2e, 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43,
0x68, 0x61, 0x6e, 0x67, 0x65, 0x48, 0x00, 0x52, 0x0e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63,
0x65, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x3d, 0x0a, 0x0e, 0x72, 0x65, 0x73, 0x6f, 0x75,
0x72, 0x63, 0x65, 0x5f, 0x61, 0x6c, 0x65, 0x72, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32,
0x14, 0x2e, 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65,
0x41, 0x6c, 0x65, 0x72, 0x74, 0x48, 0x00, 0x52, 0x0d, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63,
0x65, 0x41, 0x6c, 0x65, 0x72, 0x74, 0x42, 0x06, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x2a, 0x2f,
0x0a, 0x04, 0x54, 0x59, 0x50, 0x45, 0x12, 0x13, 0x0a, 0x0f, 0x52, 0x45, 0x53, 0x4f, 0x55, 0x52,
0x43, 0x45, 0x5f, 0x43, 0x48, 0x41, 0x4e, 0x47, 0x45, 0x10, 0x00, 0x12, 0x12, 0x0a, 0x0e, 0x52,
0x45, 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, 0x5f, 0x41, 0x4c, 0x45, 0x52, 0x54, 0x10, 0x01, 0x42,
0x36, 0x5a, 0x34, 0x67, 0x69, 0x74, 0x65, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x2d,
0x63, 0x6f, 0x75, 0x72, 0x73, 0x65, 0x2f, 0x67, 0x6f, 0x38, 0x2f, 0x6d, 0x69, 0x63, 0x72, 0x6f,
0x2f, 0x72, 0x70, 0x63, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x73, 0x61,
0x6d, 0x70, 0x6c, 0x65, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_pb_oneof_proto_rawDescOnce sync.Once
file_pb_oneof_proto_rawDescData = file_pb_oneof_proto_rawDesc
)
func file_pb_oneof_proto_rawDescGZIP() []byte {
file_pb_oneof_proto_rawDescOnce.Do(func() {
file_pb_oneof_proto_rawDescData = protoimpl.X.CompressGZIP(file_pb_oneof_proto_rawDescData)
})
return file_pb_oneof_proto_rawDescData
}
var file_pb_oneof_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
var file_pb_oneof_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
var file_pb_oneof_proto_goTypes = []interface{}{
(TYPE)(0), // 0: hello.TYPE
(*ResourceChange)(nil), // 1: hello.ResourceChange
(*ResourceAlert)(nil), // 2: hello.ResourceAlert
(*Event)(nil), // 3: hello.Event
}
var file_pb_oneof_proto_depIdxs = []int32{
0, // 0: hello.Event.type:type_name -> hello.TYPE
1, // 1: hello.Event.resource_change:type_name -> hello.ResourceChange
2, // 2: hello.Event.resource_alert:type_name -> hello.ResourceAlert
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_pb_oneof_proto_init() }
func file_pb_oneof_proto_init() {
if File_pb_oneof_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_pb_oneof_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ResourceChange); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_pb_oneof_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ResourceAlert); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_pb_oneof_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Event); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
file_pb_oneof_proto_msgTypes[2].OneofWrappers = []interface{}{
(*Event_ResourceChange)(nil),
(*Event_ResourceAlert)(nil),
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_pb_oneof_proto_rawDesc,
NumEnums: 1,
NumMessages: 3,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_pb_oneof_proto_goTypes,
DependencyIndexes: file_pb_oneof_proto_depIdxs,
EnumInfos: file_pb_oneof_proto_enumTypes,
MessageInfos: file_pb_oneof_proto_msgTypes,
}.Build()
File_pb_oneof_proto = out.File
file_pb_oneof_proto_rawDesc = nil
file_pb_oneof_proto_goTypes = nil
file_pb_oneof_proto_depIdxs = nil
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。