valueTypes

package
v0.0.0-...-391253a Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2023 License: GPL-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DateTimeFullLayout        = time.RFC3339
	DateTimeLayout            = DateLayout + " " + TimeLayout
	DateTimeAltLayout         = DateLayoutDay + "-" + TimeLayoutSecond
	DateHumanLayoutLayout     = DateHumanLayout + " " + TimeLayout
	DateTimeLayoutZeroSeconds = DateLayout + " " + TimeLayoutZeroSeconds
	DateTimeLayoutSecond      = DateLayoutDay + TimeLayoutSecond
	DateTimeLayoutMinute      = DateLayoutDay + TimeLayoutMinute
	DateTimeLayoutHour        = DateLayoutDay + TimeLayoutHour
	DateTimeLayoutDay         = DateLayoutDay
	DateTimeLayoutMonth       = DateLayoutMonth
	DateTimeLayoutYear        = DateLayoutYear

	DateLayout      = "2006-01-02"
	DateHumanLayout = "2006/01/02"
	DateHumanMonth  = "2006/01"
	DateHumanYear   = "2006"
	DateLayoutDay   = "20060102"
	DateLayoutMonth = "200601"
	DateLayoutYear  = "2006"

	TimeLayout            = "15:04:05"
	TimeLayoutZeroSeconds = "15:04:00"
	TimeLayoutHourColon   = "15:04"
	TimeLayoutSecond      = "150405"
	TimeLayoutMinute      = "1504"
	TimeLayoutHour        = "15"

	DateTypeDay   = "1"
	DateTypeMonth = "2"
	DateTypeYear  = "3"
	DateTypeTotal = "4"
)
View Source
const (
	TypeBool      = "Bool"
	TypeCount     = "Count"
	TypeDateTime  = "DateTime"
	TypeFloat     = "Float"
	TypeInteger   = "Integer"
	TypePointId   = "PointId"
	TypePsKey     = "PsKey"
	TypePsId      = "PsId"
	TypeString    = "String"
	TypeTime      = "Time"
	TypeUnitValue = "UnitValue"
	TypeGeneric   = "Generic" // Used for values that can flip-flop between strings, ints and floats.

	TypeArrayBool      = "[]Bool"
	TypeArrayCount     = "[]Count"
	TypeArrayDateTime  = "[]DateTime"
	TypeArrayFloat     = "[]Float"
	TypeArrayInteger   = "[]Integer"
	TypeArrayPointId   = "[]PointId"
	TypeArrayPsKey     = "[]PsKey"
	TypeArrayPsId      = "[]PsId"
	TypeArrayString    = "[]String"
	TypeArrayTime      = "[]Time"
	TypeArrayUnitValue = "[]UnitValue"
	TypeUnitValues     = "UnitValues"
	TypeArrayGeneric   = "[]Generic"
)
View Source
const (
	IgnoreLength = -1
)
View Source
const IsarrayValues = "array"
View Source
const LoadOrder = true
View Source
const Now = "now"
View Source
const SortOrder = false

Variables

View Source
var DateLayoutMap = map[string]string{
	"DateTimeFullLayout":        DateTimeFullLayout,
	"DateTimeLayout":            DateTimeLayout,
	"DateTimeAltLayout":         DateTimeAltLayout,
	"DateHumanLayoutLayout":     DateHumanLayoutLayout,
	"DateTimeLayoutZeroSeconds": DateTimeLayoutZeroSeconds,
	"DateTimeLayoutSecond":      DateTimeLayoutSecond,
	"DateTimeLayoutMinute":      DateTimeLayoutMinute,
	"DateTimeLayoutHour":        DateTimeLayoutHour,
	"DateTimeLayoutDay":         DateTimeLayoutDay,
	"DateTimeLayoutMonth":       DateTimeLayoutMonth,
	"DateTimeLayoutYear":        DateTimeLayoutYear,

	"DateLayout":      DateLayout,
	"DateHumanLayout": DateHumanLayout,
	"DateLayoutDay":   DateLayoutDay,
	"DateLayoutMonth": DateLayoutMonth,
	"DateLayoutYear":  DateLayoutYear,

	"TimeLayout":            TimeLayout,
	"TimeLayoutZeroSeconds": TimeLayoutZeroSeconds,
	"TimeLayoutHourColon":   TimeLayoutHourColon,
	"TimeLayoutSecond":      TimeLayoutSecond,
	"TimeLayoutMinute":      TimeLayoutMinute,
	"TimeLayoutHour":        TimeLayoutHour,
}
View Source
var VarFalse = false
View Source
var VarTrue = true

