value

package
v0.0.0-...-a0ec725 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 21, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package value provides an interface and a type for handling Kusto values.

Index

Constants

This section is empty.

Variables

View Source
var DecRE = regexp.MustCompile(`^((\d+\.?\d*)|(\d*\.?\d+))$`) // Matches decimal numbers, with or without decimal dot, with optional parts missing.

Functions

This section is empty.

Types

type Bool

type Bool struct {
	// Value holds the value of the type.
	Value bool
	// Valid indicates if this value was set.
	Valid bool
}

Bool represents a Kusto boolean type. Bool implements Kusto.

func (Bool) String

func (bo Bool) String() string

String implements fmt.Stringer.

type DateTime

type DateTime struct {
	Value time.Time

	Valid bool
}

func (DateTime) String

func (d DateTime) String() string

type Decimal

type Decimal struct {
	Value string
	Valid bool
}

func (Decimal) String

func (d Decimal) String() string

type Dynamic

type Dynamic struct {
	Value []byte

	Valid bool
}

func (Dynamic) String

func (d Dynamic) String() string

type GUID

type GUID struct {
	Value uuid.UUID

	Valid bool
}

func (GUID) String

func (g GUID) String() string

type Int

type Int struct {
	Value int32
	Valid bool
}

func (Int) String

func (in Int) String() string

type Long

type Long struct {
	Value int64

	Valid bool
}

func (Long) String

func (l Long) String() string

type Real

type Real struct {
	Value float64

	Valid bool
}

func (Real) String

func (r Real) String() string

String implements fmt.Stringer.

type String

type String struct {
	Value string
	Valid bool
}

func (String) String

func (s String) String() string

type Timespan

type Timespan struct {
	Value time.Duration

	Valid bool
}

func (Timespan) Marshal

func (t Timespan) Marshal() string

func (Timespan) String

func (t Timespan) String() string

type Value

type Value interface {
	String() string                // Converts the Kusto value to a string
	Convert(v reflect.Value) error // Converts a reflect.Value to a Kusto value
	// contains filtered or unexported methods
}

Kusto is an interface that represents a Kusto value. It provides methods for checking if a value is a Kusto value, converting it to a string, and converting it from a reflect.Value.

type Values

type Values []Value

Values is a slice of Kusto values.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL