Documentation ¶
Index ¶
- Constants
- func Deserialize(raw json.RawMessage) ([]task.PropertyDefinition, error)
- func DeserializeType(fieldLabel string, rawProperty json.RawMessage, extract interface{}) error
- func ExtractByName(field string, properties []task.PropertyDefinition) (json.RawMessage, error)
- func ExtractCIs(properties []task.PropertyDefinition) []task.PropertyDefinition
- func ExtractNestedType(rootField string, fieldLabel string, properties []task.PropertyDefinition, ...) error
- func ExtractProperty(propertyName string, rawMessage json.RawMessage) (*task.PropertyDefinition, error)
- func ExtractType(fieldLabel string, properties []task.PropertyDefinition, extract interface{}) error
Constants ¶
const CI = "CI"
CI represents the kind for CI properties.
const Null = "null"
Null represents the null string value.
Variables ¶
This section is empty.
Functions ¶
func Deserialize ¶
func Deserialize(raw json.RawMessage) ([]task.PropertyDefinition, error)
Deserialize deserializes the raw message into an array of property definitions.
func DeserializeType ¶
func DeserializeType(fieldLabel string, rawProperty json.RawMessage, extract interface{}) error
DeserializeType deserializes the raw property of the specified field label into the provided extract variable.
func ExtractByName ¶
func ExtractByName(field string, properties []task.PropertyDefinition) (json.RawMessage, error)
ExtractByName extracts the property with the specified field name from the given properties.
func ExtractCIs ¶
func ExtractCIs(properties []task.PropertyDefinition) []task.PropertyDefinition
ExtractCIs extracts all properties of kind CI from the given properties.
func ExtractNestedType ¶
func ExtractNestedType(rootField string, fieldLabel string, properties []task.PropertyDefinition, extract interface{}) error
ExtractNestedType extracts a nested property from the root field label of the given properties, and then extracts the specified field label from the nested properties and deserializes it into the provided extract variable.
func ExtractProperty ¶ added in v0.2.41
func ExtractProperty(propertyName string, rawMessage json.RawMessage) (*task.PropertyDefinition, error)
ExtractProperty extracts property with given propertyName.
func ExtractType ¶
func ExtractType(fieldLabel string, properties []task.PropertyDefinition, extract interface{}) error
ExtractType extracts a property of the specified field label from the given properties and deserializes it into the provided extract variable.
Types ¶
This section is empty.