Functions

func AnyToValueString

func AnyToValueString(ref interface{}, intSize int, dateFormat string) string

func ArrayLength

func ArrayLength(i interface{}) int

func CleanString

func CleanString(s string) string

func GetIntFormatForPrintf

func GetIntFormatForPrintf(i interface{}) string

func IsKnownStruct

func IsKnownStruct(ref interface{}, checkDepth bool) bool

func IsNil

func IsNil(i interface{}) bool

func IsTypeUnknown

func IsTypeUnknown(fieldVo reflect.Value) bool

func IsUnknownStruct

func IsUnknownStruct(ref interface{}, checkDepth bool) bool

func JoinStrings

func JoinStrings(value ...string) string

func ParseDateTime

func ParseDateTime(value string) (time.Time, string, error)

func PointToName

func PointToName(ret string) string

func PrintInt

func PrintInt(s int, i interface{}) string

func SetPrecision

func SetPrecision(num float64, precision int) float64

func SizeOfArrayLength

func SizeOfArrayLength(ref interface{}) int

func SizeOfInt

func SizeOfInt(ref interface{}) int

func TimeNowString

func TimeNowString() string

func UnitValueType

func UnitValueType(unit string) string

Types

type Bool

type Bool struct {
	Valid bool  `json:"valid"`
	Error error `json:"-"`
	// contains filtered or unexported fields
}

func SetBoolString

func SetBoolString(value string) Bool

func SetBoolValue

func SetBoolValue(value bool) Bool

func (Bool) MarshalJSON

func (t Bool) MarshalJSON() ([]byte, error)

MarshalJSON - Convert value to JSON

func (Bool) Match

func (t Bool) Match(comp bool) bool

func (*Bool) SetInteger

func (t *Bool) SetInteger(value int64) Bool

func (*Bool) SetString

func (t *Bool) SetString(value string) Bool

func (*Bool) SetValue

func (t *Bool) SetValue(value bool) Bool

func (Bool) String

func (t Bool) String() string

func (*Bool) UnmarshalJSON

func (t *Bool) UnmarshalJSON(data []byte) error

UnmarshalJSON - Convert JSON to value

func (Bool) Value

func (t Bool) Value() bool

type Count

type Count struct {
	Valid bool  `json:"valid"`
	Error error `json:"-"`
	// contains filtered or unexported fields
}

func SetCountString

func SetCountString(value string) Count

func SetCountValue

func SetCountValue(value int64) Count

func (Count) MarshalJSON

func (t Count) MarshalJSON() ([]byte, error)

MarshalJSON - Convert value to JSON

func (Count) Match

func (t Count) Match(comp int64) bool

func (*Count) SetString

func (t *Count) SetString(value string) Count

func (*Count) SetValue

func (t *Count) SetValue(value int64) Count

func (Count) String

func (t Count) String() string

func (*Count) ToUnitValue

func (t *Count) ToUnitValue() UnitValue

func (*Count) UnmarshalJSON

func (t *Count) UnmarshalJSON(data []byte) error

UnmarshalJSON - Convert JSON to value

func (Count) Value

func (t Count) Value() int64

type DataPoint

type DataPoint struct {
	Valid bool  `json:"valid"`
	Error error `json:"-"`
	// contains filtered or unexported fields
}

func JoinDataPoint

func JoinDataPoint(value ...string) DataPoint

func SetDataPoint

func SetDataPoint(endPoint string, pointId string) DataPoint

func (DataPoint) EndPoint

func (t DataPoint) EndPoint() string

func (DataPoint) MarshalJSON

func (t DataPoint) MarshalJSON() ([]byte, error)

MarshalJSON - Convert value to JSON

func (DataPoint) PointId

func (t DataPoint) PointId() PointId

func (*DataPoint) Set

func (t *DataPoint) Set(endPoint string, pointId string) DataPoint

func (*DataPoint) SetEndPoint

