httparg

package module
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2023 License: MIT Imports: 9 Imported by: 2

Documentation

Index

Constants

View Source
const (
	LOGGER_PREFIX string = "[httparg] "
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ContentProcessor

type ContentProcessor = internal.ContentProcessor

function

type ErrorHandler

type ErrorHandler func(err error)

function

type InvalidArgumentError

type InvalidArgumentError = arg.InvalidArgumentError

interface

type Option

type Option struct {
	ErrorHandler ErrorHandler
}

type Processor

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

func Args

func Args(target interface{}) *Processor

func ArgsWithOption

func ArgsWithOption(target interface{}, option Option) *Processor

func NewProcessor

func NewProcessor(target interface{}, option Option) *Processor

func (*Processor) Process

func (p *Processor) Process(content []byte, processor ContentProcessor) *Processor

func (*Processor) ProcessContent

func (p *Processor) ProcessContent(content []byte, contentType string) *Processor

func (*Processor) ProcessQueryString

func (p *Processor) ProcessQueryString(query string) *Processor

func (*Processor) Validate

func (p *Processor) Validate()

type Registry

type Registry struct{}
var RegistryService Registry

func (Registry) CurrentErrorHandler

func (r Registry) CurrentErrorHandler() ErrorHandler

func (Registry) RegisterContentProcessor

func (r Registry) RegisterContentProcessor(mediatype string, processor ContentProcessor) bool

func (Registry) SetupErrorHandler

func (r Registry) SetupErrorHandler(fn ErrorHandler)

type Validatable

type Validatable interface {
	Validate() error
}

interface

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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