Documentation ¶
Overview ¶
Package params defines different types of params used for changeset input.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Form ¶ added in v1.3.0
type Form map[string][]interface{}
Form is param type alias for url.Values
func (Form) Get ¶ added in v1.3.0
Get returns value as interface. returns nil if value doens't exists. the value returned is slice of interface{}
func (Form) GetParamsSlice ¶ added in v1.3.0
GetParamsSlice returns slice of nested param
func (Form) GetWithType ¶ added in v1.3.0
GetWithType returns value given from given name and type. second return value will only be false if the type of parameter is not convertible to requested type. If value is not convertible to type, it'll return nil, false If value is not exists, it will return nil, true
type JSON ¶
JSON is param type for json document.
func (*JSON) GetParamsSlice ¶
GetParamsSlice returns slice of nested param
func (*JSON) GetWithType ¶
GetWithType returns value given from given name and type. second return value will only be false if the type of parameter is not convertible to requested type. If value is not convertible to type, it'll return nil, false If value is not exists, it will return nil, true
type Map ¶
type Map map[string]interface{}
Map is param type alias for map[string]interface{}
func (Map) GetParamsSlice ¶
GetParamsSlice returns slice of nested param
func (Map) GetWithType ¶
GetWithType returns value given from given name and type. second return value will only be false if the type of parameter is not convertible to requested type. If value is not convertible to type, it'll return nil, false If value is not exists, it will return nil, true
type Params ¶
type Params interface { Exists(name string) bool Get(name string) interface{} GetWithType(name string, typ reflect.Type) (interface{}, bool) GetParams(name string) (Params, bool) GetParamsSlice(name string) ([]Params, bool) }
Params is interface used by changeset when casting parameters to changeset.