formatter

package
v0.0.0-...-27d25fc Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2020 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ValidTypeInt     = "int"
	ValidTypeBool    = "bool"
	ValidTypeFloat   = "float"
	ValidTypeMap     = "map"
	ValidTypeString  = "string"
	ValidTypeStrings = "strings"
)
View Source
var (
	IntFormatter    intFormatter
	BoolFormatter   boolFormatter
	FloatFormatter  floatFormatter
	StringFormatter stringFormatter
)

Functions

func CheckRule

func CheckRule(rule Rule) error

func GetParamRequireError

func GetParamRequireError(key string) error

Types

type Formatter

type Formatter interface {
	FormatterType() string
	Parse(ctx *gin.Context, rule Rule) interface{}
}

type Rule

type Rule map[string]interface{}

Jump to

Keyboard shortcuts

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