influxdb

package
v1.1.1-0...-dcff8be Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	ErrorInvalidConfiguration = "invalid configuration"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	Config *Config
	// contains filtered or unexported fields
}

Client used to query and interact with an influxdb server.

func (*Client) Select

func (c *Client) Select(query string) ([]map[string]interface{}, error)

Select issues the given query to the Client and parses the results into a key/value map with the name of the field as key and its interface{} as value.

type Config

type Config struct {
	Host     string
	Port     string
	User     string
	Password string
	Database string
}

Config defines the required configuration used to authenticate to an InfluxDB database.

func (*Config) AddToCommand

func (cfg *Config) AddToCommand(cmd *cobra.Command)

AddToCommand adds Config to the given cobra.Command.

func (*Config) AddToViper

func (cfg *Config) AddToViper(v *viper.Viper)

func (Config) IsValid

func (cfg Config) IsValid() bool

IsValid return true if Config is ready to be used, and false otherwise.

func (Config) NewClient

func (cfg Config) NewClient() (*Client, error)

Jump to

Keyboard shortcuts

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