Documentation ¶
Index ¶
- func GetRootValue(v reflect.Value, ut reflect.Type) reflect.Value
- func IsConsumerFunc(vt reflect.Type) bool
- func IsUnmarshalable(vt, ut reflect.Type) (out bool)
- func IsUnmarshalableValue(vt reflect.Type) bool
- func ToUnmarshalable(arg string, ov reflect.Value, skipPtr bool, unmarshalerType reflect.Type) (reflect.Value, error)
- func ToValidMap(v, ov reflect.Value, ut reflect.Type) (reflect.Value, error)
- func ToValidSlice(v, ov reflect.Value, ut reflect.Type) (out reflect.Value, err error)
- func ValidateContainerValue(t reflect.Type, ov reflect.Value, ut reflect.Type) error
- type InvalidTypeError
- type InvalidUnmarshalError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetRootValue ¶
GetRootValue returns the root of the given value. The root will be the dereferenced type of the given reflect.Value instance.
Parameters:
- v = reflect.Value of the type whose root value should be determined.
- ut = unmarshaler type to test if the given value is an argo.Unmarshaler instance.
func IsConsumerFunc ¶
IsConsumerFunc tests whether the given type represents a function that may be used as an argo.Argument's consumer binding.
func IsUnmarshalable ¶
IsUnmarshalable tests the given reflect.Type value to see if it is something that Argonaut can unmarshal.
Unmarshalable values include pointers to basic types, maps, slices, or consumer functions.
Arguments:
- vt = Type of the value that we are testing to ensure that it is unmarshalable.
- ut = Unmarshaler type. This is a hacky way of getting around cyclic package imports with the argo package.
func IsUnmarshalableValue ¶
IsUnmarshalableValue tests whether the given type is a value type that may be unmarshalled.
func ToUnmarshalable ¶
func ToValidMap ¶
ToValidMap is butts and this comment line is meaningless.
Valid map types:
map[<basic>]<basic> map[<basic>]<*basic> map[<basic>][]byte map[<basic>]<*[]byte>
func ToValidSlice ¶
ToValidSlice is an internal method that is not exposed to package consumers.
Valid slice types:
[]<basic> []<*basic> [][]byte []*[]byte
Types ¶
type InvalidTypeError ¶
func (*InvalidTypeError) Error ¶
func (i *InvalidTypeError) Error() string
type InvalidUnmarshalError ¶
func (InvalidUnmarshalError) Error ¶
func (i InvalidUnmarshalError) Error() string