Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrUnsupportedSetType = errors.New("Received an unsupported type to set")
Functions ¶
func PopulatePropertiesFromStruct ¶
func PopulatePropertiesFromStruct(value interface{}) (*properties.Properties, error)
PopulatePropertiesFromStruct is used to create *properties.Properties based off of fields/data within a struct.
Types ¶
type PropTagConfig ¶
type PropTagConfig struct {
*properties.Properties
}
PropTagConfig implements the TagValueGetter to allow for populating a struct via "prop" struct tagconfig. It also implements TagValueSetter which allows for the struct to populate properties, which is basically the inverse of the TagValueGetter interface.
func (*PropTagConfig) Get ¶
func (pv *PropTagConfig) Get(key string, _ reflect.StructField) string
func (*PropTagConfig) Set ¶
func (pv *PropTagConfig) Set(key string, value interface{}, _ reflect.StructField) error
Set is used to set properties based on values provided by the struct. For this iteration, it only supports a couple of major types, but if there's a need for this to grow, we can make this more sophisticated.
func (*PropTagConfig) TagName ¶
func (pv *PropTagConfig) TagName() string
Click to show internal directories.
Click to hide internal directories.