feat: add back the InfluxQL REPL (#386)
* 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
This commit is contained in:
113
api/model_influxql_json_response.gen.go
Normal file
113
api/model_influxql_json_response.gen.go
Normal file
@ -0,0 +1,113 @@
|
||||
/*
|
||||
* 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"
|
||||
)
|
||||
|
||||
// InfluxqlJsonResponse JSON Response to InfluxQL Query
|
||||
type InfluxqlJsonResponse struct {
|
||||
Results *[]InfluxqlJsonResponseResults `json:"results,omitempty" yaml:"results,omitempty"`
|
||||
}
|
||||
|
||||
// NewInfluxqlJsonResponse instantiates a new InfluxqlJsonResponse 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 NewInfluxqlJsonResponse() *InfluxqlJsonResponse {
|
||||
this := InfluxqlJsonResponse{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewInfluxqlJsonResponseWithDefaults instantiates a new InfluxqlJsonResponse 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 NewInfluxqlJsonResponseWithDefaults() *InfluxqlJsonResponse {
|
||||
this := InfluxqlJsonResponse{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetResults returns the Results field value if set, zero value otherwise.
|
||||
func (o *InfluxqlJsonResponse) GetResults() []InfluxqlJsonResponseResults {
|
||||
if o == nil || o.Results == nil {
|
||||
var ret []InfluxqlJsonResponseResults
|
||||
return ret
|
||||
}
|
||||
return *o.Results
|
||||
}
|
||||
|
||||
// GetResultsOk returns a tuple with the Results field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *InfluxqlJsonResponse) GetResultsOk() (*[]InfluxqlJsonResponseResults, bool) {
|
||||
if o == nil || o.Results == nil {
|
||||
return nil, false
|
||||
}
|
||||
return o.Results, true
|
||||
}
|
||||
|
||||
// HasResults returns a boolean if a field has been set.
|
||||
func (o *InfluxqlJsonResponse) HasResults() bool {
|
||||
if o != nil && o.Results != nil {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetResults gets a reference to the given []InfluxqlJsonResponseResults and assigns it to the Results field.
|
||||
func (o *InfluxqlJsonResponse) SetResults(v []InfluxqlJsonResponseResults) {
|
||||
o.Results = &v
|
||||
}
|
||||
|
||||
func (o InfluxqlJsonResponse) MarshalJSON() ([]byte, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if o.Results != nil {
|
||||
toSerialize["results"] = o.Results
|
||||
}
|
||||
return json.Marshal(toSerialize)
|
||||
}
|
||||
|
||||
type NullableInfluxqlJsonResponse struct {
|
||||
value *InfluxqlJsonResponse
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableInfluxqlJsonResponse) Get() *InfluxqlJsonResponse {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableInfluxqlJsonResponse) Set(val *InfluxqlJsonResponse) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableInfluxqlJsonResponse) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableInfluxqlJsonResponse) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableInfluxqlJsonResponse(val *InfluxqlJsonResponse) *NullableInfluxqlJsonResponse {
|
||||
return &NullableInfluxqlJsonResponse{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableInfluxqlJsonResponse) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableInfluxqlJsonResponse) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
Reference in New Issue
Block a user