105 lines
2.6 KiB
Go
105 lines
2.6 KiB
Go
package operations
|
|
|
|
// This file was generated by the swagger tool.
|
|
// Editing this file might prove futile when you re-run the swagger generate command
|
|
|
|
import (
|
|
"net/http"
|
|
|
|
"github.com/go-openapi/runtime"
|
|
|
|
"github.com/influxdata/mrfusion/models"
|
|
)
|
|
|
|
/*GetDashboardsOK An array of dashboards
|
|
|
|
swagger:response getDashboardsOK
|
|
*/
|
|
type GetDashboardsOK struct {
|
|
|
|
// In: body
|
|
Payload *models.Dashboards `json:"body,omitempty"`
|
|
}
|
|
|
|
// NewGetDashboardsOK creates GetDashboardsOK with default headers values
|
|
func NewGetDashboardsOK() *GetDashboardsOK {
|
|
return &GetDashboardsOK{}
|
|
}
|
|
|
|
// WithPayload adds the payload to the get dashboards o k response
|
|
func (o *GetDashboardsOK) WithPayload(payload *models.Dashboards) *GetDashboardsOK {
|
|
o.Payload = payload
|
|
return o
|
|
}
|
|
|
|
// SetPayload sets the payload to the get dashboards o k response
|
|
func (o *GetDashboardsOK) SetPayload(payload *models.Dashboards) {
|
|
o.Payload = payload
|
|
}
|
|
|
|
// WriteResponse to the client
|
|
func (o *GetDashboardsOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
|
|
|
|
rw.WriteHeader(200)
|
|
if o.Payload != nil {
|
|
if err := producer.Produce(rw, o.Payload); err != nil {
|
|
panic(err) // let the recovery middleware deal with this
|
|
}
|
|
}
|
|
}
|
|
|
|
/*GetDashboardsDefault Unexpected internal service error
|
|
|
|
swagger:response getDashboardsDefault
|
|
*/
|
|
type GetDashboardsDefault struct {
|
|
_statusCode int
|
|
|
|
// In: body
|
|
Payload *models.Error `json:"body,omitempty"`
|
|
}
|
|
|
|
// NewGetDashboardsDefault creates GetDashboardsDefault with default headers values
|
|
func NewGetDashboardsDefault(code int) *GetDashboardsDefault {
|
|
if code <= 0 {
|
|
code = 500
|
|
}
|
|
|
|
return &GetDashboardsDefault{
|
|
_statusCode: code,
|
|
}
|
|
}
|
|
|
|
// WithStatusCode adds the status to the get dashboards default response
|
|
func (o *GetDashboardsDefault) WithStatusCode(code int) *GetDashboardsDefault {
|
|
o._statusCode = code
|
|
return o
|
|
}
|
|
|
|
// SetStatusCode sets the status to the get dashboards default response
|
|
func (o *GetDashboardsDefault) SetStatusCode(code int) {
|
|
o._statusCode = code
|
|
}
|
|
|
|
// WithPayload adds the payload to the get dashboards default response
|
|
func (o *GetDashboardsDefault) WithPayload(payload *models.Error) *GetDashboardsDefault {
|
|
o.Payload = payload
|
|
return o
|
|
}
|
|
|
|
// SetPayload sets the payload to the get dashboards default response
|
|
func (o *GetDashboardsDefault) SetPayload(payload *models.Error) {
|
|
o.Payload = payload
|
|
}
|
|
|
|
// WriteResponse to the client
|
|
func (o *GetDashboardsDefault) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
|
|
|
|
rw.WriteHeader(o._statusCode)
|
|
if o.Payload != nil {
|
|
if err := producer.Produce(rw, o.Payload); err != nil {
|
|
panic(err) // let the recovery middleware deal with this
|
|
}
|
|
}
|
|
}
|