extensions

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2019 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ValidateExtension

type ValidateExtension struct {
	*validate.FieldRules
	// contains filtered or unexported fields
}

ValidateExtension contains the rules set by the (validate.rules) method option extension.

func (ValidateExtension) MarshalJSON

func (v ValidateExtension) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaler interface.

func (ValidateExtension) Rules

func (v ValidateExtension) Rules() []ValidateRule

type ValidateRule

type ValidateRule struct {
	Name  string      `json:"name"`
	Value interface{} `json:"value"`
}

ValidateRule represents a single validator rule from the (validate.rules) method option extension.

Jump to

Keyboard shortcuts

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