types

package
v0.0.0-...-991538e Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2019 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package types holds Kusto data type representations. All types provide a Value that stores the native value and Valid which indicates if the value was set or was null. TODO: This package is missing the Decimal an Timespan types.

Index

Constants

This section is empty.

Variables

This section is empty.

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 KustoValue.

func (Bool) String

func (b Bool) String() string

String implements fmt.Stringer.

func (*Bool) Unmarshal

func (b *Bool) Unmarshal(i interface{}) error

Unmarshal unmarshals i into Bool. i must be a bool or nil.

type DateTime

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

DateTime represents a Kusto datetime type. DateTime implements KustoValue.

func (DateTime) String

func (d DateTime) String() string

String implements fmt.Stringer.

func (*DateTime) Unmarshal

func (d *DateTime) Unmarshal(i interface{}) error

Unmarshal unmarshals i into DateTime. i must be a string representing RFC3339Nano or nil.

type Dynamic

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

Dynamic represents a Kusto dynamic type. Dynamic implements KustoValue.

func (Dynamic) String

func (d Dynamic) String() string

String implements fmt.Stringer.

func (*Dynamic) Unmarshal

func (d *Dynamic) Unmarshal(i interface{}) error

Unmarshal unmarshal's i into Dynamic. i must be a string or nil.

type GUID

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

GUID represents a Kusto GUID type. GUID implements KustoValue.

func (GUID) String

func (g GUID) String() string

String implements fmt.Stringer.

func (*GUID) Unmarshal

func (g *GUID) Unmarshal(i interface{}) error

Unmarshal unmarshals i into GUID. i must be a string representing a GUID or nil.

type Int

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

Int represents a Kuston int type. Kusto int type's are int32 values. Int implements KustoValue.

func (Int) String

func (in Int) String() string

String implements fmt.Stringer.

func (*Int) Unmarshal

func (in *Int) Unmarshal(i interface{}) error

Unmarshal unmarshals i into Int. i must be an int32 or nil.

type KustoValue

type KustoValue interface {
	// contains filtered or unexported methods
}

KustoValue represents a Kusto value.

type KustoValues

type KustoValues []KustoValue

KustoValues is a list of KustoValue, usually an ordered row.

type Long

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

Long represents a Kuston long type, which is an int64. Long implements KustoValue.

func (Long) String

func (l Long) String() string

String implements fmt.Stringer.

func (*Long) Unmarshal

func (l *Long) Unmarshal(i interface{}) error

Unmarshal unmarshals i into Long. i must be an int64 or nil.

type Real

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

Real represents a Kusto real type. Real implements KustoValue.

func (Real) String

func (r Real) String() string

String implements fmt.Stringer.

func (*Real) Unmarshal

func (r *Real) Unmarshal(i interface{}) error

Unmarshal unmarshals i into Real. i must be a json.Number(that is a float64), float64 or nil.

type String

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

String represents a Kusto string type. String implements KustoValue.

func (String) String

func (s String) String() string

String implements fmt.Stringer.

func (*String) Unmarshal

func (s *String) Unmarshal(i interface{}) error

Unmarshal unmarshals i into String. i must be a string or nil.

Jump to

Keyboard shortcuts

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