body

package
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 14, 2026 License: Apache-2.0 Imports: 11 Imported by: 2 modules, 2 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package body resolves whole or named request bodies to planned Go types.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Option

type Option func(*Source)

func WithExactFieldNames

func WithExactFieldNames() Option

type Source

type Source struct {
	// contains filtered or unexported fields
}

func New

func New(raw []byte, contentType string, aliases map[string]string, options ...Option) (*Source, error)

func (*Source) CaptureSource

func (s *Source) CaptureSource(ctx context.Context, target reflect.Type, name string) (any, bool, error)

CaptureSource retains the selected JSON bytes before decoding loses omission, null or number precision. Other media keep this provider's normal source-type conversion. ReplayPlan owns selection; the body provider owns JSON extraction.

func (*Source) DefaultCacheable

func (s *Source) DefaultCacheable() bool

func (*Source) Kind

func (s *Source) Kind() string

func (*Source) Locate

func (s *Source) Locate(*structology.State) locator.Locator

func (*Source) Priority

func (s *Source) Priority() int

func (*Source) Value

func (s *Source) Value(_ context.Context, target reflect.Type, name string) (any, bool, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL