Documentation
¶
Index ¶
- Constants
- func SingleDataCompareHelper(result []*SingleData, wanted []*SingleData, t *testing.T)
- type ArchiverQueryModel
- func (qm ArchiverQueryModel) IdentifyFunctionsByName(targetName string) []FunctionDescriptorQueryModel
- func (qm ArchiverQueryModel) LoadBooleanOption(name FunctionOption, defaultv bool) (bool, error)
- func (qm ArchiverQueryModel) LoadIntOption(name FunctionOption, defaultv int) (int, error)
- func (qm ArchiverQueryModel) LoadStrOption(name FunctionOption, defaultv string) (string, error)
- func (qm ArchiverQueryModel) PickFuncsByCategories(categories []FunctionCategory) []FunctionDescriptorQueryModel
- type ArchiverResponseModel
- type ArrayResponseModel
- type Arrays
- type DataResponse
- type DatasourceSettings
- type Enums
- type FieldName
- type FormatOption
- type FuncDefParamQueryModel
- type FuncDefQueryModel
- type FunctionCategory
- type FunctionDescriptorQueryModel
- func (fdqm FunctionDescriptorQueryModel) ExtractParamBoolean(target string) (bool, error)
- func (fdqm FunctionDescriptorQueryModel) ExtractParamFloat64(target string) (float64, error)
- func (fdqm FunctionDescriptorQueryModel) ExtractParamInt(target string) (int, error)
- func (fdqm FunctionDescriptorQueryModel) ExtractParamString(target string) (string, error)
- func (fdqm FunctionDescriptorQueryModel) GetParamTypeByName(target string) (string, error)
- func (fdqm FunctionDescriptorQueryModel) GetParametersByName(target string) (string, error)
- type FunctionOption
- type RankType
- type ScalarResponseModel
- type Scalars
- func (v *Scalars) Append(val *float64, t time.Time)
- func (v *Scalars) AppendConcrete(val float64, t time.Time)
- func (v *Scalars) Delta()
- func (v *Scalars) Extrapolation(t time.Time)
- func (v *Scalars) Fluctuation()
- func (v *Scalars) MovingAverage(windowSize int)
- func (v *Scalars) Offset(delta float64)
- func (v *Scalars) Rank(rankType RankType) (float64, error)
- func (v *Scalars) Scale(factor float64)
- func (v *Scalars) SetValConcrete(idx int, val float64)
- func (v *Scalars) ToFields(pvname string, name string, format FormatOption) []*data.Field
- type SingleArrayResponseModel
- type SingleData
- type SingleScalarResponseModel
- type SingleStringResponseModel
- type StringResponseModel
- type Strings
- type Values
Constants ¶
View Source
const ( FUNC_CATEGORY_TRANSFORM = FunctionCategory("Transform") FUNC_CATEGORY_TOSCALAR = FunctionCategory("Array to Scalar") FUNC_CATEGORY_FILTER = FunctionCategory("Filter Series") FUNC_CATEGORY_SORT = FunctionCategory("Sort") FUNC_CATEGORY_OPTIONS = FunctionCategory("Options") )
View Source
const ( FUNC_OPTION_FIELDNAME = FunctionOption("fieldName") FUNC_OPTION_LIVEONLY = FunctionOption("liveOnly") FUNC_OPTION_MAXNUMPVS = FunctionOption("maxNumPVs") FUNC_OPTION_DISABLEAUTORAW = FunctionOption("disableAutoRaw") FUNC_OPTION_DISABLEEXTRAPOL = FunctionOption("disableExtrapol") FUNC_OPTION_BININTERVAL = FunctionOption("binInterval") FUNC_OPTION_ARRAY_FORMAT = FunctionOption("arrayFormat") FUNC_OPTION_IGNOREEMPTYERR = FunctionOption("ignoreEmptyErr") FUNC_OPTION_HIDEINVALID = FunctionOption("hideInvalid") )
View Source
const ( RANKTYPE_AVG = RankType("Avg") RANKTYPE_MIN = RankType("Min") RANKTYPE_MAX = RankType("Max") RANKTYPE_ABSOLUTEMIN = RankType("AbsoluteMin") RANKTYPE_ABSOLUTEMAX = RankType("AbsoluteMax") RANKTYPE_SUM = RankType("Sum") )
View Source
const ( FORMAT_TIMESERIES = FunctionCategory("timeseries") FORMAT_INDEX = FunctionCategory("index") FORMAT_DTSPACE = FunctionCategory("dt-space") )
Variables ¶
This section is empty.
Functions ¶
func SingleDataCompareHelper ¶
func SingleDataCompareHelper(result []*SingleData, wanted []*SingleData, t *testing.T)
Types ¶
type ArchiverQueryModel ¶
type ArchiverQueryModel struct { // It's not apparent to me where these two originate from but they do appear to be necessary Format string `json:"format"` Constant json.Number `json:"constant"` // I don't know what this is for yet QueryText string `json:"queryText"` // deprecated // Parameters added in AAQuery's extension of DataQuery Target string `json:"target"` //This will be the PV as entered by the user, or regex searching for PVs Alias string `json:"alias"` // What to refer to the data as in the table - I think this only for the frontend rn AliasPattern string `json:"aliasPattern"` // use for collecting a large number of returned values Operator string `json:"operator"` // ? Regex bool `json:"regex"` // configured by the user's setting of the "Regex" field in the panel Live bool `json:"live"` // configured by the user's setting of the "Live" field in the panel Functions []FunctionDescriptorQueryModel `json:"functions"` // collection of functions to be applied to the data by the archiver // Only appears for visualization queries IntervalMs *int `json:"intervalMs,omitempty"` // Parameters from DataQuery RefId string `json:"refId"` Hide *bool `json:"hide"` Key *string `json:"string"` QueryType *string `json:"queryType"` MaxDataPoints int `json:"maxDataPoints"` // Not from JSON TimeRange backend.TimeRange `json:"-"` Interval int `json:"-"` BackendQuery bool `json:"-"` FieldName string `json:"-"` LiveOnly bool `json:"-"` MaxNumPVs int `json:"-"` DisableAutoRaw bool `json:"-"` DisableExtrapol bool `json:"-"` HideInvalid bool `json:"-"` FormatOption FormatOption `json:"-"` IgnoreEmptyErr bool `json:"-"` }
func ReadQueryModel ¶
func ReadQueryModel(query backend.DataQuery, config DatasourceSettings) (ArchiverQueryModel, error)
func (ArchiverQueryModel) IdentifyFunctionsByName ¶
func (qm ArchiverQueryModel) IdentifyFunctionsByName(targetName string) []FunctionDescriptorQueryModel
func (ArchiverQueryModel) LoadBooleanOption ¶
func (qm ArchiverQueryModel) LoadBooleanOption(name FunctionOption, defaultv bool) (bool, error)
func (ArchiverQueryModel) LoadIntOption ¶
func (qm ArchiverQueryModel) LoadIntOption(name FunctionOption, defaultv int) (int, error)
func (ArchiverQueryModel) LoadStrOption ¶
func (qm ArchiverQueryModel) LoadStrOption(name FunctionOption, defaultv string) (string, error)
func (ArchiverQueryModel) PickFuncsByCategories ¶
func (qm ArchiverQueryModel) PickFuncsByCategories(categories []FunctionCategory) []FunctionDescriptorQueryModel
type ArchiverResponseModel ¶
type ArrayResponseModel ¶
type ArrayResponseModel []SingleArrayResponseModel
func (ArrayResponseModel) ToSingleDataValues ¶
func (response ArrayResponseModel) ToSingleDataValues() (Values, error)
type Arrays ¶
func (*Arrays) Extrapolation ¶
type DataResponse ¶
type DatasourceSettings ¶
type DatasourceSettings struct { DefaultOperator string `json:"defaultOperator"` DefaultHideInvalid bool `json:"hideInvalid"` UseLiveUpdate bool `json:"useLiveUpdate"` LiveUpdateURI string `json:"liveUpdateURI"` URL string `json:"-"` UID string `json:"-"` }
func LoadSettings ¶
func LoadSettings(settings backend.DataSourceInstanceSettings) (DatasourceSettings, error)
type Enums ¶
type Enums struct { Times []time.Time Values []data.EnumItemIndex EnumConfig data.EnumFieldConfig }
func NewSevirityEnums ¶
func NewStatusEnums ¶
func (*Enums) Extrapolation ¶
type FormatOption ¶
type FormatOption string
type FuncDefParamQueryModel ¶
type FuncDefQueryModel ¶
type FuncDefQueryModel struct { // Matched to FuncDef in types.ts DefaultParams *json.RawMessage `json:"defaultParams,omitempty"` ShortName *json.RawMessage `json:"shortName,omitempty"` Version *json.RawMessage `json:"version,omitempty"` Category FunctionCategory `json:"category"` Description *string `json:"description,omitempty"` Fake *bool `json:"fake,omitempty"` Name string `json:"name"` Params []FuncDefParamQueryModel `json:"params"` }
type FunctionCategory ¶
type FunctionCategory string
type FunctionDescriptorQueryModel ¶
type FunctionDescriptorQueryModel struct { // Matched to FunctionDescriptor in types.ts Params []string `json:"params"` Def FuncDefQueryModel `json:"def"` }
func (FunctionDescriptorQueryModel) ExtractParamBoolean ¶
func (fdqm FunctionDescriptorQueryModel) ExtractParamBoolean(target string) (bool, error)
func (FunctionDescriptorQueryModel) ExtractParamFloat64 ¶
func (fdqm FunctionDescriptorQueryModel) ExtractParamFloat64(target string) (float64, error)
func (FunctionDescriptorQueryModel) ExtractParamInt ¶
func (fdqm FunctionDescriptorQueryModel) ExtractParamInt(target string) (int, error)
func (FunctionDescriptorQueryModel) ExtractParamString ¶
func (fdqm FunctionDescriptorQueryModel) ExtractParamString(target string) (string, error)
func (FunctionDescriptorQueryModel) GetParamTypeByName ¶
func (fdqm FunctionDescriptorQueryModel) GetParamTypeByName(target string) (string, error)
func (FunctionDescriptorQueryModel) GetParametersByName ¶
func (fdqm FunctionDescriptorQueryModel) GetParametersByName(target string) (string, error)
type FunctionOption ¶
type FunctionOption string
type ScalarResponseModel ¶
type ScalarResponseModel []SingleScalarResponseModel
func (ScalarResponseModel) ToSingleDataValues ¶
func (response ScalarResponseModel) ToSingleDataValues() (Values, error)
type Scalars ¶
func (*Scalars) Extrapolation ¶
func (*Scalars) Fluctuation ¶
func (v *Scalars) Fluctuation()
func (*Scalars) MovingAverage ¶
func (*Scalars) SetValConcrete ¶
type SingleData ¶
func (*SingleData) ApplyAlias ¶
func (sd *SingleData) ApplyAlias(alias string, rep *regexp.Regexp)
func (*SingleData) Extrapolation ¶
func (sd *SingleData) Extrapolation(t time.Time) *SingleData
func (*SingleData) ToFrame ¶
func (sd *SingleData) ToFrame(format FormatOption) *data.Frame
type StringResponseModel ¶
type StringResponseModel []SingleStringResponseModel
func (StringResponseModel) ToSingleDataValues ¶
func (response StringResponseModel) ToSingleDataValues() (Values, error)
Click to show internal directories.
Click to hide internal directories.