
* add v1-compatible query path and refactor other paths to de-duplicate "/query" * add initial influxQL repl * add ping endpoint to schema * improve prompt UX, implement some commands * fix json column type in schema and improve completion * feat: add table formatter and move to forked go-prompt * improve formatting and add table pagination * implement more REPL commands, including insert and history * implement "INSERT INTO" * move repl command to "v1 repl" * refactor and improve documentation * clean up v1_repl cmd * update to latest openapi, use some openapi paths instead of overrides * remove additional files that were moved to openapi * compute historyFilePath at REPL start * clean up REPL use command logic flow * clean up comments for TODOs now in issues * move gopher (chonky boi) * remove autocompletion for separate PR * run go mod tidy * add rfc3339 precision option * allow left and right column scrolling to display whole table * add error to JSON query response * add tags and partial to JSON response series schema * fix csv formatting and add column formatting * remove table format for separate PR * fix getDatabases * move from write to legacy write endpoint for INSERT * remove history vestiges * allow multiple spaces in INSERT commands * add precision comment * remove auth for separate PR * separate parseInsert and add unit test * add additional test case and improve error messages * fix missing errors import * print rfc3339 precision * add rfc3339 to help output
258 lines
7.1 KiB
Go
258 lines
7.1 KiB
Go
/*
|
|
* Subset of Influx API covered by Influx CLI
|
|
*
|
|
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
*
|
|
* API version: 2.0.0
|
|
*/
|
|
|
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
|
|
|
package api
|
|
|
|
import (
|
|
"encoding/json"
|
|
)
|
|
|
|
// InfluxqlJsonResponseSeries struct for InfluxqlJsonResponseSeries
|
|
type InfluxqlJsonResponseSeries struct {
|
|
Name *string `json:"name,omitempty" yaml:"name,omitempty"`
|
|
Tags *map[string]string `json:"tags,omitempty" yaml:"tags,omitempty"`
|
|
Partial *bool `json:"partial,omitempty" yaml:"partial,omitempty"`
|
|
Columns *[]string `json:"columns,omitempty" yaml:"columns,omitempty"`
|
|
Values *[][]interface{} `json:"values,omitempty" yaml:"values,omitempty"`
|
|
}
|
|
|
|
// NewInfluxqlJsonResponseSeries instantiates a new InfluxqlJsonResponseSeries object
|
|
// This constructor will assign default values to properties that have it defined,
|
|
// and makes sure properties required by API are set, but the set of arguments
|
|
// will change when the set of required properties is changed
|
|
func NewInfluxqlJsonResponseSeries() *InfluxqlJsonResponseSeries {
|
|
this := InfluxqlJsonResponseSeries{}
|
|
return &this
|
|
}
|
|
|
|
// NewInfluxqlJsonResponseSeriesWithDefaults instantiates a new InfluxqlJsonResponseSeries object
|
|
// This constructor will only assign default values to properties that have it defined,
|
|
// but it doesn't guarantee that properties required by API are set
|
|
func NewInfluxqlJsonResponseSeriesWithDefaults() *InfluxqlJsonResponseSeries {
|
|
this := InfluxqlJsonResponseSeries{}
|
|
return &this
|
|
}
|
|
|
|
// GetName returns the Name field value if set, zero value otherwise.
|
|
func (o *InfluxqlJsonResponseSeries) GetName() string {
|
|
if o == nil || o.Name == nil {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Name
|
|
}
|
|
|
|
// GetNameOk returns a tuple with the Name field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *InfluxqlJsonResponseSeries) GetNameOk() (*string, bool) {
|
|
if o == nil || o.Name == nil {
|
|
return nil, false
|
|
}
|
|
return o.Name, true
|
|
}
|
|
|
|
// HasName returns a boolean if a field has been set.
|
|
func (o *InfluxqlJsonResponseSeries) HasName() bool {
|
|
if o != nil && o.Name != nil {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetName gets a reference to the given string and assigns it to the Name field.
|
|
func (o *InfluxqlJsonResponseSeries) SetName(v string) {
|
|
o.Name = &v
|
|
}
|
|
|
|
// GetTags returns the Tags field value if set, zero value otherwise.
|
|
func (o *InfluxqlJsonResponseSeries) GetTags() map[string]string {
|
|
if o == nil || o.Tags == nil {
|
|
var ret map[string]string
|
|
return ret
|
|
}
|
|
return *o.Tags
|
|
}
|
|
|
|
// GetTagsOk returns a tuple with the Tags field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *InfluxqlJsonResponseSeries) GetTagsOk() (*map[string]string, bool) {
|
|
if o == nil || o.Tags == nil {
|
|
return nil, false
|
|
}
|
|
return o.Tags, true
|
|
}
|
|
|
|
// HasTags returns a boolean if a field has been set.
|
|
func (o *InfluxqlJsonResponseSeries) HasTags() bool {
|
|
if o != nil && o.Tags != nil {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetTags gets a reference to the given map[string]string and assigns it to the Tags field.
|
|
func (o *InfluxqlJsonResponseSeries) SetTags(v map[string]string) {
|
|
o.Tags = &v
|
|
}
|
|
|
|
// GetPartial returns the Partial field value if set, zero value otherwise.
|
|
func (o *InfluxqlJsonResponseSeries) GetPartial() bool {
|
|
if o == nil || o.Partial == nil {
|
|
var ret bool
|
|
return ret
|
|
}
|
|
return *o.Partial
|
|
}
|
|
|
|
// GetPartialOk returns a tuple with the Partial field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *InfluxqlJsonResponseSeries) GetPartialOk() (*bool, bool) {
|
|
if o == nil || o.Partial == nil {
|
|
return nil, false
|
|
}
|
|
return o.Partial, true
|
|
}
|
|
|
|
// HasPartial returns a boolean if a field has been set.
|
|
func (o *InfluxqlJsonResponseSeries) HasPartial() bool {
|
|
if o != nil && o.Partial != nil {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetPartial gets a reference to the given bool and assigns it to the Partial field.
|
|
func (o *InfluxqlJsonResponseSeries) SetPartial(v bool) {
|
|
o.Partial = &v
|
|
}
|
|
|
|
// GetColumns returns the Columns field value if set, zero value otherwise.
|
|
func (o *InfluxqlJsonResponseSeries) GetColumns() []string {
|
|
if o == nil || o.Columns == nil {
|
|
var ret []string
|
|
return ret
|
|
}
|
|
return *o.Columns
|
|
}
|
|
|
|
// GetColumnsOk returns a tuple with the Columns field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *InfluxqlJsonResponseSeries) GetColumnsOk() (*[]string, bool) {
|
|
if o == nil || o.Columns == nil {
|
|
return nil, false
|
|
}
|
|
return o.Columns, true
|
|
}
|
|
|
|
// HasColumns returns a boolean if a field has been set.
|
|
func (o *InfluxqlJsonResponseSeries) HasColumns() bool {
|
|
if o != nil && o.Columns != nil {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetColumns gets a reference to the given []string and assigns it to the Columns field.
|
|
func (o *InfluxqlJsonResponseSeries) SetColumns(v []string) {
|
|
o.Columns = &v
|
|
}
|
|
|
|
// GetValues returns the Values field value if set, zero value otherwise.
|
|
func (o *InfluxqlJsonResponseSeries) GetValues() [][]interface{} {
|
|
if o == nil || o.Values == nil {
|
|
var ret [][]interface{}
|
|
return ret
|
|
}
|
|
return *o.Values
|
|
}
|
|
|
|
// GetValuesOk returns a tuple with the Values field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *InfluxqlJsonResponseSeries) GetValuesOk() (*[][]interface{}, bool) {
|
|
if o == nil || o.Values == nil {
|
|
return nil, false
|
|
}
|
|
return o.Values, true
|
|
}
|
|
|
|
// HasValues returns a boolean if a field has been set.
|
|
func (o *InfluxqlJsonResponseSeries) HasValues() bool {
|
|
if o != nil && o.Values != nil {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetValues gets a reference to the given [][]interface{} and assigns it to the Values field.
|
|
func (o *InfluxqlJsonResponseSeries) SetValues(v [][]interface{}) {
|
|
o.Values = &v
|
|
}
|
|
|
|
func (o InfluxqlJsonResponseSeries) MarshalJSON() ([]byte, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if o.Name != nil {
|
|
toSerialize["name"] = o.Name
|
|
}
|
|
if o.Tags != nil {
|
|
toSerialize["tags"] = o.Tags
|
|
}
|
|
if o.Partial != nil {
|
|
toSerialize["partial"] = o.Partial
|
|
}
|
|
if o.Columns != nil {
|
|
toSerialize["columns"] = o.Columns
|
|
}
|
|
if o.Values != nil {
|
|
toSerialize["values"] = o.Values
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
type NullableInfluxqlJsonResponseSeries struct {
|
|
value *InfluxqlJsonResponseSeries
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableInfluxqlJsonResponseSeries) Get() *InfluxqlJsonResponseSeries {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableInfluxqlJsonResponseSeries) Set(val *InfluxqlJsonResponseSeries) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableInfluxqlJsonResponseSeries) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableInfluxqlJsonResponseSeries) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableInfluxqlJsonResponseSeries(val *InfluxqlJsonResponseSeries) *NullableInfluxqlJsonResponseSeries {
|
|
return &NullableInfluxqlJsonResponseSeries{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableInfluxqlJsonResponseSeries) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableInfluxqlJsonResponseSeries) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|