Documentation
¶
Index ¶
- Constants
- type StoryCreate
- type StoryCreateDefault
- func (o *StoryCreateDefault) SetPayload(payload *models.Error)
- func (o *StoryCreateDefault) SetStatusCode(code int)
- func (o *StoryCreateDefault) WithPayload(payload *models.Error) *StoryCreateDefault
- func (o *StoryCreateDefault) WithStatusCode(code int) *StoryCreateDefault
- func (o *StoryCreateDefault) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)
- type StoryCreateHandler
- type StoryCreateHandlerFunc
- type StoryCreateOK
- type StoryCreateParams
- type StoryCreateURL
- func (o *StoryCreateURL) Build() (*url.URL, error)
- func (o *StoryCreateURL) BuildFull(scheme, host string) (*url.URL, error)
- func (o *StoryCreateURL) Must(u *url.URL, err error) *url.URL
- func (o *StoryCreateURL) SetBasePath(bp string)
- func (o *StoryCreateURL) String() string
- func (o *StoryCreateURL) StringFull(scheme, host string) string
- func (o *StoryCreateURL) WithBasePath(bp string) *StoryCreateURL
Constants ¶
const StoryCreateOKCode int = 200
StoryCreateOKCode is the HTTP code returned for type StoryCreateOK
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type StoryCreate ¶
type StoryCreate struct {
Context *middleware.Context
Handler StoryCreateHandler
}
StoryCreate swagger:route POST /stories UserAPI storyCreate
Create new story
func NewStoryCreate ¶
func NewStoryCreate(ctx *middleware.Context, handler StoryCreateHandler) *StoryCreate
NewStoryCreate creates a new http.Handler for the story create operation
func (*StoryCreate) ServeHTTP ¶
func (o *StoryCreate) ServeHTTP(rw http.ResponseWriter, r *http.Request)
type StoryCreateDefault ¶
type StoryCreateDefault struct {
/*
In: Body
*/
Payload *models.Error `json:"body,omitempty"`
// contains filtered or unexported fields
}
StoryCreateDefault Generic error response.
swagger:response storyCreateDefault
func NewStoryCreateDefault ¶
func NewStoryCreateDefault(code int) *StoryCreateDefault
NewStoryCreateDefault creates StoryCreateDefault with default headers values
func (*StoryCreateDefault) SetPayload ¶
func (o *StoryCreateDefault) SetPayload(payload *models.Error)
SetPayload sets the payload to the story create default response
func (*StoryCreateDefault) SetStatusCode ¶
func (o *StoryCreateDefault) SetStatusCode(code int)
SetStatusCode sets the status to the story create default response
func (*StoryCreateDefault) WithPayload ¶
func (o *StoryCreateDefault) WithPayload(payload *models.Error) *StoryCreateDefault
WithPayload adds the payload to the story create default response
func (*StoryCreateDefault) WithStatusCode ¶
func (o *StoryCreateDefault) WithStatusCode(code int) *StoryCreateDefault
WithStatusCode adds the status to the story create default response
func (*StoryCreateDefault) WriteResponse ¶
func (o *StoryCreateDefault) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)
WriteResponse to the client
type StoryCreateHandler ¶
type StoryCreateHandler interface {
Handle(StoryCreateParams) middleware.Responder
}
StoryCreateHandler interface for that can handle valid story create params
type StoryCreateHandlerFunc ¶
type StoryCreateHandlerFunc func(StoryCreateParams) middleware.Responder
StoryCreateHandlerFunc turns a function with the right signature into a story create handler
func (StoryCreateHandlerFunc) Handle ¶
func (fn StoryCreateHandlerFunc) Handle(params StoryCreateParams) middleware.Responder
Handle executing the request and returning a response
type StoryCreateOK ¶
type StoryCreateOK struct {
}
StoryCreateOK A successful response.
swagger:response storyCreateOK
func NewStoryCreateOK ¶
func NewStoryCreateOK() *StoryCreateOK
NewStoryCreateOK creates StoryCreateOK with default headers values
func (*StoryCreateOK) WriteResponse ¶
func (o *StoryCreateOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)
WriteResponse to the client
type StoryCreateParams ¶
type StoryCreateParams struct {
// HTTP Request Object
HTTPRequest *http.Request `json:"-"`
/*
Required: true
In: body
*/
Body *models.Story
}
StoryCreateParams contains all the bound params for the story create operation typically these are obtained from a http.Request
swagger:parameters StoryCreate
func NewStoryCreateParams ¶
func NewStoryCreateParams() StoryCreateParams
NewStoryCreateParams creates a new StoryCreateParams object no default values defined in spec.
func (*StoryCreateParams) BindRequest ¶
func (o *StoryCreateParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error
BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface for simple values it will use straight method calls.
To ensure default values, the struct must have been initialized with NewStoryCreateParams() beforehand.
type StoryCreateURL ¶
type StoryCreateURL struct {
// contains filtered or unexported fields
}
StoryCreateURL generates an URL for the story create operation
func (*StoryCreateURL) Build ¶
func (o *StoryCreateURL) Build() (*url.URL, error)
Build a url path and query string
func (*StoryCreateURL) BuildFull ¶
func (o *StoryCreateURL) BuildFull(scheme, host string) (*url.URL, error)
BuildFull builds a full url with scheme, host, path and query string
func (*StoryCreateURL) Must ¶
Must is a helper function to panic when the url builder returns an error
func (*StoryCreateURL) SetBasePath ¶
func (o *StoryCreateURL) SetBasePath(bp string)
SetBasePath sets the base path for this url builder, only required when it's different from the base path specified in the swagger spec. When the value of the base path is an empty string
func (*StoryCreateURL) String ¶
func (o *StoryCreateURL) String() string
String returns the string representation of the path with query string
func (*StoryCreateURL) StringFull ¶
func (o *StoryCreateURL) StringFull(scheme, host string) string
StringFull returns the string representation of a complete url
func (*StoryCreateURL) WithBasePath ¶
func (o *StoryCreateURL) WithBasePath(bp string) *StoryCreateURL
WithBasePath sets the base path for this url builder, only required when it's different from the base path specified in the swagger spec. When the value of the base path is an empty string