Documentation
¶
Index ¶
- Constants
- func NewRequest(ctx context.Context, method, path_ string, payload any) (*http.Request, error)
- func Register(p Provider)
- func UnmarshalRequest(req request.Request, x any) error
- func UnmarshalUnderlyingRequest(req *http.Request, x any) error
- type Arshaler
- type Option
- type Provider
- type Transformer
Constants ¶
View Source
const ( ForUnmarshalling = "unmarshal" ForMarshalling = "marshal" )
Variables ¶
This section is empty.
Functions ¶
func NewRequest ¶
Types ¶
type Arshaler ¶
type Arshaler interface {
Type() reflect.Type
Values(*scanner.Field) iter.Seq[reflect.Value]
ValuesForModification(*scanner.Field, int) iter.Seq2[int, reflect.Value]
MarshalValues(ctx context.Context, f *scanner.Field) (values []string, err error)
UnmarshalValues(ctx context.Context, f *scanner.Field, values []string) error
UnmarshalReaders(ctx context.Context, f *scanner.Field, readers []io.ReadCloser) error
MarshalRequest(ctx context.Context, method string, segments path.Segments) (*http.Request, error)
UnmarshalRequest(r request.Request) error
UnmarshalUnderlyingRequest(*http.Request) error
}
func NewArshaler ¶
type Provider ¶
type Provider interface {
Names() []string
Transformer() (Transformer, error)
}
Click to show internal directories.
Click to hide internal directories.