func (t *DataPoint) SetEndPoint(endPoint string) DataPoint

func (*DataPoint) SetPointId

func (t *DataPoint) SetPointId(pointId string) DataPoint

func (DataPoint) Split

func (t DataPoint) Split() []string

func (DataPoint) String

func (t DataPoint) String() string

func (*DataPoint) UnmarshalJSON

func (t *DataPoint) UnmarshalJSON(data []byte) error

UnmarshalJSON - Convert JSON to value

type DateTime

type DateTime struct {
	time.Time `json:"time,omitempty"`
	DateType  string

	Error error `json:"-"`
	// contains filtered or unexported fields
}

func NewDateTime

func NewDateTime(value string) DateTime

func SetDateTimeString

func SetDateTimeString(value string) DateTime

func SetDateTimeValue

func SetDateTimeValue(value time.Time) DateTime

func (*DateTime) GetDayEndTimestamp

func (dt *DateTime) GetDayEndTimestamp() string

func (*DateTime) GetDayStartTimestamp

func (dt *DateTime) GetDayStartTimestamp() string

func (*DateTime) GetRanges

func (dt *DateTime) GetRanges(count int, dur time.Duration, format string) []string

func (DateTime) MarshalJSON

func (dt DateTime) MarshalJSON() ([]byte, error)

MarshalJSON - Convert value to JSON

func (DateTime) Match

func (dt DateTime) Match(comp time.Time) bool

func (DateTime) Original

func (dt DateTime) Original() string

func (DateTime) PrintFull

func (dt DateTime) PrintFull() string

func (*DateTime) SetDateType

func (dt *DateTime) SetDateType(value string)

func (*DateTime) SetDayEnd

func (dt *DateTime) SetDayEnd()

func (*DateTime) SetDayStart

func (dt *DateTime) SetDayStart()

func (*DateTime) SetString

func (dt *DateTime) SetString(value string) DateTime

func (*DateTime) SetValue

func (dt *DateTime) SetValue(value time.Time) DateTime

func (DateTime) String

func (dt DateTime) String() string

func (*DateTime) UnmarshalJSON

func (dt *DateTime) UnmarshalJSON(data []byte) error

UnmarshalJSON - Convert JSON to value

func (DateTime) Value

func (dt DateTime) Value() time.Time

type Float

type Float struct {
	Valid bool  `json:"valid"`
	Error error `json:"-"`
	// contains filtered or unexported fields
}

func SetFloatString

func SetFloatString(value string) Float

func SetFloatValue

func SetFloatValue(value float64) Float

func (Float) MarshalJSON

func (t Float) MarshalJSON() ([]byte, error)

MarshalJSON - Convert value to JSON

func (Float) Match

func (t Float) Match(comp float64) bool

func (*Float) SetPrecision

func (t *Float) SetPrecision(precision int) Float

func (*Float) SetString

func (t *Float) SetString(value string) Float

func (*Float) SetValue

func (t *Float) SetValue(value float64) Float

func (Float) String

func (t Float) String() string

func (*Float) ToUnitValue

func (t *Float) ToUnitValue() UnitValue

func (*Float) UnmarshalJSON

func (t *Float) UnmarshalJSON(data []byte) error

UnmarshalJSON - Convert JSON to value

func (Float) Value

func (t Float) Value() float64

type Generic

type Generic struct {
	Valid bool  `json:"valid"`
	Error error `json:"-"`
	// contains filtered or unexported fields
}

func SetGenericFloat

func SetGenericFloat(value float64) Generic

func SetGenericInteger

func SetGenericInteger(value int64) Generic

func SetGenericString

func SetGenericString(value string) Generic

func (Generic) MarshalJSON

func (t Generic) MarshalJSON() ([]byte, error)

MarshalJSON - Convert value to JSON

func (Generic) Match

func (t Generic) Match(comp float64) bool

func (*Generic) SetFloat

func (t *Generic) SetFloat(value float64) Generic

func (*Generic) SetInteger

func (t *Generic) SetInteger(value int64) Generic

func (*Generic) SetString

func (t *Generic) SetString(value string) Generic

func (Generic) String

func (t Generic) String() string

func (*Generic) ToUnitValue

func (t *Generic) ToUnitValue() UnitValue

