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:
Andrew Lee
2022-06-10 08:54:07 -06:00
committed by GitHub
parent 51ca97ee29
commit fc529745a5
44 changed files with 2959 additions and 305 deletions

View File

@ -18,6 +18,8 @@ import (
type PostOrganizationRequest struct {
Name string `json:"name" yaml:"name"`
Description *string `json:"description,omitempty" yaml:"description,omitempty"`
// An optional list of email address's to be invited to the organization
Users *[]string `json:"users,omitempty" yaml:"users,omitempty"`
}
// NewPostOrganizationRequest instantiates a new PostOrganizationRequest object
@ -94,6 +96,38 @@ func (o *PostOrganizationRequest) SetDescription(v string) {
o.Description = &v
}
// GetUsers returns the Users field value if set, zero value otherwise.
func (o *PostOrganizationRequest) GetUsers() []string {
if o == nil || o.Users == nil {
var ret []string
return ret
}
return *o.Users
}
// GetUsersOk returns a tuple with the Users field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *PostOrganizationRequest) GetUsersOk() (*[]string, bool) {
if o == nil || o.Users == nil {
return nil, false
}
return o.Users, true
}
// HasUsers returns a boolean if a field has been set.
func (o *PostOrganizationRequest) HasUsers() bool {
if o != nil && o.Users != nil {
return true
}
return false
}
// SetUsers gets a reference to the given []string and assigns it to the Users field.
func (o *PostOrganizationRequest) SetUsers(v []string) {
o.Users = &v
}
func (o PostOrganizationRequest) MarshalJSON() ([]byte, error) {
toSerialize := map[string]interface{}{}
if true {
@ -102,6 +136,9 @@ func (o PostOrganizationRequest) MarshalJSON() ([]byte, error) {
if o.Description != nil {
toSerialize["description"] = o.Description
}
if o.Users != nil {
toSerialize["users"] = o.Users
}
return json.Marshal(toSerialize)
}