Documentation
¶
Index ¶
- func WithForArray(forArray bool) func(*base.Setter)
- func WithGetterPlugins(ps []base.GetterPlugin) func(*base.Setter)
- func WithOmitempty(omitempty bool) func(*base.Setter)
- func WithPhases(phases []map[string]any) func(*base.Setter)
- func WithPluginPrefix(prefix string) func(*base.Setter)
- func WithRedirectSrc(redirectSrc bool) func(*base.Setter)
- func WithSegmentation(segmentation string) func(*base.Setter)
- func WithSetterPlugins(ps []base.SetterPlugin) func(*base.Setter)
- type Many
- type Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WithForArray ¶
WithForArray traverse array to get value by rest of routers when meet an array in GetByRouter.
Logic of forArray is as same as plugin 'for'. Set forArray to true allowed you to omit router 'for' in routers. On the other hand it makes the mean of router ambiguous.
func WithGetterPlugins ¶
func WithGetterPlugins(ps []base.GetterPlugin) func(*base.Setter)
WithGetterPlugins set plugins in ps and DefaultGetterPlugins in this Many. The latter overrides the previous if they use a duplicate name.
func WithOmitempty ¶
WithOmitempty delete null value in map[string]any if omitempty is true
func WithPhases ¶
WithPhases set default phases in this Many. default phases is used in Set when phases is nil
func WithPluginPrefix ¶
WithPluginPrefix plugin prefix is a string to mark a router string is a pointer to a plugin. Works in both setter and getter. Default value is "#"
func WithRedirectSrc ¶
WithRedirectSrc set src to dst while a phase finished in Set
func WithSegmentation ¶
WithSegmentation segmentation is a string to split routers. Works in both setter and getter. Default value is "."
func WithSetterPlugins ¶
func WithSetterPlugins(ps []base.SetterPlugin) func(*base.Setter)
WithSetterPlugins set plugins in ps and DefaultSetterPlugins in this Many. The latter overrides the previous if they use a duplicate name.