Documentation ¶
Index ¶
- func Create(value any) (*prefabProto.ConfigValue, bool)
- func ExtractBoolValue(cv *prefabProto.ConfigValue) (bool, bool)
- func ExtractDurationValue(cv *prefabProto.ConfigValue) (time.Duration, bool)
- func ExtractFloatValue(cv *prefabProto.ConfigValue) (float64, bool)
- func ExtractIntValue(cv *prefabProto.ConfigValue) (int64, bool)
- func ExtractJSONValue(cv *prefabProto.ConfigValue) (interface{}, bool, error)
- func ExtractJSONValueWithoutError(cv *prefabProto.ConfigValue) (interface{}, bool)
- func ExtractLogLevelValue(cv *prefabProto.ConfigValue) (prefabProto.LogLevel, bool)
- func ExtractStringListValue(cv *prefabProto.ConfigValue) ([]string, bool)
- func ExtractStringValue(cv *prefabProto.ConfigValue) (string, bool)
- func ExtractValue(cv *prefabProto.ConfigValue) (any, bool, error)
- func GetValueType(cv *prefabProto.ConfigValue) prefabProto.Config_ValueType
- type ExtractValueFunction
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Create ¶
func Create(value any) (*prefabProto.ConfigValue, bool)
Create switches on the type of the any value passed in - will return the prefabConfigValue of a matching type if possible -- ie pass in an int, get back a ConfigValue_Int
func ExtractBoolValue ¶
func ExtractBoolValue(cv *prefabProto.ConfigValue) (bool, bool)
func ExtractDurationValue ¶
func ExtractDurationValue(cv *prefabProto.ConfigValue) (time.Duration, bool)
func ExtractFloatValue ¶
func ExtractFloatValue(cv *prefabProto.ConfigValue) (float64, bool)
func ExtractIntValue ¶
func ExtractIntValue(cv *prefabProto.ConfigValue) (int64, bool)
func ExtractJSONValue ¶
func ExtractJSONValue(cv *prefabProto.ConfigValue) (interface{}, bool, error)
func ExtractJSONValueWithoutError ¶ added in v0.0.4
func ExtractJSONValueWithoutError(cv *prefabProto.ConfigValue) (interface{}, bool)
func ExtractLogLevelValue ¶
func ExtractLogLevelValue(cv *prefabProto.ConfigValue) (prefabProto.LogLevel, bool)
func ExtractStringListValue ¶
func ExtractStringListValue(cv *prefabProto.ConfigValue) ([]string, bool)
func ExtractStringValue ¶
func ExtractStringValue(cv *prefabProto.ConfigValue) (string, bool)
func ExtractValue ¶
func ExtractValue(cv *prefabProto.ConfigValue) (any, bool, error)
ExtractValue returns the value of the oneof field and a boolean indicating if it's one of the simple types (fields 1-5, 10). returns nil, false if the configvalue is nil
func GetValueType ¶
func GetValueType(cv *prefabProto.ConfigValue) prefabProto.Config_ValueType
GetValueType returns the value type we'd expect the config containing this value to have
Types ¶
type ExtractValueFunction ¶
type ExtractValueFunction func(*prefabProto.ConfigValue) (any, bool)
Click to show internal directories.
Click to hide internal directories.