func (*Generic) UnmarshalJSON

func (t *Generic) UnmarshalJSON(data []byte) error

UnmarshalJSON - Convert JSON to value

func (Generic) Value

func (t Generic) Value() float64

type Integer

type Integer struct {
	Valid bool  `json:"valid"`
	Error error `json:"-"`
	// contains filtered or unexported fields
}

func SetIntegerString

func SetIntegerString(value string) Integer

func SetIntegerValue

func SetIntegerValue(value int64) Integer

func (Integer) MarshalJSON

func (t Integer) MarshalJSON() ([]byte, error)

MarshalJSON - Convert value to JSON

func (Integer) Match

func (t Integer) Match(comp int64) bool

func (Integer) MatchString

func (t Integer) MatchString(comp string) bool

func (*Integer) SetString

func (t *Integer) SetString(value string) Integer

func (*Integer) SetValue

func (t *Integer) SetValue(value int64) Integer

func (Integer) String

func (t Integer) String() string

func (*Integer) ToUnitValue

func (t *Integer) ToUnitValue() UnitValue

func (*Integer) UnmarshalJSON

func (t *Integer) UnmarshalJSON(data []byte) error

UnmarshalJSON - Convert JSON to value

func (Integer) Value

func (t Integer) Value() int64

type PointId

type PointId struct {
	Point string `json:"point"`
	PsKey PsKey  `json:"ps_key"`

	Valid bool  `json:"valid"`
	Error error `json:"-"`
}

func SetPointIdString

func SetPointIdString(value ...string) PointId

func (*PointId) Full

func (t *PointId) Full() string

func (PointId) MarshalJSON

func (t PointId) MarshalJSON() ([]byte, error)

MarshalJSON - Convert value to JSON

func (*PointId) PointToName

func (t *PointId) PointToName() string

func (*PointId) Set

func (t *PointId) Set(values ...string) PointId

func (PointId) String

func (t PointId) String() string

func (*PointId) UnmarshalJSON

func (t *PointId) UnmarshalJSON(data []byte) error

UnmarshalJSON - Convert JSON to value

type PointIds

type PointIds struct {
	PointIds []PointId `json:"points,omitempty"`

	Valid bool  `json:"valid"`
	Error error `json:"-"`
}

func SetPointIdsString

func SetPointIdsString(values ...string) PointIds

func (PointIds) MarshalJSON

func (t PointIds) MarshalJSON() ([]byte, error)

MarshalJSON - Convert value to JSON

func (*PointIds) PsIds

func (t *PointIds) PsIds() PsIds

func (*PointIds) PsKeys

func (t *PointIds) PsKeys() *PsKeys

func (*PointIds) Set

func (t *PointIds) Set(values ...string) PointIds

func (PointIds) String

func (t PointIds) String() string

func (*PointIds) UnmarshalJSON

func (t *PointIds) UnmarshalJSON(data []byte) error

UnmarshalJSON - Convert JSON to value

type PsId

type PsId struct {
	Valid bool  `json:"valid"`
	Error error `json:"-"`
	// contains filtered or unexported fields
}

func SetPsIdString

func SetPsIdString(value string) PsId

func SetPsIdValue

func SetPsIdValue(value int64) PsId

func (PsId) MarshalJSON

func (t PsId) MarshalJSON() ([]byte, error)

MarshalJSON - Convert value to JSON

func (PsId) Match

func (t PsId) Match(comp int64) bool

func (*PsId) SetString

func (t *PsId) SetString(value string) PsId

func (*PsId) SetValue

func (t *PsId) SetValue(value int64) PsId

func (PsId) String

func (t PsId) String() string

func (*PsId) UnmarshalJSON

func (t *PsId) UnmarshalJSON(data []byte) error

UnmarshalJSON - Convert JSON to value

func (PsId) Value

func (t PsId) Value() int64

type PsIds

type PsIds []PsId

func SetPsIdStrings

func SetPsIdStrings(values []string) PsIds

func SetPsIdValues

func SetPsIdValues(values []int64) PsIds

func (PsIds) String

func (t PsIds) String() string

func (*PsIds) Strings

func (t *PsIds) Strings() []string

type PsKey

type PsKey struct {
	PsId       string `json:"ps_id"`
	DeviceType string `json:"device_type"`
	DeviceCode string `json:"device_code"`
	ChannelId  string `json:"channel_id"`

	Valid bool  `json:"-"`
	Error error `json:"-"`
	// contains filtered or unexported fields
}

func SetPsKeyString

func SetPsKeyString(value string) PsKey

func (*PsKey) GetChannelId

func (t *PsKey) GetChannelId() string

func (*PsKey) GetDeviceCode

func (t *PsKey) GetDeviceCode() string

func (*PsKey) GetDeviceType

func (t *PsKey) GetDeviceType() string

func (*PsKey) GetPsId

func (t *PsKey) GetPsId() string

func (PsKey) MarshalJSON

func (t PsKey) MarshalJSON() ([]byte, error)

MarshalJSON - Convert value to JSON

func (*PsKey) Match

func (t *PsKey) Match(comp string) bool

func (*PsKey) PsIdDeviceType

func (t *PsKey) PsIdDeviceType() string

func (*PsKey) PsKey

func (t *PsKey) PsKey() string

func (*PsKey) SetValue

func (t *PsKey) SetValue(value string) PsKey

func (PsKey) String

func (t PsKey) String() string

func (*PsKey) UnmarshalJSON

func (t *PsKey) UnmarshalJSON(data []byte) error

UnmarshalJSON - Convert JSON to value

func (*PsKey) Value

func (t *PsKey) Value() string

type PsKeys

type PsKeys struct {
	PsKeys []PsKey `json:"ps_keys,omitempty"`

	Valid bool  `json:"valid"`
	Error error `json:"-"`
}

func SetPsKeysString

func SetPsKeysString(values string) PsKeys

func (*PsKeys) Join

func (t *PsKeys) Join(sep string) string

func (*PsKeys) Length

func (t *PsKeys) Length() int

func (PsKeys) MarshalJSON

func (t PsKeys) MarshalJSON() ([]byte, error)

MarshalJSON - Convert value to JSON

func (*PsKeys) Match

func (t *PsKeys) Match(pskey PsKey) bool

func (*PsKeys) MatchPsIdDeviceType

func (t *PsKeys) MatchPsIdDeviceType(psid string, deviceType string) PsKey

func (*PsKeys) MatchString

func (t *PsKeys) MatchString(pskey string) bool

func (*PsKeys) PsIds

func (t *PsKeys) PsIds() []string

func (*PsKeys) Set

func (t *PsKeys) Set(values ...string) PsKeys

func (PsKeys) String

func (t PsKeys) String() string

func (*PsKeys) Strings

func (t *PsKeys) Strings() []string

func (*PsKeys) UnmarshalJSON

func (t *PsKeys) UnmarshalJSON(data []byte) error

UnmarshalJSON - Convert JSON to value

type String

type String struct {
	Valid bool  `json:"valid"`
	Error error `json:"-"`
	// contains filtered or unexported fields
}

func SetStringValue

func SetStringValue(value string) String

func (String) MarshalJSON

func (t String) MarshalJSON() ([]byte, error)

MarshalJSON - Convert value to JSON

func (String) Match

func (t String) Match(comp string) bool

func (*String) SetString

func (t *String) SetString(value string) String

func (*String) SetValue

func (t *String) SetValue(value string) String

func (String) String

func (t String) String() string

func (*String) UnmarshalJSON

func (t *String) UnmarshalJSON(data []byte) error

UnmarshalJSON - Convert JSON to value

func (String) Value

func (t String) Value() string

type Time

type Time struct {
	time.Time `json:"time,omitempty"`
	Error     error `json:"-"`
	// contains filtered or unexported fields
}

func SetTimeString

func SetTimeString(value string) *Time

func SetTimeValue

func SetTimeValue(value time.Time) *Time

func (Time) MarshalJSON

func (dt Time) MarshalJSON() ([]byte, error)

MarshalJSON - Convert value to JSON

func (*Time) SetString

func (dt *Time) SetString(value string) *Time

func (*Time) SetValue

func (dt *Time) SetValue(value time.Time) *Time

func (Time) String

func (dt Time) String() string

func (*Time) UnmarshalJSON

func (dt *Time) UnmarshalJSON(data []byte) error

UnmarshalJSON - Convert JSON to value

func (Time) Value

