mirror of
https://github.com/openziti/zrok.git
synced 2025-02-15 09:50:00 +01:00
59 lines
1.4 KiB
Go
59 lines
1.4 KiB
Go
|
// Code generated by go-swagger; DO NOT EDIT.
|
||
|
|
||
|
package tunnel
|
||
|
|
||
|
// 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/openziti-test-kitchen/zrok/rest_model_zrok"
|
||
|
)
|
||
|
|
||
|
// TunnelCreatedCode is the HTTP code returned for type TunnelCreated
|
||
|
const TunnelCreatedCode int = 201
|
||
|
|
||
|
/*TunnelCreated tunnel created
|
||
|
|
||
|
swagger:response tunnelCreated
|
||
|
*/
|
||
|
type TunnelCreated struct {
|
||
|
|
||
|
/*
|
||
|
In: Body
|
||
|
*/
|
||
|
Payload *rest_model_zrok.TunnelResponse `json:"body,omitempty"`
|
||
|
}
|
||
|
|
||
|
// NewTunnelCreated creates TunnelCreated with default headers values
|
||
|
func NewTunnelCreated() *TunnelCreated {
|
||
|
|
||
|
return &TunnelCreated{}
|
||
|
}
|
||
|
|
||
|
// WithPayload adds the payload to the tunnel created response
|
||
|
func (o *TunnelCreated) WithPayload(payload *rest_model_zrok.TunnelResponse) *TunnelCreated {
|
||
|
o.Payload = payload
|
||
|
return o
|
||
|
}
|
||
|
|
||
|
// SetPayload sets the payload to the tunnel created response
|
||
|
func (o *TunnelCreated) SetPayload(payload *rest_model_zrok.TunnelResponse) {
|
||
|
o.Payload = payload
|
||
|
}
|
||
|
|
||
|
// WriteResponse to the client
|
||
|
func (o *TunnelCreated) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
|
||
|
|
||
|
rw.WriteHeader(201)
|
||
|
if o.Payload != nil {
|
||
|
payload := o.Payload
|
||
|
if err := producer.Produce(rw, payload); err != nil {
|
||
|
panic(err) // let the recovery middleware deal with this
|
||
|
}
|
||
|
}
|
||
|
}
|