geminicli

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Feb 29, 2024 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CLIENT_VERSION = "0.1.0"
	DEFAULT_FORMAT = "column"
	DEFAULT_HOST   = "localhost"
	DEFAULT_PORT   = 8086
)

Variables

View Source
var (
	FilePathCompletionSeparator = string([]byte{' ', os.PathSeparator})
)

Functions

This section is empty.

Types

type CommandLine

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

func (*CommandLine) Connect

func (c *CommandLine) Connect(addr string) error

func (*CommandLine) Execute

func (c *CommandLine) Execute(s string) error

func (*CommandLine) Run

func (c *CommandLine) Run() error

type CommandLineConfig

type CommandLineConfig struct {
	Host       string
	Port       int
	UnixSocket string
	Username   string
	Password   string
	Database   string
	Type       string
	Ssl        bool
	IgnoreSsl  bool
	Precision  string

	// import cmd options
	Import bool
	Path   string
}

type CommandLineFactory

type CommandLineFactory struct {
}

func (CommandLineFactory) CreateCommandLine

func (f CommandLineFactory) CreateCommandLine(config CommandLineConfig) (*CommandLine, error)

type Completer

type Completer struct {
}

func NewCompleter

func NewCompleter() *Completer

type HttpClient

type HttpClient interface {
	Ping() (time.Duration, string, error)
	QueryContext(context.Context, client.Query) (*client.Response, error)
	Write(bp client.BatchPoints) (*client.Response, error)
	WriteLineProtocol(data, database, retentionPolicy, precision, writeConsistency string) (*client.Response, error)
	SetAuth(username, password string)
	SetPrecision(precision string)
}

type HttpClientCreator

type HttpClientCreator func(client.Config) (HttpClient, error)

type Importer added in v1.1.0

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

Importer is the importer used for importing data

func NewImporter added in v1.1.0

func NewImporter() *Importer

NewImporter will return an initialized Importer struct

func (*Importer) Import added in v1.1.0

func (ipt *Importer) Import(clc *CommandLineConfig) error

Import processes the specified file in the Config and writes the data to the databases in chunks specified by batchSize

Jump to

Keyboard shortcuts

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