initial commit
This commit is contained in:
commit
88c14b627e
224 files changed
+17204
No files matched your search
@@ -0,0 +1,120 @@
|
||||
// Code generated by ogen, DO NOT EDIT.
|
||||
|
||||
package api
|
||||
|
||||
import (
|
||||
"github.com/go-faster/errors"
|
||||
)
|
||||
|
||||
type GetMLReadyzOK MLReadinessResponse
|
||||
|
||||
func (*GetMLReadyzOK) getMLReadyzRes() {}
|
||||
|
||||
type GetMLReadyzServiceUnavailable MLReadinessResponse
|
||||
|
||||
func (*GetMLReadyzServiceUnavailable) getMLReadyzRes() {}
|
||||
|
||||
// Ref: #/components/schemas/MLHealthResponse
|
||||
type MLHealthResponse struct {
|
||||
Status MLHealthResponseStatus `json:"status"`
|
||||
}
|
||||
|
||||
// GetStatus returns the value of Status.
|
||||
func (s *MLHealthResponse) GetStatus() MLHealthResponseStatus {
|
||||
return s.Status
|
||||
}
|
||||
|
||||
// SetStatus sets the value of Status.
|
||||
func (s *MLHealthResponse) SetStatus(val MLHealthResponseStatus) {
|
||||
s.Status = val
|
||||
}
|
||||
|
||||
type MLHealthResponseStatus string
|
||||
|
||||
const (
|
||||
MLHealthResponseStatusOk MLHealthResponseStatus = "ok"
|
||||
)
|
||||
|
||||
// AllValues returns all MLHealthResponseStatus values.
|
||||
func (MLHealthResponseStatus) AllValues() []MLHealthResponseStatus {
|
||||
return []MLHealthResponseStatus{
|
||||
MLHealthResponseStatusOk,
|
||||
}
|
||||
}
|
||||
|
||||
// MarshalText implements encoding.TextMarshaler.
|
||||
func (s MLHealthResponseStatus) MarshalText() ([]byte, error) {
|
||||
switch s {
|
||||
case MLHealthResponseStatusOk:
|
||||
return []byte(s), nil
|
||||
default:
|
||||
return nil, errors.Errorf("invalid value: %q", s)
|
||||
}
|
||||
}
|
||||
|
||||
// UnmarshalText implements encoding.TextUnmarshaler.
|
||||
func (s *MLHealthResponseStatus) UnmarshalText(data []byte) error {
|
||||
switch MLHealthResponseStatus(data) {
|
||||
case MLHealthResponseStatusOk:
|
||||
*s = MLHealthResponseStatusOk
|
||||
return nil
|
||||
default:
|
||||
return errors.Errorf("invalid value: %q", data)
|
||||
}
|
||||
}
|
||||
|
||||
// Ref: #/components/schemas/MLReadinessResponse
|
||||
type MLReadinessResponse struct {
|
||||
Status MLReadinessResponseStatus `json:"status"`
|
||||
}
|
||||
|
||||
// GetStatus returns the value of Status.
|
||||
func (s *MLReadinessResponse) GetStatus() MLReadinessResponseStatus {
|
||||
return s.Status
|
||||
}
|
||||
|
||||
// SetStatus sets the value of Status.
|
||||
func (s *MLReadinessResponse) SetStatus(val MLReadinessResponseStatus) {
|
||||
s.Status = val
|
||||
}
|
||||
|
||||
type MLReadinessResponseStatus string
|
||||
|
||||
const (
|
||||
MLReadinessResponseStatusReady MLReadinessResponseStatus = "ready"
|
||||
MLReadinessResponseStatusNotReady MLReadinessResponseStatus = "not_ready"
|
||||
)
|
||||
|
||||
// AllValues returns all MLReadinessResponseStatus values.
|
||||
func (MLReadinessResponseStatus) AllValues() []MLReadinessResponseStatus {
|
||||
return []MLReadinessResponseStatus{
|
||||
MLReadinessResponseStatusReady,
|
||||
MLReadinessResponseStatusNotReady,
|
||||
}
|
||||
}
|
||||
|
||||
// MarshalText implements encoding.TextMarshaler.
|
||||
func (s MLReadinessResponseStatus) MarshalText() ([]byte, error) {
|
||||
switch s {
|
||||
case MLReadinessResponseStatusReady:
|
||||
return []byte(s), nil
|
||||
case MLReadinessResponseStatusNotReady:
|
||||
return []byte(s), nil
|
||||
default:
|
||||
return nil, errors.Errorf("invalid value: %q", s)
|
||||
}
|
||||
}
|
||||
|
||||
// UnmarshalText implements encoding.TextUnmarshaler.
|
||||
func (s *MLReadinessResponseStatus) UnmarshalText(data []byte) error {
|
||||
switch MLReadinessResponseStatus(data) {
|
||||
case MLReadinessResponseStatusReady:
|
||||
*s = MLReadinessResponseStatusReady
|
||||
return nil
|
||||
case MLReadinessResponseStatusNotReady:
|
||||
*s = MLReadinessResponseStatusNotReady
|
||||
return nil
|
||||
default:
|
||||
return errors.Errorf("invalid value: %q", data)
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user