model

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: May 13, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

This section is empty.

Types

type FloatAggregation

type FloatAggregation struct {
	// Aggregation type.
	Type FloatAggregationType `json:"type"`
	// interval is a time span that used for aggregatting the data with.
	// A duration string is a sequence of decimal numbers, each with optional fraction and a unit suffix,
	// such as "300ms", "-1.5h" or "2h45m". Valid time units are "ms", "s", "m", "h", "d", "w", "y".
	Interval string `json:"interval"`
}

type FloatAggregationType

type FloatAggregationType string
const (
	FloatAggregationTypeAvg  FloatAggregationType = "AVG"
	FloatAggregationTypeMed  FloatAggregationType = "MED"
	FloatAggregationTypeMax  FloatAggregationType = "MAX"
	FloatAggregationTypeMin  FloatAggregationType = "MIN"
	FloatAggregationTypeRand FloatAggregationType = "RAND"
)

func (FloatAggregationType) IsValid

func (e FloatAggregationType) IsValid() bool

func (FloatAggregationType) MarshalGQL

func (e FloatAggregationType) MarshalGQL(w io.Writer)

func (FloatAggregationType) String

func (e FloatAggregationType) String() string

func (*FloatAggregationType) UnmarshalGQL

func (e *FloatAggregationType) UnmarshalGQL(v interface{}) error

type FloatSignalArgs added in v0.0.4

type FloatSignalArgs struct {
	Name string
	Agg  FloatAggregation
	SignalArgs
}

FloatSignalArgs is the arguments for querying a float signals.

type Privilege

type Privilege string
const (
	PrivilegeVehicleNonLocationData Privilege = "VEHICLE_NON_LOCATION_DATA"
	PrivilegeVehicleCommands        Privilege = "VEHICLE_COMMANDS"
	PrivilegeVehicleCurrentLocation Privilege = "VEHICLE_CURRENT_LOCATION"
	PrivilegeVehicleAllTimeLocation Privilege = "VEHICLE_ALL_TIME_LOCATION"
	PrivilegeVehicleVinCredential   Privilege = "VEHICLE_VIN_CREDENTIAL"
)

func (Privilege) IsValid

func (e Privilege) IsValid() bool

func (Privilege) MarshalGQL

func (e Privilege) MarshalGQL(w io.Writer)

func (Privilege) String

func (e Privilege) String() string

func (*Privilege) UnmarshalGQL

func (e *Privilege) UnmarshalGQL(v interface{}) error

type Query

type Query struct {
}

The root query type for the GraphQL schema.

type SignalArgs added in v0.0.4

type SignalArgs struct {
	FromTS  time.Time
	ToTS    time.Time
	Filter  *SignalFilter
	TokenID uint32
}

SignalArgs is the base arguments for querying signals.

type SignalFilter added in v0.0.4

type SignalFilter struct {
	// Filter signals by source type.
	// avalible sources are: "autopi", "macaron", "smartcar", "tesla"
	Source *string `json:"source,omitempty"`
}

SignalFilter holds the filter parameters for the signal querys.

type SignalFloat

type SignalFloat struct {
	// timestamp of when this data was colllected
	Timestamp *time.Time `json:"timestamp,omitempty"`
	// value of the signal
	Value *float64 `json:"value,omitempty"`
}

type SignalString

type SignalString struct {
	// timestamp of when this data was colllected
	Timestamp *time.Time `json:"timestamp,omitempty"`
	// value of the signal
	Value *string `json:"value,omitempty"`
}

type Signals added in v0.0.4

type Signals struct {
	SigArgs SignalArgs
}

Signals is the collection of signals. This struct is used to force the generation of the SignalCollection, and SignalAggregations resolver. As well as carrying the arguments from the parent query.

type StringAggregation

type StringAggregation struct {
	// Aggregation type.
	Type StringAggregationType `json:"type"`
	// interval is a time span that used for aggregatting the data with.
	// A duration string is a sequence of decimal numbers, each with optional fraction and a unit suffix,
	// such as "300ms", "-1.5h" or "2h45m". Valid time units are "ms", "s", "m", "h"
	Interval string `json:"interval"`
}

type StringAggregationType

type StringAggregationType string
const (
	// Randomly select a value from the group.
	StringAggregationTypeRand StringAggregationType = "RAND"
	// Select the most frequently occurring value in the group.
	StringAggregationTypeTop StringAggregationType = "TOP"
	// Return a list of unique values in the group.
	StringAggregationTypeUnique StringAggregationType = "UNIQUE"
)

func (StringAggregationType) IsValid

func (e StringAggregationType) IsValid() bool

func (StringAggregationType) MarshalGQL

func (e StringAggregationType) MarshalGQL(w io.Writer)

func (StringAggregationType) String

func (e StringAggregationType) String() string

func (*StringAggregationType) UnmarshalGQL

func (e *StringAggregationType) UnmarshalGQL(v interface{}) error

type StringSignalArgs added in v0.0.4

type StringSignalArgs struct {
	Name string
	Agg  StringAggregation
	SignalArgs
}

StringSignalArgs is the arguments for querying a string signals.

Jump to

Keyboard shortcuts

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