Documentation ¶
Index ¶
- Constants
- Variables
- func AnyToString(any *anypb.Any) string
- func Attribute(attribute string) (*base.Attribute, error)
- func CallOrAttributeToString(attributeOrCall string, arguments ...*base.Argument) string
- func EntityAndCallOrAttributeToString(entity *base.Entity, attributeOrCall string, arguments ...*base.Argument) string
- func EntityToString(entity *base.Entity) string
- func ToString(attribute *base.Attribute) string
- func TypeToString(attributeType base.AttributeType) string
- func TypeUrlToString(url string) string
- func ValidateValue(any *anypb.Any, attributeType base.AttributeType) error
Constants ¶
const ( ENTITY = "%s:%s" ATTRIBUTE = "$%s" VALUE = "%s:%s" )
Variables ¶
Functions ¶
func AnyToString ¶
AnyToString function takes an Any proto message and converts it into a string.
func Attribute ¶
Attribute function takes a string representation of an attribute and converts it back into the Attribute object.
func CallOrAttributeToString ¶ added in v0.5.1
CallOrAttributeToString -
func EntityAndCallOrAttributeToString ¶ added in v0.5.1
func EntityAndCallOrAttributeToString(entity *base.Entity, attributeOrCall string, arguments ...*base.Argument) string
EntityAndCallOrAttributeToString -
func EntityToString ¶
EntityToString function takes an Entity object and converts it into a string.
func TypeToString ¶
func TypeToString(attributeType base.AttributeType) string
TypeToString function takes an AttributeType enum and converts it into a string.
func TypeUrlToString ¶
func ValidateValue ¶
func ValidateValue(any *anypb.Any, attributeType base.AttributeType) error
ValidateValue checks the validity of the 'any' parameter which is a protobuf 'Any' type, based on the attribute type provided.
'any' is a protobuf 'Any' type which should contain a value of a specific type. 'attributeType' is an enum indicating the expected type of the value within 'any'. The function returns an error if the value within 'any' is not of the expected type, or if unmarshalling fails.
The function returns nil if the value is valid (i.e., it is of the expected type and can be successfully unmarshalled).
Types ¶
This section is empty.