lrvalidate

package
v0.0.0-...-5999da7 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

The lrvalidate package is used to validate query parameters to be submitted with request

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Validate

func Validate(allowed map[string]bool, params interface{}) (map[string]string, error)

Validate verifies an interface{} only contains keys belonging to the allowed map of keys It returns a map[string]string if type assertion is successful and all params are validated It returns an error if the submitted params cannot be type asserted into map[string]string, or if the submitted params contain keys that is not included in the allowed map[string]bool

Types

This section is empty.

Jump to

Keyboard shortcuts

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