qbind

package
v0.0.0 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Bind

func Bind[I any](ctx context.Context, req *http.Request, metadata Metadata) (I, error)

Types

type Metadata

type Metadata struct {
	HasData bool // Action is empty

	JSONFields []string
	Queries    []string // query string keys (recursive structure is not supported, also embedded)
	Headers    []string // header keys (recursive structure is not supported, also embedded)
	PathVars   []string // path variables
}

func Scan

func Scan[I any, O any](action func(context.Context, I) (O, error)) Metadata

type Validator

type Validator interface {
	Validate(context.Context) error
}

Jump to

Keyboard shortcuts

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