refactor: expose generated code and client business logic to share with Kapacitor (#103)
* refactor: take clients out of internal * refactor: move stdio to pkg * Move internal/api to api * refactor: final changes for Kapacitor to access shared functionality * chore: regenerate mocks * fix: bad automated refactor * chore: extra formatting not caught by make fmt
This commit is contained in:
83
api/model_health_check_status.gen.go
Normal file
83
api/model_health_check_status.gen.go
Normal file
@ -0,0 +1,83 @@
|
||||
/*
|
||||
* 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"
|
||||
)
|
||||
|
||||
// HealthCheckStatus the model 'HealthCheckStatus'
|
||||
type HealthCheckStatus string
|
||||
|
||||
// List of HealthCheckStatus
|
||||
const (
|
||||
HEALTHCHECKSTATUS_PASS HealthCheckStatus = "pass"
|
||||
HEALTHCHECKSTATUS_FAIL HealthCheckStatus = "fail"
|
||||
)
|
||||
|
||||
func (v *HealthCheckStatus) UnmarshalJSON(src []byte) error {
|
||||
var value string
|
||||
err := json.Unmarshal(src, &value)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
enumTypeValue := HealthCheckStatus(value)
|
||||
for _, existing := range []HealthCheckStatus{"pass", "fail"} {
|
||||
if existing == enumTypeValue {
|
||||
*v = enumTypeValue
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
return fmt.Errorf("%+v is not a valid HealthCheckStatus", value)
|
||||
}
|
||||
|
||||
// Ptr returns reference to HealthCheckStatus value
|
||||
func (v HealthCheckStatus) Ptr() *HealthCheckStatus {
|
||||
return &v
|
||||
}
|
||||
|
||||
type NullableHealthCheckStatus struct {
|
||||
value *HealthCheckStatus
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableHealthCheckStatus) Get() *HealthCheckStatus {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableHealthCheckStatus) Set(val *HealthCheckStatus) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableHealthCheckStatus) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableHealthCheckStatus) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableHealthCheckStatus(val *HealthCheckStatus) *NullableHealthCheckStatus {
|
||||
return &NullableHealthCheckStatus{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableHealthCheckStatus) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableHealthCheckStatus) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
Reference in New Issue
Block a user