formdata

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2019 License: OSL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DefaultFormDataDecoderImpl

type DefaultFormDataDecoderImpl struct{}

DefaultFormDataDecoderImpl represents implementation of default domain.FormDataDecoder.

func (*DefaultFormDataDecoderImpl) Decode

func (p *DefaultFormDataDecoderImpl) Decode(_ context.Context, _ *web.Request, values url.Values, formData interface{}) (interface{}, error)

Decode performs default form data decoding, depending if passed form data is instance of map[string]string or any other interface.

type DefaultFormDataEncoderImpl added in v1.0.1

type DefaultFormDataEncoderImpl struct{}

DefaultFormDataEncoderImpl represents implementation of default domain.FormDataEncoder.

func (*DefaultFormDataEncoderImpl) Encode added in v1.0.1

func (p *DefaultFormDataEncoderImpl) Encode(_ context.Context, formData interface{}) (url.Values, error)

Encode performs default form data encoding, depending if passed form data is instance of map[string]string or any other interface.

type DefaultFormDataProviderImpl

type DefaultFormDataProviderImpl struct{}

DefaultFormDataProviderImpl represents implementation of default domain.FormDataProvider.

func (*DefaultFormDataProviderImpl) GetFormData

func (p *DefaultFormDataProviderImpl) GetFormData(context.Context, *web.Request) (interface{}, error)

GetFormData performs default form data providing, by passing simple form data as instance of map[string]string.

type DefaultFormDataValidatorImpl

type DefaultFormDataValidatorImpl struct{}

DefaultFormDataValidatorImpl represents implementation of default domain.FormDataValidator.

func (*DefaultFormDataValidatorImpl) Validate

func (p *DefaultFormDataValidatorImpl) Validate(ctx context.Context, req *web.Request, validatorProvider domain.ValidatorProvider, formData interface{}) (*domain.ValidationInfo, error)

Validate performs default form data validation, by using go-playground validator package and storing results into domain.ValidationInfo instance.

Jump to

Keyboard shortcuts

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