Documentation ¶
Index ¶
Constants ¶
View Source
const DefaultMapConvTag = "mapconv"
DefaultMapConvTag デフォルトのmapconvタグ名
Variables ¶
This section is empty.
Functions ¶
func ConvertFrom ¶
func ConvertFrom(source interface{}, dest interface{}) error
ConvertFrom converts struct which input by mapconv from plain models
Types ¶
type Decoder ¶ added in v2.8.0
type Decoder struct {
Config *DecoderConfig
}
Decoder mapconvでの変換
func (*Decoder) ConvertFrom ¶ added in v2.8.0
func (*Decoder) ParseMapConvTag ¶ added in v2.8.0
ParseMapConvTag mapconvタグを文字列で受け取りパースしてTagInfoを返す
type DecoderConfig ¶ added in v2.8.0
type DecoderConfig struct { TagName string FilterFuncs map[string]FilterFunc }
DecoderConfig mapconvでの変換の設定
type FilterFunc ¶ added in v2.8.9
type FilterFunc func(v interface{}) (interface{}, error)
FilterFunc mapconvでの変換時に適用するフィルタ
Click to show internal directories.
Click to hide internal directories.