MCPcopy
hub / github.com/gofiber/fiber / MarshalMsg

Method MarshalMsg

middleware/cache/manager_msgp.go:577–641  ·  view source on GitHub ↗

MarshalMsg implements msgp.Marshaler

(b []byte)

Source from the content-addressed store, hash-verified

575
576// MarshalMsg implements msgp.Marshaler
577func (z *item) MarshalMsg(b []byte) (o []byte, err error) {
578 o = msgp.Require(b, z.Msgsize())
579 // map header, size 17
580 // string "headers"
581 o = append(o, 0xde, 0x0, 0x11, 0xa7, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73)
582 o = msgp.AppendArrayHeader(o, uint32(len(z.headers)))
583 for za0001 := range z.headers {
584 // map header, size 2
585 // string "key"
586 o = append(o, 0x82, 0xa3, 0x6b, 0x65, 0x79)
587 o = msgp.AppendBytes(o, z.headers[za0001].key)
588 // string "value"
589 o = append(o, 0xa5, 0x76, 0x61, 0x6c, 0x75, 0x65)
590 o = msgp.AppendBytes(o, z.headers[za0001].value)
591 }
592 // string "body"
593 o = append(o, 0xa4, 0x62, 0x6f, 0x64, 0x79)
594 o = msgp.AppendBytes(o, z.body)
595 // string "ctype"
596 o = append(o, 0xa5, 0x63, 0x74, 0x79, 0x70, 0x65)
597 o = msgp.AppendBytes(o, z.ctype)
598 // string "cencoding"
599 o = append(o, 0xa9, 0x63, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67)
600 o = msgp.AppendBytes(o, z.cencoding)
601 // string "cacheControl"
602 o = append(o, 0xac, 0x63, 0x61, 0x63, 0x68, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c)
603 o = msgp.AppendBytes(o, z.cacheControl)
604 // string "expires"
605 o = append(o, 0xa7, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x73)
606 o = msgp.AppendBytes(o, z.expires)
607 // string "etag"
608 o = append(o, 0xa4, 0x65, 0x74, 0x61, 0x67)
609 o = msgp.AppendBytes(o, z.etag)
610 // string "date"
611 o = append(o, 0xa4, 0x64, 0x61, 0x74, 0x65)
612 o = msgp.AppendUint64(o, z.date)
613 // string "status"
614 o = append(o, 0xa6, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73)
615 o = msgp.AppendInt(o, z.status)
616 // string "age"
617 o = append(o, 0xa3, 0x61, 0x67, 0x65)
618 o = msgp.AppendUint64(o, z.age)
619 // string "exp"
620 o = append(o, 0xa3, 0x65, 0x78, 0x70)
621 o = msgp.AppendUint64(o, z.exp)
622 // string "ttl"
623 o = append(o, 0xa3, 0x74, 0x74, 0x6c)
624 o = msgp.AppendUint64(o, z.ttl)
625 // string "forceRevalidate"
626 o = append(o, 0xaf, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x52, 0x65, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65)
627 o = msgp.AppendBool(o, z.forceRevalidate)
628 // string "revalidate"
629 o = append(o, 0xaa, 0x72, 0x65, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65)
630 o = msgp.AppendBool(o, z.revalidate)
631 // string "shareable"
632 o = append(o, 0xa9, 0x73, 0x68, 0x61, 0x72, 0x65, 0x61, 0x62, 0x6c, 0x65)
633 o = msgp.AppendBool(o, z.shareable)
634 // string "private"

Calls 1

MsgsizeMethod · 0.95