Documentation ¶
Index ¶
- Variables
- func ParseBool(b bool, t MetricType) (any, error)
- func ParseFloat64(f float64, t MetricType) (any, error)
- func ParseInt(i int, t MetricType) (any, error)
- func ParseString(s string, t MetricType) (any, error)
- func ParseValue(v any, t MetricType) (any, error)
- func ValidateMetricType(t MetricType) bool
- type MetricType
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrInvalidParseType = errors.New("invalid parse type")
)
Functions ¶
func ParseFloat64 ¶
func ParseFloat64(f float64, t MetricType) (any, error)
func ParseString ¶
func ParseString(s string, t MetricType) (any, error)
func ParseValue ¶
func ParseValue(v any, t MetricType) (any, error)
func ValidateMetricType ¶
func ValidateMetricType(t MetricType) bool
ValidateMetricType validates the metric type.
Types ¶
type MetricType ¶
type MetricType byte
const ( Unknown MetricType = iota Int Float String Bool Invalid )
Click to show internal directories.
Click to hide internal directories.