github.com/minio/minio@v0.0.0-20240328213742-3f72439b8a27/cmd/metacache_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 *metacache) 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 "end":
    28  			z.ended, err = dc.ReadTime()
    29  			if err != nil {
    30  				err = msgp.WrapError(err, "ended")
    31  				return
    32  			}
    33  		case "st":
    34  			z.started, err = dc.ReadTime()
    35  			if err != nil {
    36  				err = msgp.WrapError(err, "started")
    37  				return
    38  			}
    39  		case "lh":
    40  			z.lastHandout, err = dc.ReadTime()
    41  			if err != nil {
    42  				err = msgp.WrapError(err, "lastHandout")
    43  				return
    44  			}
    45  		case "u":
    46  			z.lastUpdate, err = dc.ReadTime()
    47  			if err != nil {
    48  				err = msgp.WrapError(err, "lastUpdate")
    49  				return
    50  			}
    51  		case "b":
    52  			z.bucket, err = dc.ReadString()
    53  			if err != nil {
    54  				err = msgp.WrapError(err, "bucket")
    55  				return
    56  			}
    57  		case "flt":
    58  			z.filter, err = dc.ReadString()
    59  			if err != nil {
    60  				err = msgp.WrapError(err, "filter")
    61  				return
    62  			}
    63  		case "id":
    64  			z.id, err = dc.ReadString()
    65  			if err != nil {
    66  				err = msgp.WrapError(err, "id")
    67  				return
    68  			}
    69  		case "err":
    70  			z.error, err = dc.ReadString()
    71  			if err != nil {
    72  				err = msgp.WrapError(err, "error")
    73  				return
    74  			}
    75  		case "root":
    76  			z.root, err = dc.ReadString()
    77  			if err != nil {
    78  				err = msgp.WrapError(err, "root")
    79  				return
    80  			}
    81  		case "fnf":
    82  			z.fileNotFound, err = dc.ReadBool()
    83  			if err != nil {
    84  				err = msgp.WrapError(err, "fileNotFound")
    85  				return
    86  			}
    87  		case "stat":
    88  			{
    89  				var zb0002 uint8
    90  				zb0002, err = dc.ReadUint8()
    91  				if err != nil {
    92  					err = msgp.WrapError(err, "status")
    93  					return
    94  				}
    95  				z.status = scanStatus(zb0002)
    96  			}
    97  		case "rec":
    98  			z.recursive, err = dc.ReadBool()
    99  			if err != nil {
   100  				err = msgp.WrapError(err, "recursive")
   101  				return
   102  			}
   103  		case "v":
   104  			z.dataVersion, err = dc.ReadUint8()
   105  			if err != nil {
   106  				err = msgp.WrapError(err, "dataVersion")
   107  				return
   108  			}
   109  		default:
   110  			err = dc.Skip()
   111  			if err != nil {
   112  				err = msgp.WrapError(err)
   113  				return
   114  			}
   115  		}
   116  	}
   117  	return
   118  }
   119  
   120  // EncodeMsg implements msgp.Encodable
   121  func (z *metacache) EncodeMsg(en *msgp.Writer) (err error) {
   122  	// map header, size 13
   123  	// write "end"
   124  	err = en.Append(0x8d, 0xa3, 0x65, 0x6e, 0x64)
   125  	if err != nil {
   126  		return
   127  	}
   128  	err = en.WriteTime(z.ended)
   129  	if err != nil {
   130  		err = msgp.WrapError(err, "ended")
   131  		return
   132  	}
   133  	// write "st"
   134  	err = en.Append(0xa2, 0x73, 0x74)
   135  	if err != nil {
   136  		return
   137  	}
   138  	err = en.WriteTime(z.started)
   139  	if err != nil {
   140  		err = msgp.WrapError(err, "started")
   141  		return
   142  	}
   143  	// write "lh"
   144  	err = en.Append(0xa2, 0x6c, 0x68)
   145  	if err != nil {
   146  		return
   147  	}
   148  	err = en.WriteTime(z.lastHandout)
   149  	if err != nil {
   150  		err = msgp.WrapError(err, "lastHandout")
   151  		return
   152  	}
   153  	// write "u"
   154  	err = en.Append(0xa1, 0x75)
   155  	if err != nil {
   156  		return
   157  	}
   158  	err = en.WriteTime(z.lastUpdate)
   159  	if err != nil {
   160  		err = msgp.WrapError(err, "lastUpdate")
   161  		return
   162  	}
   163  	// write "b"
   164  	err = en.Append(0xa1, 0x62)
   165  	if err != nil {
   166  		return
   167  	}
   168  	err = en.WriteString(z.bucket)
   169  	if err != nil {
   170  		err = msgp.WrapError(err, "bucket")
   171  		return
   172  	}
   173  	// write "flt"
   174  	err = en.Append(0xa3, 0x66, 0x6c, 0x74)
   175  	if err != nil {
   176  		return
   177  	}
   178  	err = en.WriteString(z.filter)
   179  	if err != nil {
   180  		err = msgp.WrapError(err, "filter")
   181  		return
   182  	}
   183  	// write "id"
   184  	err = en.Append(0xa2, 0x69, 0x64)
   185  	if err != nil {
   186  		return
   187  	}
   188  	err = en.WriteString(z.id)
   189  	if err != nil {
   190  		err = msgp.WrapError(err, "id")
   191  		return
   192  	}
   193  	// write "err"
   194  	err = en.Append(0xa3, 0x65, 0x72, 0x72)
   195  	if err != nil {
   196  		return
   197  	}
   198  	err = en.WriteString(z.error)
   199  	if err != nil {
   200  		err = msgp.WrapError(err, "error")
   201  		return
   202  	}
   203  	// write "root"
   204  	err = en.Append(0xa4, 0x72, 0x6f, 0x6f, 0x74)
   205  	if err != nil {
   206  		return
   207  	}
   208  	err = en.WriteString(z.root)
   209  	if err != nil {
   210  		err = msgp.WrapError(err, "root")
   211  		return
   212  	}
   213  	// write "fnf"
   214  	err = en.Append(0xa3, 0x66, 0x6e, 0x66)
   215  	if err != nil {
   216  		return
   217  	}
   218  	err = en.WriteBool(z.fileNotFound)
   219  	if err != nil {
   220  		err = msgp.WrapError(err, "fileNotFound")
   221  		return
   222  	}
   223  	// write "stat"
   224  	err = en.Append(0xa4, 0x73, 0x74, 0x61, 0x74)
   225  	if err != nil {
   226  		return
   227  	}
   228  	err = en.WriteUint8(uint8(z.status))
   229  	if err != nil {
   230  		err = msgp.WrapError(err, "status")
   231  		return
   232  	}
   233  	// write "rec"
   234  	err = en.Append(0xa3, 0x72, 0x65, 0x63)
   235  	if err != nil {
   236  		return
   237  	}
   238  	err = en.WriteBool(z.recursive)
   239  	if err != nil {
   240  		err = msgp.WrapError(err, "recursive")
   241  		return
   242  	}
   243  	// write "v"
   244  	err = en.Append(0xa1, 0x76)
   245  	if err != nil {
   246  		return
   247  	}
   248  	err = en.WriteUint8(z.dataVersion)
   249  	if err != nil {
   250  		err = msgp.WrapError(err, "dataVersion")
   251  		return
   252  	}
   253  	return
   254  }
   255  
   256  // MarshalMsg implements msgp.Marshaler
   257  func (z *metacache) MarshalMsg(b []byte) (o []byte, err error) {
   258  	o = msgp.Require(b, z.Msgsize())
   259  	// map header, size 13
   260  	// string "end"
   261  	o = append(o, 0x8d, 0xa3, 0x65, 0x6e, 0x64)
   262  	o = msgp.AppendTime(o, z.ended)
   263  	// string "st"
   264  	o = append(o, 0xa2, 0x73, 0x74)
   265  	o = msgp.AppendTime(o, z.started)
   266  	// string "lh"
   267  	o = append(o, 0xa2, 0x6c, 0x68)
   268  	o = msgp.AppendTime(o, z.lastHandout)
   269  	// string "u"
   270  	o = append(o, 0xa1, 0x75)
   271  	o = msgp.AppendTime(o, z.lastUpdate)
   272  	// string "b"
   273  	o = append(o, 0xa1, 0x62)
   274  	o = msgp.AppendString(o, z.bucket)
   275  	// string "flt"
   276  	o = append(o, 0xa3, 0x66, 0x6c, 0x74)
   277  	o = msgp.AppendString(o, z.filter)
   278  	// string "id"
   279  	o = append(o, 0xa2, 0x69, 0x64)
   280  	o = msgp.AppendString(o, z.id)
   281  	// string "err"
   282  	o = append(o, 0xa3, 0x65, 0x72, 0x72)
   283  	o = msgp.AppendString(o, z.error)
   284  	// string "root"
   285  	o = append(o, 0xa4, 0x72, 0x6f, 0x6f, 0x74)
   286  	o = msgp.AppendString(o, z.root)
   287  	// string "fnf"
   288  	o = append(o, 0xa3, 0x66, 0x6e, 0x66)
   289  	o = msgp.AppendBool(o, z.fileNotFound)
   290  	// string "stat"
   291  	o = append(o, 0xa4, 0x73, 0x74, 0x61, 0x74)
   292  	o = msgp.AppendUint8(o, uint8(z.status))
   293  	// string "rec"
   294  	o = append(o, 0xa3, 0x72, 0x65, 0x63)
   295  	o = msgp.AppendBool(o, z.recursive)
   296  	// string "v"
   297  	o = append(o, 0xa1, 0x76)
   298  	o = msgp.AppendUint8(o, z.dataVersion)
   299  	return
   300  }
   301  
   302  // UnmarshalMsg implements msgp.Unmarshaler
   303  func (z *metacache) UnmarshalMsg(bts []byte) (o []byte, err error) {
   304  	var field []byte
   305  	_ = field
   306  	var zb0001 uint32
   307  	zb0001, bts, err = msgp.ReadMapHeaderBytes(bts)
   308  	if err != nil {
   309  		err = msgp.WrapError(err)
   310  		return
   311  	}
   312  	for zb0001 > 0 {
   313  		zb0001--
   314  		field, bts, err = msgp.ReadMapKeyZC(bts)
   315  		if err != nil {
   316  			err = msgp.WrapError(err)
   317  			return
   318  		}
   319  		switch msgp.UnsafeString(field) {
   320  		case "end":
   321  			z.ended, bts, err = msgp.ReadTimeBytes(bts)
   322  			if err != nil {
   323  				err = msgp.WrapError(err, "ended")
   324  				return
   325  			}
   326  		case "st":
   327  			z.started, bts, err = msgp.ReadTimeBytes(bts)
   328  			if err != nil {
   329  				err = msgp.WrapError(err, "started")
   330  				return
   331  			}
   332  		case "lh":
   333  			z.lastHandout, bts, err = msgp.ReadTimeBytes(bts)
   334  			if err != nil {
   335  				err = msgp.WrapError(err, "lastHandout")
   336  				return
   337  			}
   338  		case "u":
   339  			z.lastUpdate, bts, err = msgp.ReadTimeBytes(bts)
   340  			if err != nil {
   341  				err = msgp.WrapError(err, "lastUpdate")
   342  				return
   343  			}
   344  		case "b":
   345  			z.bucket, bts, err = msgp.ReadStringBytes(bts)
   346  			if err != nil {
   347  				err = msgp.WrapError(err, "bucket")
   348  				return
   349  			}
   350  		case "flt":
   351  			z.filter, bts, err = msgp.ReadStringBytes(bts)
   352  			if err != nil {
   353  				err = msgp.WrapError(err, "filter")
   354  				return
   355  			}
   356  		case "id":
   357  			z.id, bts, err = msgp.ReadStringBytes(bts)
   358  			if err != nil {
   359  				err = msgp.WrapError(err, "id")
   360  				return
   361  			}
   362  		case "err":
   363  			z.error, bts, err = msgp.ReadStringBytes(bts)
   364  			if err != nil {
   365  				err = msgp.WrapError(err, "error")
   366  				return
   367  			}
   368  		case "root":
   369  			z.root, bts, err = msgp.ReadStringBytes(bts)
   370  			if err != nil {
   371  				err = msgp.WrapError(err, "root")
   372  				return
   373  			}
   374  		case "fnf":
   375  			z.fileNotFound, bts, err = msgp.ReadBoolBytes(bts)
   376  			if err != nil {
   377  				err = msgp.WrapError(err, "fileNotFound")
   378  				return
   379  			}
   380  		case "stat":
   381  			{
   382  				var zb0002 uint8
   383  				zb0002, bts, err = msgp.ReadUint8Bytes(bts)
   384  				if err != nil {
   385  					err = msgp.WrapError(err, "status")
   386  					return
   387  				}
   388  				z.status = scanStatus(zb0002)
   389  			}
   390  		case "rec":
   391  			z.recursive, bts, err = msgp.ReadBoolBytes(bts)
   392  			if err != nil {
   393  				err = msgp.WrapError(err, "recursive")
   394  				return
   395  			}
   396  		case "v":
   397  			z.dataVersion, bts, err = msgp.ReadUint8Bytes(bts)
   398  			if err != nil {
   399  				err = msgp.WrapError(err, "dataVersion")
   400  				return
   401  			}
   402  		default:
   403  			bts, err = msgp.Skip(bts)
   404  			if err != nil {
   405  				err = msgp.WrapError(err)
   406  				return
   407  			}
   408  		}
   409  	}
   410  	o = bts
   411  	return
   412  }
   413  
   414  // Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
   415  func (z *metacache) Msgsize() (s int) {
   416  	s = 1 + 4 + msgp.TimeSize + 3 + msgp.TimeSize + 3 + msgp.TimeSize + 2 + msgp.TimeSize + 2 + msgp.StringPrefixSize + len(z.bucket) + 4 + msgp.StringPrefixSize + len(z.filter) + 3 + msgp.StringPrefixSize + len(z.id) + 4 + msgp.StringPrefixSize + len(z.error) + 5 + msgp.StringPrefixSize + len(z.root) + 4 + msgp.BoolSize + 5 + msgp.Uint8Size + 4 + msgp.BoolSize + 2 + msgp.Uint8Size
   417  	return
   418  }
   419  
   420  // DecodeMsg implements msgp.Decodable
   421  func (z *scanStatus) DecodeMsg(dc *msgp.Reader) (err error) {
   422  	{
   423  		var zb0001 uint8
   424  		zb0001, err = dc.ReadUint8()
   425  		if err != nil {
   426  			err = msgp.WrapError(err)
   427  			return
   428  		}
   429  		(*z) = scanStatus(zb0001)
   430  	}
   431  	return
   432  }
   433  
   434  // EncodeMsg implements msgp.Encodable
   435  func (z scanStatus) EncodeMsg(en *msgp.Writer) (err error) {
   436  	err = en.WriteUint8(uint8(z))
   437  	if err != nil {
   438  		err = msgp.WrapError(err)
   439  		return
   440  	}
   441  	return
   442  }
   443  
   444  // MarshalMsg implements msgp.Marshaler
   445  func (z scanStatus) MarshalMsg(b []byte) (o []byte, err error) {
   446  	o = msgp.Require(b, z.Msgsize())
   447  	o = msgp.AppendUint8(o, uint8(z))
   448  	return
   449  }
   450  
   451  // UnmarshalMsg implements msgp.Unmarshaler
   452  func (z *scanStatus) UnmarshalMsg(bts []byte) (o []byte, err error) {
   453  	{
   454  		var zb0001 uint8
   455  		zb0001, bts, err = msgp.ReadUint8Bytes(bts)
   456  		if err != nil {
   457  			err = msgp.WrapError(err)
   458  			return
   459  		}
   460  		(*z) = scanStatus(zb0001)
   461  	}
   462  	o = bts
   463  	return
   464  }
   465  
   466  // Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
   467  func (z scanStatus) Msgsize() (s int) {
   468  	s = msgp.Uint8Size
   469  	return
   470  }