tests

package
v0.0.0-...-3365746 Latest Latest
Warning

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

Go to latest
Published: Jul 7, 2016 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 ExcludedField

type ExcludedField struct {
	Process       bool `json:"process"`
	DoNotProcess  bool `json:"-"`
	DoNotProcess1 bool `json:"-"`
}

type Mapping

type Mapping struct {
	Field string
	Str   string
	Str2  string

	Mapping *easyjson.JsonMapping `json:"-"`
}

type Maps

type Maps struct {
	Map          map[string]string
	InterfaceMap map[string]interface{}
	NilMap       map[string]string

	CustomMap map[Str]Str
}

type NamedBool

type NamedBool bool

type NamedFloat32

type NamedFloat32 float32

type NamedFloat64

type NamedFloat64 float64

type NamedInt

type NamedInt int

type NamedInt16

type NamedInt16 int16

type NamedInt32

type NamedInt32 int32

type NamedInt64

type NamedInt64 int64

type NamedInt8

type NamedInt8 int8

type NamedPrimitiveTypes

type NamedPrimitiveTypes struct {
	String NamedString
	Bool   NamedBool

	Int   NamedInt
	Int8  NamedInt8
	Int16 NamedInt16
	Int32 NamedInt32
	Int64 NamedInt64

	Uint   NamedUint
	Uint8  NamedUint8
	Uint16 NamedUint16
	Uint32 NamedUint32
	Uint64 NamedUint64

	Float32 NamedFloat32
	Float64 NamedFloat64

	Ptr    NamedStrPtr
	PtrNil NamedStrPtr
}

type NamedStrPtr

type NamedStrPtr *string

type NamedString

type NamedString string

type NamedUint

type NamedUint uint

type NamedUint16

type NamedUint16 uint16

type NamedUint32

type NamedUint32 uint32

type NamedUint64

type NamedUint64 uint64

type NamedUint8

type NamedUint8 uint8

type OmitEmpty

type OmitEmpty struct {
	StrE, StrNE string  `json:",omitempty"`
	PtrE, PtrNE *string `json:",omitempty"`

	IntNE int `json:"intField,omitempty"`
	IntE  int `json:",omitempty"`

	// NOTE: omitempty has no effect on non-pointer struct fields.
	SubE, SubNE   SubStruct  `json:",omitempty"`
	SubPE, SubPNE *SubStruct `json:",omitempty"`
}

type OmitEmptyDefault

type OmitEmptyDefault struct {
	Field string
	Str   string
	Str1  string `json:"s,!omitempty"`
	Str2  string `json:",!omitempty"`
}

type Opts

type Opts struct {
	StrNull      opt.String
	StrEmpty     opt.String
	Str          opt.String
	StrOmitempty opt.String `json:",omitempty"`

	IntNull opt.Int
	IntZero opt.Int
	Int     opt.Int
}

type PrimitiveTypes

type PrimitiveTypes struct {
	String string
	Bool   bool

	Int   int
	Int8  int8
	Int16 int16
	Int32 int32
	Int64 int64

	Uint   uint
	Uint8  uint8
	Uint16 uint16
	Uint32 uint32
	Uint64 uint64

	IntString   int   `json:",string"`
	Int8String  int8  `json:",string"`
	Int16String int16 `json:",string"`
	Int32String int32 `json:",string"`
	Int64String int64 `json:",string"`

	UintString   uint   `json:",string"`
	Uint8String  uint8  `json:",string"`
	Uint16String uint16 `json:",string"`
	Uint32String uint32 `json:",string"`
	Uint64String uint64 `json:",string"`

	Float32 float32
	Float64 float64

	Ptr    *string
	PtrNil *string
}

type Raw

type Raw struct {
	Field  easyjson.RawMessage
	Field2 string
}

type RequiredOptionalStruct

type RequiredOptionalStruct struct {
	FirstName string `json:"first_name,required"`
	Lastname  string `json:"last_name"`
}

type SnakeStruct

type SnakeStruct struct {
	WeirdHTTPStuff   bool
	CustomNamedField string `json:"cUsToM"`
}

type StdMarshaler

type StdMarshaler struct {
	T time.Time
}

type Str

type Str string

type Structs

type Structs struct {
	SubStruct
	*SubP

	Value2 int

	Sub1   SubStruct `json:"substruct"`
	Sub2   *SubStruct
	SubNil *SubStruct

	SubSlice    []SubStruct
	SubSliceNil []SubStruct

	SubPtrSlice    []*SubStruct
	SubPtrSliceNil []*SubStruct

	SubA1 SubStructAlias
	SubA2 *SubStructAlias

	Anonymous struct {
		V string
		I int
	}
	Anonymous1 *struct {
		V string
	}

	AnonymousSlice    []struct{ V int }
	AnonymousPtrSlice []*struct{ V int }
	// contains filtered or unexported fields
}

type SubP

type SubP struct {
	V string
}

type SubStruct

type SubStruct struct {
	Value  string
	Value2 string
	// contains filtered or unexported fields
}

type SubStructAlias

type SubStructAlias SubStruct

Jump to

Keyboard shortcuts

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