func (dt Time) Value() time.Time

type UnitValue

type UnitValue struct {
	UnitValue   string `json:"unit"`  // Primary iSolarCloud entity.
	StringValue string `json:"value"` // Primary iSolarCloud entity.

	TypeValue string `json:"type_value"`

	Valid bool  `json:"valid"`
	Error error `json:"-"`
	// contains filtered or unexported fields
}

func SetUnitValueBool

func SetUnitValueBool(value bool) UnitValue

func SetUnitValueFloat

func SetUnitValueFloat(unit string, Type string, value float64) UnitValue

func SetUnitValueInteger

func SetUnitValueInteger(unit string, Type string, value int64) UnitValue

func SetUnitValueString

func SetUnitValueString(unit string, Type string, value string) UnitValue

func (*UnitValue) DeviceId

func (t *UnitValue) DeviceId() string

func (*UnitValue) IsBool

func (t *UnitValue) IsBool() bool

func (*UnitValue) IsFloat

func (t *UnitValue) IsFloat() bool

func (*UnitValue) IsInt

func (t *UnitValue) IsInt() bool

func (*UnitValue) IsNotZero

func (t *UnitValue) IsNotZero() bool

func (*UnitValue) IsNumber

func (t *UnitValue) IsNumber() bool

func (*UnitValue) IsTypeDateTime

func (t *UnitValue) IsTypeDateTime() bool

func (*UnitValue) IsZero

func (t *UnitValue) IsZero() bool

func (UnitValue) MarshalJSON

func (t UnitValue) MarshalJSON() ([]byte, error)

MarshalJSON - Convert value to JSON

func (*UnitValue) MatchBool

func (t *UnitValue) MatchBool(comp bool) bool

func (*UnitValue) MatchFloat

func (t *UnitValue) MatchFloat(comp float64) bool

func (*UnitValue) MatchInt

func (t *UnitValue) MatchInt(comp int64) bool

func (*UnitValue) SetBool

func (t *UnitValue) SetBool(value bool) UnitValue

func (*UnitValue) SetBoolString

func (t *UnitValue) SetBoolString(value string) UnitValue

func (*UnitValue) SetDeviceId

func (t *UnitValue) SetDeviceId(deviceId string) UnitValue

func (*UnitValue) SetFloat

func (t *UnitValue) SetFloat(value float64) UnitValue

func (*UnitValue) SetInteger

func (t *UnitValue) SetInteger(value int64) UnitValue

func (*UnitValue) SetKey

func (t *UnitValue) SetKey(key string) UnitValue

func (*UnitValue) SetPrecision

func (t *UnitValue) SetPrecision(precision int) UnitValue

func (*UnitValue) SetString

func (t *UnitValue) SetString(value string) UnitValue

func (*UnitValue) SetType

func (t *UnitValue) SetType(Type string) UnitValue

func (*UnitValue) SetUnit

func (t *UnitValue) SetUnit(unit string) UnitValue

func (UnitValue) String

func (t UnitValue) String() string

func (*UnitValue) Type

func (t *UnitValue) Type() string

func (*UnitValue) Unit

func (t *UnitValue) Unit() string

func (*UnitValue) UnitValueFix

func (t *UnitValue) UnitValueFix() UnitValue

func (*UnitValue) UnmarshalJSON

func (t *UnitValue) UnmarshalJSON(data []byte) error

UnmarshalJSON - Convert JSON to value

func (*UnitValue) Value

func (t *UnitValue) Value() float64

func (*UnitValue) ValueBool

func (t *UnitValue) ValueBool() bool

func (*UnitValue) ValueFloat

func (t *UnitValue) ValueFloat() float64

func (*UnitValue) ValueInt

func (t *UnitValue) ValueInt() int64

func (*UnitValue) ValueKey

func (t *UnitValue) ValueKey() string

type UnitValues

type UnitValues struct {
	Unit      string `json:"unit"`
	TypeValue string `json:"type_value"`
	// contains filtered or unexported fields
}

func AnyToUnitValue

func AnyToUnitValue(ref interface{}, key string, unit string, typeString string, dateFormat string) (UnitValues, bool, bool)

func (*UnitValues) AddBool

func (t *UnitValues) AddBool(key string, value ...bool) *UnitValues

