influx

package
v0.0.0-...-9971314 Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2025 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetQueryCursor

func GetQueryCursor(stmt string) (*api.QueryTableResult, context.CancelFunc, error)

func NewGlobalHelper

func NewGlobalHelper(opts ...Option) error

Types

type Auth

type Auth struct {
	Token string `json:"token" yaml:"token"`
}

type ConnectClient

type ConnectClient interface {
	QueryAPI(string) api.QueryAPI
	Close()
}

type Helper

type Helper struct {
	ConnectClient
	QueryApiClient
	Options
}

func GetGlobalHelper

func GetGlobalHelper() *Helper

func NewHelper

func NewHelper(opts ...Option) (*Helper, error)

func (*Helper) Close

func (h *Helper) Close()

type Option

type Option func(*Options)

func AuthToken

func AuthToken(token string) Option

func Host

func Host(host string) Option

func Org

func Org(org string) Option

func Port

func Port(port int) Option

func Protocol

func Protocol(protocol string) Option

func TlsInsecureSkipVerify

func TlsInsecureSkipVerify(skip bool) Option

func Url

func Url(url string) Option

type Options

type Options struct {
	Url                   string `json:"url" yaml:"url"`
	Protocol              string `json:"protocol" yaml:"protocol"`
	Host                  string `json:"host" yaml:"host"`
	Port                  int    `json:"port" yaml:"port"`
	Org                   string `json:"org" yaml:"org"`
	Auth                  `json:"auth" yaml:"auth"`
	TlsInsecureSkipVerify bool `json:"tlsInsecureSkipVerify" yaml:"tlsInsecureSkipVerify"`
	Timeout               uint `json:"timeout" yaml:"timeout"`
}
var (
	Opts *Options
)

type Query

type Query struct {
	// contains filtered or unexported fields
}

func (*Query) AggregateWindow

func (q *Query) AggregateWindow(params string) *Query

func (*Query) Bucket

func (q *Query) Bucket(params string) *Query

func (*Query) Count

func (q *Query) Count(params string) *Query

func (*Query) Derivative

func (q *Query) Derivative(params string) *Query

func (*Query) Different

func (q *Query) Different() *Query

func (*Query) Distinct

func (q *Query) Distinct(params string) *Query

func (*Query) Filter

func (q *Query) Filter(params string) *Query

func (*Query) Group

func (q *Query) Group(params string) *Query

func (*Query) Keep

func (q *Query) Keep(params string) *Query

func (*Query) Last

func (q *Query) Last() *Query

func (*Query) Limit

func (q *Query) Limit(params string) *Query

func (*Query) Map

func (q *Query) Map(params string) *Query

func (*Query) Max

func (q *Query) Max(params string) *Query

func (*Query) Measurement

func (q *Query) Measurement(params string) *Query

func (*Query) Pivot

func (q *Query) Pivot(params string) *Query

func (*Query) Range

func (q *Query) Range(params string) *Query

func (*Query) Rename

func (q *Query) Rename(params string) *Query

func (*Query) Sort

func (q *Query) Sort(params string) *Query

func (*Query) String

func (q *Query) String() string

func (*Query) Sum

func (q *Query) Sum(params string) *Query

func (*Query) Top

func (q *Query) Top(params string) *Query

type QueryApiClient

type QueryApiClient interface {
	Query(context.Context, string) (*api.QueryTableResult, error)
}

Jump to

Keyboard shortcuts

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