Versions in this module Expand all Collapse all v0 v0.0.1 Sep 17, 2025 Changes in this version + var ErrInputDecoding = apierror.NewAPIError("ERROR_DECODING_INPUT") + var ErrInvalidInput = apierror.NewAPIError("INVALID_INPUT") + var ErrValidation = apierror.NewAPIError("VALIDATION_ERROR") + type APIField struct + APIName string + Alias string + DBColumn string + Default any + Nested APIFields + Required bool + Source string + Type string + Validate []string + func (field APIField) WithAPIName(apiName string) APIField + func (field APIField) WithAlias(alias string) APIField + func (field APIField) WithDBColumn(dbColumn string) APIField + func (field APIField) WithDefault(defaultValue any) APIField + func (field APIField) WithNested(nested APIFields) APIField + func (field APIField) WithRequired(required bool) APIField + func (field APIField) WithSource(source string) APIField + func (field APIField) WithType(typ string) APIField + func (field APIField) WithValidate(validate []string) APIField + type APIFields []APIField + func NewAPIFields(fields ...APIField) APIFields + func (a APIFields) GetAPIField(field string) (APIField, error) + func (a APIFields) GetAPIFields(fields []string) (APIFields, error) + func (a APIFields) MustGetAPIField(field string) APIField + func (a APIFields) WithFields(fields ...APIField) APIFields + type ErrValidationData struct + Errors []FieldError + type FieldError struct + Field string + Message string + type MapInputHandler struct + func NewMapInputHandler[Input any](apiFields APIFields, conversionMap map[string]func(any) any, ...) *MapInputHandler[Input] + func (h *MapInputHandler[Input]) Handle(w http.ResponseWriter, r *http.Request) (*Input, error) + func (h *MapInputHandler[Input]) MustValidateAPIFields() *MapInputHandler[Input] + func (h *MapInputHandler[Input]) ValidateAPIFields() (*MapInputHandler[Input], error)