func (*UnitValues) AddFloat

func (t *UnitValues) AddFloat(key string, unit string, Type string, value ...float64) *UnitValues

func (*UnitValues) AddInteger

func (t *UnitValues) AddInteger(key string, unit string, Type string, value ...int64) *UnitValues

func (*UnitValues) AddString

func (t *UnitValues) AddString(key string, unit string, Type string, value ...string) *UnitValues

func (*UnitValues) AddUnitValue

func (t *UnitValues) AddUnitValue(key string, uvs ...UnitValue) *UnitValues

func (*UnitValues) AddUnitValues

func (t *UnitValues) AddUnitValues(key string, uvs UnitValues) *UnitValues

func (*UnitValues) AppendBool

func (t *UnitValues) AppendBool(value ...bool) *UnitValues

func (*UnitValues) AppendFloat

func (t *UnitValues) AppendFloat(unit string, Type string, value ...float64) *UnitValues

func (*UnitValues) AppendInteger

func (t *UnitValues) AppendInteger(unit string, Type string, value ...int64) *UnitValues

func (*UnitValues) AppendString

func (t *UnitValues) AppendString(unit string, Type string, value ...string) *UnitValues

func (*UnitValues) AppendUnitValue

func (t *UnitValues) AppendUnitValue(uvs ...UnitValue) *UnitValues

func (*UnitValues) AppendUnitValues

func (t *UnitValues) AppendUnitValues(uvs UnitValues) *UnitValues

func (*UnitValues) First

func (t *UnitValues) First() *UnitValue

func (*UnitValues) GetIndex

func (t *UnitValues) GetIndex(index int) *UnitValue

func (*UnitValues) GetKey

func (t *UnitValues) GetKey(key string) *UnitValue

func (*UnitValues) GetUnit

func (t *UnitValues) GetUnit() string

func (*UnitValues) GetarrayValues

func (t *UnitValues) GetarrayValues() []*UnitValue

func (*UnitValues) GetmapValues

func (t *UnitValues) GetmapValues() map[string]*UnitValue

func (*UnitValues) IsArray

func (t *UnitValues) IsArray() bool

func (*UnitValues) IsInit

func (t *UnitValues) IsInit() bool

func (*UnitValues) IsMap

func (t *UnitValues) IsMap() bool

func (*UnitValues) Keys

func (t *UnitValues) Keys(loadOrder bool) []string

func (*UnitValues) Last

func (t *UnitValues) Last() *UnitValue

func (*UnitValues) Length

func (t *UnitValues) Length() int

func (*UnitValues) Range

func (t *UnitValues) Range(loadOrder bool) []UnitValue

func (*UnitValues) Reset

func (t *UnitValues) Reset() *UnitValues

func (*UnitValues) SetDeviceId

func (t *UnitValues) SetDeviceId(deviceId string) *UnitValues

func (*UnitValues) SetPrecision

func (t *UnitValues) SetPrecision(precision int)

func (*UnitValues) SetType

func (t *UnitValues) SetType(Type string) *UnitValues

func (*UnitValues) SetUnit

func (t *UnitValues) SetUnit(unit string) *UnitValues

func (UnitValues) String

func (t UnitValues) String() string

func (*UnitValues) Type

func (t *UnitValues) Type() string

type Uuid

type Uuid struct {
	Valid bool  `json:"valid"`
	Error error `json:"-"`
	// contains filtered or unexported fields
}

func SetUuidString

func SetUuidString(value string) Uuid

func SetUuidValue

func SetUuidValue(value int64) Uuid

func (Uuid) MarshalJSON

func (t Uuid) MarshalJSON() ([]byte, error)

MarshalJSON - Convert value to JSON

func (Uuid) Match

func (t Uuid) Match(comp int64) bool

func (*Uuid) SetString

func (t *Uuid) SetString(value string) Uuid

func (*Uuid) SetValue

func (t *Uuid) SetValue(value int64) Uuid

func (Uuid) String

func (t Uuid) String() string

func (*Uuid) UnmarshalJSON

func (t *Uuid) UnmarshalJSON(data []byte) error

UnmarshalJSON - Convert JSON to value

func (Uuid) Value

func (t Uuid) Value() int64

Jump to

Keyboard shortcuts

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