cbor.go — fiber Source File
Architecture documentation for cbor.go, a go file in the fiber codebase. 1 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR e572731a_2c53_4da8_8557_00efa1c2c009["cbor.go"] baa5866c_7884_3b82_5e75_ef5c8f224470["v2"] e572731a_2c53_4da8_8557_00efa1c2c009 --> baa5866c_7884_3b82_5e75_ef5c8f224470 style e572731a_2c53_4da8_8557_00efa1c2c009 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
package binder
import (
"github.com/gofiber/utils/v2"
)
// CBORBinding is the CBOR binder for CBOR request body.
type CBORBinding struct {
CBORDecoder utils.CBORUnmarshal
}
// Name returns the binding name.
func (*CBORBinding) Name() string {
return "cbor"
}
// Bind parses the request body as CBOR and returns the result.
func (b *CBORBinding) Bind(body []byte, out any) error {
return b.CBORDecoder(body, out)
}
// Reset resets the CBORBinding binder.
func (b *CBORBinding) Reset() {
b.CBORDecoder = nil
}
// UnimplementedCborMarshal panics to signal that a CBOR marshaler must be
// configured before CBOR support can be used.
func UnimplementedCborMarshal(_ any) ([]byte, error) {
panic("Must explicitly setup CBOR, please check docs: https://docs.gofiber.io/next/guide/advance-format#cbor")
}
// UnimplementedCborUnmarshal panics to signal that a CBOR unmarshaler must be
// configured before CBOR support can be used.
func UnimplementedCborUnmarshal(_ []byte, _ any) error {
panic("Must explicitly setup CBOR, please check docs: https://docs.gofiber.io/next/guide/advance-format#cbor")
}
Domain
Subdomains
Types
Dependencies
- v2
Source
Frequently Asked Questions
What does cbor.go do?
cbor.go is a source file in the fiber codebase, written in go. It belongs to the DataBinding domain, PayloadParsers subdomain.
What functions are defined in cbor.go?
cbor.go defines 2 function(s): UnimplementedCborMarshal, UnimplementedCborUnmarshal.
What does cbor.go depend on?
cbor.go imports 1 module(s): v2.
Where is cbor.go in the architecture?
cbor.go is located at binder/cbor.go (domain: DataBinding, subdomain: PayloadParsers, directory: binder).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free