user_api

package
v0.0.0-...-a9c3a70 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 15, 2020 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
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

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

func (o *StoryCreateURL) Must(u *url.URL, err error) *url.URL

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL