feat: invokable scripts (#387)
* basic list, create, and invoke working * all commands working * added support for create script body from file and invoke params from file * linter cleanup * update defaults to existing parameters if not provided * updated generated mock files, added mock files for scripts, added basic script create test * added mock script list * cleanup pass, fixed not using params in list call * added update mock test * fixed mock tests requiring go 1.18 * updated openapi, integrated overrides upstream, added new override to fix codegen bug * added nil check * fixed routes
This commit is contained in:
86
api/model_script_language.gen.go
Normal file
86
api/model_script_language.gen.go
Normal file
@ -0,0 +1,86 @@
|
||||
/*
|
||||
* 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"
|
||||
"fmt"
|
||||
)
|
||||
|
||||
// ScriptLanguage the model 'ScriptLanguage'
|
||||
type ScriptLanguage string
|
||||
|
||||
// List of ScriptLanguage
|
||||
const (
|
||||
SCRIPTLANGUAGE_FLUX ScriptLanguage = "flux"
|
||||
)
|
||||
|
||||
func ScriptLanguageValues() []ScriptLanguage {
|
||||
return []ScriptLanguage{"flux"}
|
||||
}
|
||||
|
||||
func (v *ScriptLanguage) UnmarshalJSON(src []byte) error {
|
||||
var value string
|
||||
err := json.Unmarshal(src, &value)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
enumTypeValue := ScriptLanguage(value)
|
||||
for _, existing := range []ScriptLanguage{"flux"} {
|
||||
if existing == enumTypeValue {
|
||||
*v = enumTypeValue
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
return fmt.Errorf("%+v is not a valid ScriptLanguage", value)
|
||||
}
|
||||
|
||||
// Ptr returns reference to ScriptLanguage value
|
||||
func (v ScriptLanguage) Ptr() *ScriptLanguage {
|
||||
return &v
|
||||
}
|
||||
|
||||
type NullableScriptLanguage struct {
|
||||
value *ScriptLanguage
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableScriptLanguage) Get() *ScriptLanguage {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableScriptLanguage) Set(val *ScriptLanguage) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableScriptLanguage) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableScriptLanguage) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableScriptLanguage(val *ScriptLanguage) *NullableScriptLanguage {
|
||||
return &NullableScriptLanguage{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableScriptLanguage) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableScriptLanguage) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
Reference in New Issue
Block a user