| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
package sysctl |
| 10 |
|
| 11 |
import ( |
| 12 |
protoreflect "google.golang.org/protobuf/reflect/protoreflect" |
| 13 |
protoimpl "google.golang.org/protobuf/runtime/protoimpl" |
| 14 |
reflect "reflect" |
| 15 |
sync "sync" |
| 16 |
) |
| 17 |
|
| 18 |
const ( |
| 19 |
|
| 20 |
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) |
| 21 |
|
| 22 |
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) |
| 23 |
) |
| 24 |
|
| 25 |
type SysctlType int32 |
| 26 |
|
| 27 |
const ( |
| 28 |
SysctlType_CTL_STR SysctlType = 5 |
| 29 |
SysctlType_CTL_32 SysctlType = 6 |
| 30 |
) |
| 31 |
|
| 32 |
|
| 33 |
var ( |
| 34 |
SysctlType_name = map[int32]string{ |
| 35 |
5: "CTL_STR", |
| 36 |
6: "CTL_32", |
| 37 |
} |
| 38 |
SysctlType_value = map[string]int32{ |
| 39 |
"CTL_STR": 5, |
| 40 |
"CTL_32": 6, |
| 41 |
} |
| 42 |
) |
| 43 |
|
| 44 |
func (x SysctlType) Enum() *SysctlType { |
| 45 |
p := new(SysctlType) |
| 46 |
*p = x |
| 47 |
return p |
| 48 |
} |
| 49 |
|
| 50 |
func (x SysctlType) String() string { |
| 51 |
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) |
| 52 |
} |
| 53 |
|
| 54 |
func (SysctlType) Descriptor() protoreflect.EnumDescriptor { |
| 55 |
return file_sysctl_proto_enumTypes[0].Descriptor() |
| 56 |
} |
| 57 |
|
| 58 |
func (SysctlType) Type() protoreflect.EnumType { |
| 59 |
return &file_sysctl_proto_enumTypes[0] |
| 60 |
} |
| 61 |
|
| 62 |
func (x SysctlType) Number() protoreflect.EnumNumber { |
| 63 |
return protoreflect.EnumNumber(x) |
| 64 |
} |
| 65 |
|
| 66 |
|
| 67 |
func (x *SysctlType) UnmarshalJSON(b []byte) error { |
| 68 |
num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b) |
| 69 |
if err != nil { |
| 70 |
return err |
| 71 |
} |
| 72 |
*x = SysctlType(num) |
| 73 |
return nil |
| 74 |
} |
| 75 |
|
| 76 |
|
| 77 |
func (SysctlType) EnumDescriptor() ([]byte, []int) { |
| 78 |
return file_sysctl_proto_rawDescGZIP(), []int{0} |
| 79 |
} |
| 80 |
|
| 81 |
type SysctlEntry struct { |
| 82 |
state protoimpl.MessageState |
| 83 |
sizeCache protoimpl.SizeCache |
| 84 |
unknownFields protoimpl.UnknownFields |
| 85 |
|
| 86 |
Type *SysctlType `protobuf:"varint,1,req,name=type,enum=SysctlType" json:"type,omitempty"` |
| 87 |
Iarg *int32 `protobuf:"varint,2,opt,name=iarg" json:"iarg,omitempty"` |
| 88 |
Sarg *string `protobuf:"bytes,3,opt,name=sarg" json:"sarg,omitempty"` |
| 89 |
} |
| 90 |
|
| 91 |
func (x *SysctlEntry) Reset() { |
| 92 |
*x = SysctlEntry{} |
| 93 |
if protoimpl.UnsafeEnabled { |
| 94 |
mi := &file_sysctl_proto_msgTypes[0] |
| 95 |
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) |
| 96 |
ms.StoreMessageInfo(mi) |
| 97 |
} |
| 98 |
} |
| 99 |
|
| 100 |
func (x *SysctlEntry) String() string { |
| 101 |
return protoimpl.X.MessageStringOf(x) |
| 102 |
} |
| 103 |
|
| 104 |
func (*SysctlEntry) ProtoMessage() {} |
| 105 |
|
| 106 |
func (x *SysctlEntry) ProtoReflect() protoreflect.Message { |
| 107 |
mi := &file_sysctl_proto_msgTypes[0] |
| 108 |
if protoimpl.UnsafeEnabled && x != nil { |
| 109 |
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) |
| 110 |
if ms.LoadMessageInfo() == nil { |
| 111 |
ms.StoreMessageInfo(mi) |
| 112 |
} |
| 113 |
return ms |
| 114 |
} |
| 115 |
return mi.MessageOf(x) |
| 116 |
} |
| 117 |
|
| 118 |
|
| 119 |
func (*SysctlEntry) Descriptor() ([]byte, []int) { |
| 120 |
return file_sysctl_proto_rawDescGZIP(), []int{0} |
| 121 |
} |
| 122 |
|
| 123 |
func (x *SysctlEntry) GetType() SysctlType { |
| 124 |
if x != nil && x.Type != nil { |
| 125 |
return *x.Type |
| 126 |
} |
| 127 |
return SysctlType_CTL_STR |
| 128 |
} |
| 129 |
|
| 130 |
func (x *SysctlEntry) GetIarg() int32 { |
| 131 |
if x != nil && x.Iarg != nil { |
| 132 |
return *x.Iarg |
| 133 |
} |
| 134 |
return 0 |
| 135 |
} |
| 136 |
|
| 137 |
func (x *SysctlEntry) GetSarg() string { |
| 138 |
if x != nil && x.Sarg != nil { |
| 139 |
return *x.Sarg |
| 140 |
} |
| 141 |
return "" |
| 142 |
} |
| 143 |
|
| 144 |
var File_sysctl_proto protoreflect.FileDescriptor |
| 145 |
|
| 146 |
var file_sysctl_proto_rawDesc = []byte{ |
| 147 |
0x0a, 0x0c, 0x73, 0x79, 0x73, 0x63, 0x74, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x57, |
| 148 |
0x0a, 0x0c, 0x73, 0x79, 0x73, 0x63, 0x74, 0x6c, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x1f, |
| 149 |
0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x02, 0x28, 0x0e, 0x32, 0x0b, 0x2e, 0x53, |
| 150 |
0x79, 0x73, 0x63, 0x74, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, |
| 151 |
0x12, 0x0a, 0x04, 0x69, 0x61, 0x72, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x69, |
| 152 |
0x61, 0x72, 0x67, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x61, 0x72, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, |
| 153 |
0x09, 0x52, 0x04, 0x73, 0x61, 0x72, 0x67, 0x2a, 0x25, 0x0a, 0x0a, 0x53, 0x79, 0x73, 0x63, 0x74, |
| 154 |
0x6c, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x43, 0x54, 0x4c, 0x5f, 0x53, 0x54, 0x52, |
| 155 |
0x10, 0x05, 0x12, 0x0a, 0x0a, 0x06, 0x43, 0x54, 0x4c, 0x5f, 0x33, 0x32, 0x10, 0x06, |
| 156 |
} |
| 157 |
|
| 158 |
var ( |
| 159 |
file_sysctl_proto_rawDescOnce sync.Once |
| 160 |
file_sysctl_proto_rawDescData = file_sysctl_proto_rawDesc |
| 161 |
) |
| 162 |
|
| 163 |
func file_sysctl_proto_rawDescGZIP() []byte { |
| 164 |
file_sysctl_proto_rawDescOnce.Do(func() { |
| 165 |
file_sysctl_proto_rawDescData = protoimpl.X.CompressGZIP(file_sysctl_proto_rawDescData) |
| 166 |
}) |
| 167 |
return file_sysctl_proto_rawDescData |
| 168 |
} |
| 169 |
|
| 170 |
var file_sysctl_proto_enumTypes = make([]protoimpl.EnumInfo, 1) |
| 171 |
var file_sysctl_proto_msgTypes = make([]protoimpl.MessageInfo, 1) |
| 172 |
var file_sysctl_proto_goTypes = []interface{}{ |
| 173 |
(SysctlType)(0), |
| 174 |
(*SysctlEntry)(nil), |
| 175 |
} |
| 176 |
var file_sysctl_proto_depIdxs = []int32{ |
| 177 |
0, |
| 178 |
1, |
| 179 |
1, |
| 180 |
1, |
| 181 |
1, |
| 182 |
0, |
| 183 |
} |
| 184 |
|
| 185 |
func init() { file_sysctl_proto_init() } |
| 186 |
func file_sysctl_proto_init() { |
| 187 |
if File_sysctl_proto != nil { |
| 188 |
return |
| 189 |
} |
| 190 |
if !protoimpl.UnsafeEnabled { |
| 191 |
file_sysctl_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { |
| 192 |
switch v := v.(*SysctlEntry); i { |
| 193 |
case 0: |
| 194 |
return &v.state |
| 195 |
case 1: |
| 196 |
return &v.sizeCache |
| 197 |
case 2: |
| 198 |
return &v.unknownFields |
| 199 |
default: |
| 200 |
return nil |
| 201 |
} |
| 202 |
} |
| 203 |
} |
| 204 |
type x struct{} |
| 205 |
out := protoimpl.TypeBuilder{ |
| 206 |
File: protoimpl.DescBuilder{ |
| 207 |
GoPackagePath: reflect.TypeOf(x{}).PkgPath(), |
| 208 |
RawDescriptor: file_sysctl_proto_rawDesc, |
| 209 |
NumEnums: 1, |
| 210 |
NumMessages: 1, |
| 211 |
NumExtensions: 0, |
| 212 |
NumServices: 0, |
| 213 |
}, |
| 214 |
GoTypes: file_sysctl_proto_goTypes, |
| 215 |
DependencyIndexes: file_sysctl_proto_depIdxs, |
| 216 |
EnumInfos: file_sysctl_proto_enumTypes, |
| 217 |
MessageInfos: file_sysctl_proto_msgTypes, |
| 218 |
}.Build() |
| 219 |
File_sysctl_proto = out.File |
| 220 |
file_sysctl_proto_rawDesc = nil |
| 221 |
file_sysctl_proto_goTypes = nil |
| 222 |
file_sysctl_proto_depIdxs = nil |
| 223 |
} |