simpleGraphQL

package
v0.0.8 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2024 License: AGPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckAllCompletedQL

func CheckAllCompletedQL(response *GraphQLResponse) bool

func DPRowsToMap

func DPRowsToMap(columns []Column) (map[string]int64, error)

func SplitActiveUser

func SplitActiveUser(column Column) (int64, int64, int64, error)

Types

type Column

type Column struct {
	Aggregations []string `json:"aggregations"`
	BreakDowns   []string `json:"breakdowns"`
}

type DataPoints

type DataPoints struct {
	Timestamp int64    `json:"timestamp"`
	Rows      []Column `json:"rows"`
}

func GetLatestDataPoints

func GetLatestDataPoints(dps []DataPoints) *DataPoints

type EmptyMap

type EmptyMap struct {
}

type GraphQLQuery

type GraphQLQuery struct {
	FilterSet         string   `json:"filter_set"`
	Since             int64    `json:"since"`
	Source            string   `json:"source"`
	Until             int64    `json:"until"`
	SectionLoadId     string   `json:"section_load_id"`
	AggregationPeriod string   `json:"aggregation_period"`
	Aggregations      []string `json:"aggregations"`
	Breakdowns        []string `json:"breakdowns"`
	EventName         string   `json:"event_name"`
	MetricParams      EmptyMap `json:"metric_params"`
	OrderingColumns   *string  `json:"ordering_columns"`
	Retry             bool     `json:"retry"`
}

func New

func New() *GraphQLQuery

func NewBasic

func NewBasic() *GraphQLQuery

type GraphQLResponse

type GraphQLResponse struct {
	QueryIds []string `json:"query_ids"`
	Results  []Result `json:"results"`
}

type Result

type Result struct {
	QueryId    string       `json:"query_id"`
	Status     string       `json:"status"`
	Columns    Column       `json:"columns"`
	DataPoints []DataPoints `json:"datapoints"`
}

Jump to

Keyboard shortcuts

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