web

package
v0.0.0-...-df46cc1 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2022 License: Apache-2.0 Imports: 31 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ContentType is the key for the Content-Type header
	ContentType = "Content-Type"

	// ContentTypeJSON is the allowed content type
	ContentTypeJSON = "application/json"
)

Variables

This section is empty.

Functions

func Configure

func Configure(db *zenodb.DB, router *mux.Router, opts *Opts) (func(), error)

Types

type AuthData

type AuthData struct {
	AccessToken string
	Expiration  time.Time
}

type Opts

type Opts struct {
	OAuthClientID         string
	OAuthClientSecret     string
	GitHubOrg             string
	HashKey               string
	BlockKey              string
	AssetsDir             string
	CacheDir              string
	CacheTTL              time.Duration
	Password              string
	QueryTimeout          time.Duration
	QueryConcurrencyLimit int
	MaxResponseBytes      int
}

type PermalinkInfo

type PermalinkInfo struct {
	Permalink string
	SQL       string
	Timestamp time.Time
	NumRows   int
}

PermalinkInfo provides info about a stored permalink

func ListPermalinks(cacheFile string) ([]*PermalinkInfo, error)

ListPermalinks returns a list of known permalinks and associated info

type PermalinkInfoRow

type PermalinkInfoRow struct {
	TS int64
}

type Point

type Point struct {
	Ts   time.Time              `json:"ts,omitempty"`
	Dims map[string]interface{} `json:"dims,omitempty"`
	Vals map[string]interface{} `json:"vals,omitempty"`
}

type QueryResult

type QueryResult struct {
	SQL                string
	Permalink          string
	TS                 int64
	TSCardinality      uint64
	Fields             []string
	FieldCardinalities []uint64
	Dims               []string
	DimCardinalities   []uint64
	Rows               []*ResultRow
	Stats              *common.QueryStats
}

type ResultRow

type ResultRow struct {
	TS   int64
	Key  map[string]interface{}
	Vals []float64
}

Jump to

Keyboard shortcuts

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