definition_scanner

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2019 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var InvalidEnum = errors.New("invalid Enum type")

Functions

This section is empty.

Types

type ArrayString

type ArrayString [2]string

type Binary

type Binary *multipart.FileHeader

type Bool

type Bool bool

type Composed

type Composed struct {
	Part
}

Composed

type Double

type Double float64

type Enum

type Enum int
const (
	ENUM_UNKNOWN Enum = iota
	ENUM__ONE         // one
	ENUM__TWO         // two
)

func ParseEnumFromLabelString

func ParseEnumFromLabelString(s string) (Enum, error)

func ParseEnumFromString

func ParseEnumFromString(s string) (Enum, error)

func (Enum) ConstValues

func (Enum) Int

func (v Enum) Int() int

func (Enum) Label

func (v Enum) Label() string

func (Enum) MarshalText

func (v Enum) MarshalText() ([]byte, error)

func (*Enum) Scan

func (v *Enum) Scan(src interface{}) error

func (Enum) String

func (v Enum) String() string

func (Enum) TypeName

func (Enum) TypeName() string

func (*Enum) UnmarshalText

func (v *Enum) UnmarshalText(data []byte) (err error)

func (Enum) Value

func (v Enum) Value() (database_sql_driver.Value, error)

type FakeBool

type FakeBool int

openapi:type boolean

type Float

type Float float32

type Int

type Int int

type Interface

type Interface interface{}

type InvalidComposed

type InvalidComposed struct {
	Part
	PartConflict
}

type Map

type Map map[string]String

type NamedComposed

type NamedComposed struct {
	Part `json:"part"`
}

type Part

type Part struct {
	Name string `json:",omitempty" validate:"@string[2,]"`

	Skip string `json:"-"`
	// contains filtered or unexported fields
}

type PartConflict

type PartConflict struct {
	Name string `json:"name" validate:"@string[0,)"`
}

type SliceNamed

type SliceNamed []String

type SliceString

type SliceString []string

type String

type String string

type Struct

type Struct struct {
	// name
	Name      *string    `json:"name" validate:"@string[2,]"`
	ID        **string   `json:"id,omitempty" default:"1" validate:"@string/\\d+/"`
	Enum      Enum       `json:"enum" validate:"@string{ONE}"`
	CreatedAt time2.Time `json:"createdAt,omitempty"`
	Slice     []float64  `json:"slice" validate:"@slice<@float64<7,5>>[1,3]"`
	Map       map[string]map[string]struct {
		ID int `json:"id" validate:"@int[0,10]"`
	} `json:"map,omitempty" validate:"@map<,@map<,@struct>>[0,3]"`
}

type Time

type Time time.Time

openapi:strfmt date-time 日期

type TimeAlias

type TimeAlias = time.Time

type Uint

type Uint uint

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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