github.com/minio/minio@v0.0.0-20240328213742-3f72439b8a27/cmd/metacache-walk_gen.go (about) 1 package cmd 2 3 // Code generated by github.com/tinylib/msgp DO NOT EDIT. 4 5 import ( 6 "github.com/tinylib/msgp/msgp" 7 ) 8 9 // DecodeMsg implements msgp.Decodable 10 func (z *WalkDirOptions) DecodeMsg(dc *msgp.Reader) (err error) { 11 var field []byte 12 _ = field 13 var zb0001 uint32 14 zb0001, err = dc.ReadMapHeader() 15 if err != nil { 16 err = msgp.WrapError(err) 17 return 18 } 19 for zb0001 > 0 { 20 zb0001-- 21 field, err = dc.ReadMapKeyPtr() 22 if err != nil { 23 err = msgp.WrapError(err) 24 return 25 } 26 switch msgp.UnsafeString(field) { 27 case "Bucket": 28 z.Bucket, err = dc.ReadString() 29 if err != nil { 30 err = msgp.WrapError(err, "Bucket") 31 return 32 } 33 case "BaseDir": 34 z.BaseDir, err = dc.ReadString() 35 if err != nil { 36 err = msgp.WrapError(err, "BaseDir") 37 return 38 } 39 case "Recursive": 40 z.Recursive, err = dc.ReadBool() 41 if err != nil { 42 err = msgp.WrapError(err, "Recursive") 43 return 44 } 45 case "ReportNotFound": 46 z.ReportNotFound, err = dc.ReadBool() 47 if err != nil { 48 err = msgp.WrapError(err, "ReportNotFound") 49 return 50 } 51 case "FilterPrefix": 52 z.FilterPrefix, err = dc.ReadString() 53 if err != nil { 54 err = msgp.WrapError(err, "FilterPrefix") 55 return 56 } 57 case "ForwardTo": 58 z.ForwardTo, err = dc.ReadString() 59 if err != nil { 60 err = msgp.WrapError(err, "ForwardTo") 61 return 62 } 63 case "Limit": 64 z.Limit, err = dc.ReadInt() 65 if err != nil { 66 err = msgp.WrapError(err, "Limit") 67 return 68 } 69 case "DiskID": 70 z.DiskID, err = dc.ReadString() 71 if err != nil { 72 err = msgp.WrapError(err, "DiskID") 73 return 74 } 75 default: 76 err = dc.Skip() 77 if err != nil { 78 err = msgp.WrapError(err) 79 return 80 } 81 } 82 } 83 return 84 } 85 86 // EncodeMsg implements msgp.Encodable 87 func (z *WalkDirOptions) EncodeMsg(en *msgp.Writer) (err error) { 88 // map header, size 8 89 // write "Bucket" 90 err = en.Append(0x88, 0xa6, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74) 91 if err != nil { 92 return 93 } 94 err = en.WriteString(z.Bucket) 95 if err != nil { 96 err = msgp.WrapError(err, "Bucket") 97 return 98 } 99 // write "BaseDir" 100 err = en.Append(0xa7, 0x42, 0x61, 0x73, 0x65, 0x44, 0x69, 0x72) 101 if err != nil { 102 return 103 } 104 err = en.WriteString(z.BaseDir) 105 if err != nil { 106 err = msgp.WrapError(err, "BaseDir") 107 return 108 } 109 // write "Recursive" 110 err = en.Append(0xa9, 0x52, 0x65, 0x63, 0x75, 0x72, 0x73, 0x69, 0x76, 0x65) 111 if err != nil { 112 return 113 } 114 err = en.WriteBool(z.Recursive) 115 if err != nil { 116 err = msgp.WrapError(err, "Recursive") 117 return 118 } 119 // write "ReportNotFound" 120 err = en.Append(0xae, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x4e, 0x6f, 0x74, 0x46, 0x6f, 0x75, 0x6e, 0x64) 121 if err != nil { 122 return 123 } 124 err = en.WriteBool(z.ReportNotFound) 125 if err != nil { 126 err = msgp.WrapError(err, "ReportNotFound") 127 return 128 } 129 // write "FilterPrefix" 130 err = en.Append(0xac, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78) 131 if err != nil { 132 return 133 } 134 err = en.WriteString(z.FilterPrefix) 135 if err != nil { 136 err = msgp.WrapError(err, "FilterPrefix") 137 return 138 } 139 // write "ForwardTo" 140 err = en.Append(0xa9, 0x46, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x54, 0x6f) 141 if err != nil { 142 return 143 } 144 err = en.WriteString(z.ForwardTo) 145 if err != nil { 146 err = msgp.WrapError(err, "ForwardTo") 147 return 148 } 149 // write "Limit" 150 err = en.Append(0xa5, 0x4c, 0x69, 0x6d, 0x69, 0x74) 151 if err != nil { 152 return 153 } 154 err = en.WriteInt(z.Limit) 155 if err != nil { 156 err = msgp.WrapError(err, "Limit") 157 return 158 } 159 // write "DiskID" 160 err = en.Append(0xa6, 0x44, 0x69, 0x73, 0x6b, 0x49, 0x44) 161 if err != nil { 162 return 163 } 164 err = en.WriteString(z.DiskID) 165 if err != nil { 166 err = msgp.WrapError(err, "DiskID") 167 return 168 } 169 return 170 } 171 172 // MarshalMsg implements msgp.Marshaler 173 func (z *WalkDirOptions) MarshalMsg(b []byte) (o []byte, err error) { 174 o = msgp.Require(b, z.Msgsize()) 175 // map header, size 8 176 // string "Bucket" 177 o = append(o, 0x88, 0xa6, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74) 178 o = msgp.AppendString(o, z.Bucket) 179 // string "BaseDir" 180 o = append(o, 0xa7, 0x42, 0x61, 0x73, 0x65, 0x44, 0x69, 0x72) 181 o = msgp.AppendString(o, z.BaseDir) 182 // string "Recursive" 183 o = append(o, 0xa9, 0x52, 0x65, 0x63, 0x75, 0x72, 0x73, 0x69, 0x76, 0x65) 184 o = msgp.AppendBool(o, z.Recursive) 185 // string "ReportNotFound" 186 o = append(o, 0xae, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x4e, 0x6f, 0x74, 0x46, 0x6f, 0x75, 0x6e, 0x64) 187 o = msgp.AppendBool(o, z.ReportNotFound) 188 // string "FilterPrefix" 189 o = append(o, 0xac, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78) 190 o = msgp.AppendString(o, z.FilterPrefix) 191 // string "ForwardTo" 192 o = append(o, 0xa9, 0x46, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x54, 0x6f) 193 o = msgp.AppendString(o, z.ForwardTo) 194 // string "Limit" 195 o = append(o, 0xa5, 0x4c, 0x69, 0x6d, 0x69, 0x74) 196 o = msgp.AppendInt(o, z.Limit) 197 // string "DiskID" 198 o = append(o, 0xa6, 0x44, 0x69, 0x73, 0x6b, 0x49, 0x44) 199 o = msgp.AppendString(o, z.DiskID) 200 return 201 } 202 203 // UnmarshalMsg implements msgp.Unmarshaler 204 func (z *WalkDirOptions) UnmarshalMsg(bts []byte) (o []byte, err error) { 205 var field []byte 206 _ = field 207 var zb0001 uint32 208 zb0001, bts, err = msgp.ReadMapHeaderBytes(bts) 209 if err != nil { 210 err = msgp.WrapError(err) 211 return 212 } 213 for zb0001 > 0 { 214 zb0001-- 215 field, bts, err = msgp.ReadMapKeyZC(bts) 216 if err != nil { 217 err = msgp.WrapError(err) 218 return 219 } 220 switch msgp.UnsafeString(field) { 221 case "Bucket": 222 z.Bucket, bts, err = msgp.ReadStringBytes(bts) 223 if err != nil { 224 err = msgp.WrapError(err, "Bucket") 225 return 226 } 227 case "BaseDir": 228 z.BaseDir, bts, err = msgp.ReadStringBytes(bts) 229 if err != nil { 230 err = msgp.WrapError(err, "BaseDir") 231 return 232 } 233 case "Recursive": 234 z.Recursive, bts, err = msgp.ReadBoolBytes(bts) 235 if err != nil { 236 err = msgp.WrapError(err, "Recursive") 237 return 238 } 239 case "ReportNotFound": 240 z.ReportNotFound, bts, err = msgp.ReadBoolBytes(bts) 241 if err != nil { 242 err = msgp.WrapError(err, "ReportNotFound") 243 return 244 } 245 case "FilterPrefix": 246 z.FilterPrefix, bts, err = msgp.ReadStringBytes(bts) 247 if err != nil { 248 err = msgp.WrapError(err, "FilterPrefix") 249 return 250 } 251 case "ForwardTo": 252 z.ForwardTo, bts, err = msgp.ReadStringBytes(bts) 253 if err != nil { 254 err = msgp.WrapError(err, "ForwardTo") 255 return 256 } 257 case "Limit": 258 z.Limit, bts, err = msgp.ReadIntBytes(bts) 259 if err != nil { 260 err = msgp.WrapError(err, "Limit") 261 return 262 } 263 case "DiskID": 264 z.DiskID, bts, err = msgp.ReadStringBytes(bts) 265 if err != nil { 266 err = msgp.WrapError(err, "DiskID") 267 return 268 } 269 default: 270 bts, err = msgp.Skip(bts) 271 if err != nil { 272 err = msgp.WrapError(err) 273 return 274 } 275 } 276 } 277 o = bts 278 return 279 } 280 281 // Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message 282 func (z *WalkDirOptions) Msgsize() (s int) { 283 s = 1 + 7 + msgp.StringPrefixSize + len(z.Bucket) + 8 + msgp.StringPrefixSize + len(z.BaseDir) + 10 + msgp.BoolSize + 15 + msgp.BoolSize + 13 + msgp.StringPrefixSize + len(z.FilterPrefix) + 10 + msgp.StringPrefixSize + len(z.ForwardTo) + 6 + msgp.IntSize + 7 + msgp.StringPrefixSize + len(z.DiskID) 284 return 285 }