news_api

package
v0.0.0-...-8e43be5 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2020 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const PostNewsQueryOKCode int = 200

PostNewsQueryOKCode is the HTTP code returned for type PostNewsQueryOK

Variables

This section is empty.

Functions

This section is empty.

Types

type PostNewsQuery

type PostNewsQuery struct {
	Context *middleware.Context
	Handler PostNewsQueryHandler
}

PostNewsQuery swagger:route POST /news/query News API postNewsQuery

Retrieves a news query

Retrieves a news query

func NewPostNewsQuery

func NewPostNewsQuery(ctx *middleware.Context, handler PostNewsQueryHandler) *PostNewsQuery

NewPostNewsQuery creates a new http.Handler for the post news query operation

func (*PostNewsQuery) ServeHTTP

func (o *PostNewsQuery) ServeHTTP(rw http.ResponseWriter, r *http.Request)

type PostNewsQueryHandler

type PostNewsQueryHandler interface {
	Handle(PostNewsQueryParams) middleware.Responder
}

PostNewsQueryHandler interface for that can handle valid post news query params

type PostNewsQueryHandlerFunc

type PostNewsQueryHandlerFunc func(PostNewsQueryParams) middleware.Responder

PostNewsQueryHandlerFunc turns a function with the right signature into a post news query handler

func (PostNewsQueryHandlerFunc) Handle

Handle executing the request and returning a response

type PostNewsQueryOK

type PostNewsQueryOK struct {

	/*
	  In: Body
	*/
	Payload *models.NewsResponse `json:"body,omitempty"`
}

PostNewsQueryOK Successful Query

swagger:response postNewsQueryOK

func NewPostNewsQueryOK

func NewPostNewsQueryOK() *PostNewsQueryOK

NewPostNewsQueryOK creates PostNewsQueryOK with default headers values

func (*PostNewsQueryOK) SetPayload

func (o *PostNewsQueryOK) SetPayload(payload *models.NewsResponse)

SetPayload sets the payload to the post news query o k response

func (*PostNewsQueryOK) WithPayload

func (o *PostNewsQueryOK) WithPayload(payload *models.NewsResponse) *PostNewsQueryOK

WithPayload adds the payload to the post news query o k response

func (*PostNewsQueryOK) WriteResponse

func (o *PostNewsQueryOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)

WriteResponse to the client

type PostNewsQueryParams

type PostNewsQueryParams struct {

	// HTTP Request Object
	HTTPRequest *http.Request `json:"-"`

	/*Request for news query
	  Required: true
	  In: body
	*/
	Body *models.NewsRequest
}

PostNewsQueryParams contains all the bound params for the post news query operation typically these are obtained from a http.Request

swagger:parameters PostNewsQuery

func NewPostNewsQueryParams

func NewPostNewsQueryParams() PostNewsQueryParams

NewPostNewsQueryParams creates a new PostNewsQueryParams object no default values defined in spec.

func (*PostNewsQueryParams) BindRequest

func (o *PostNewsQueryParams) 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 NewPostNewsQueryParams() beforehand.

type PostNewsQueryURL

type PostNewsQueryURL struct {
	// contains filtered or unexported fields
}

PostNewsQueryURL generates an URL for the post news query operation

func (*PostNewsQueryURL) Build

func (o *PostNewsQueryURL) Build() (*url.URL, error)

Build a url path and query string

func (*PostNewsQueryURL) BuildFull

func (o *PostNewsQueryURL) BuildFull(scheme, host string) (*url.URL, error)

BuildFull builds a full url with scheme, host, path and query string

func (*PostNewsQueryURL) Must

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

Must is a helper function to panic when the url builder returns an error

func (*PostNewsQueryURL) SetBasePath

func (o *PostNewsQueryURL) 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 (*PostNewsQueryURL) String

func (o *PostNewsQueryURL) String() string

String returns the string representation of the path with query string

func (*PostNewsQueryURL) StringFull

func (o *PostNewsQueryURL) StringFull(scheme, host string) string

StringFull returns the string representation of a complete url

func (*PostNewsQueryURL) WithBasePath

func (o *PostNewsQueryURL) WithBasePath(bp string) *PostNewsQueryURL

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