public

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2020 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const ShakeSearchOKCode int = 200

ShakeSearchOKCode is the HTTP code returned for type ShakeSearchOK

View Source
const ShakeWorksOKCode int = 200

ShakeWorksOKCode is the HTTP code returned for type ShakeWorksOK

Variables

This section is empty.

Functions

This section is empty.

Types

type ShakeSearch

type ShakeSearch struct {
	Context *middleware.Context
	Handler ShakeSearchHandler
}

ShakeSearch swagger:route GET /api/search public shakeSearch

Fuzzy search for a string of text in Shakespeare's works.

The string will be used in conjunction with [this project](https://github.com/sahilm/fuzzy) to perform a fuzzy search on Shakespeare's works.

func NewShakeSearch

func NewShakeSearch(ctx *middleware.Context, handler ShakeSearchHandler) *ShakeSearch

NewShakeSearch creates a new http.Handler for the shake search operation

func (*ShakeSearch) ServeHTTP

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

type ShakeSearchDefault

type ShakeSearchDefault struct {

	/*
	  In: Body
	*/
	Payload *models.Error `json:"body,omitempty"`
	// contains filtered or unexported fields
}

ShakeSearchDefault Unexpected error.

swagger:response shakeSearchDefault

func NewShakeSearchDefault

func NewShakeSearchDefault(code int) *ShakeSearchDefault

NewShakeSearchDefault creates ShakeSearchDefault with default headers values

func (*ShakeSearchDefault) SetPayload

func (o *ShakeSearchDefault) SetPayload(payload *models.Error)

SetPayload sets the payload to the shake search default response

func (*ShakeSearchDefault) SetStatusCode

func (o *ShakeSearchDefault) SetStatusCode(code int)

SetStatusCode sets the status to the shake search default response

func (*ShakeSearchDefault) WithPayload

func (o *ShakeSearchDefault) WithPayload(payload *models.Error) *ShakeSearchDefault

WithPayload adds the payload to the shake search default response

func (*ShakeSearchDefault) WithStatusCode

func (o *ShakeSearchDefault) WithStatusCode(code int) *ShakeSearchDefault

WithStatusCode adds the status to the shake search default response

func (*ShakeSearchDefault) WriteResponse

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

WriteResponse to the client

type ShakeSearchHandler

type ShakeSearchHandler interface {
	Handle(ShakeSearchParams) middleware.Responder
}

ShakeSearchHandler interface for that can handle valid shake search params

type ShakeSearchHandlerFunc

type ShakeSearchHandlerFunc func(ShakeSearchParams) middleware.Responder

ShakeSearchHandlerFunc turns a function with the right signature into a shake search handler

func (ShakeSearchHandlerFunc) Handle

Handle executing the request and returning a response

type ShakeSearchOK

type ShakeSearchOK struct {

	/*
	  In: Body
	*/
	Payload []*models.Result `json:"body,omitempty"`
}

ShakeSearchOK A sorted array of results that are lines that match the given query.

swagger:response shakeSearchOK

func NewShakeSearchOK

func NewShakeSearchOK() *ShakeSearchOK

NewShakeSearchOK creates ShakeSearchOK with default headers values

func (*ShakeSearchOK) SetPayload

func (o *ShakeSearchOK) SetPayload(payload []*models.Result)

SetPayload sets the payload to the shake search o k response

func (*ShakeSearchOK) WithPayload

func (o *ShakeSearchOK) WithPayload(payload []*models.Result) *ShakeSearchOK

WithPayload adds the payload to the shake search o k response

func (*ShakeSearchOK) WriteResponse

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

WriteResponse to the client

type ShakeSearchParams

type ShakeSearchParams struct {

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

	/*The maximum number of results to return.
	  In: query
	  Default: 20
	*/
	MaxResults *int64
	/*The search query.
	  Required: true
	  In: query
	*/
	Q string
}

ShakeSearchParams contains all the bound params for the shake search operation typically these are obtained from a http.Request

swagger:parameters shakeSearch

func NewShakeSearchParams

func NewShakeSearchParams() ShakeSearchParams

NewShakeSearchParams creates a new ShakeSearchParams object with the default values initialized.

func (*ShakeSearchParams) BindRequest

func (o *ShakeSearchParams) 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 NewShakeSearchParams() beforehand.

type ShakeSearchURL

type ShakeSearchURL struct {
	MaxResults *int64
	Q          string
	// contains filtered or unexported fields
}

ShakeSearchURL generates an URL for the shake search operation

func (*ShakeSearchURL) Build

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

Build a url path and query string

func (*ShakeSearchURL) BuildFull

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

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

func (*ShakeSearchURL) Must

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

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

func (*ShakeSearchURL) SetBasePath

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

func (o *ShakeSearchURL) String() string

String returns the string representation of the path with query string

func (*ShakeSearchURL) StringFull

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

StringFull returns the string representation of a complete url

func (*ShakeSearchURL) WithBasePath

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

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

type ShakeWorks added in v0.2.0

type ShakeWorks struct {
	Context *middleware.Context
	Handler ShakeWorksHandler
}

ShakeWorks swagger:route GET /api/works public shakeWorks

Retrieve an HTML document that contains a snippet of Shakespeare's complete works centered around a line number.

The given line number of Shakespeare's complete works will be surrounded by its lines in the complete works up to maxLines. It will be returned as an HTML document.

func NewShakeWorks added in v0.2.0

func NewShakeWorks(ctx *middleware.Context, handler ShakeWorksHandler) *ShakeWorks

NewShakeWorks creates a new http.Handler for the shake works operation

func (*ShakeWorks) ServeHTTP added in v0.2.0

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

type ShakeWorksDefault added in v0.2.0

type ShakeWorksDefault struct {

	/*
	  In: Body
	*/
	Payload *models.Error `json:"body,omitempty"`
	// contains filtered or unexported fields
}

ShakeWorksDefault Unexpected error.

swagger:response shakeWorksDefault

func NewShakeWorksDefault added in v0.2.0

func NewShakeWorksDefault(code int) *ShakeWorksDefault

NewShakeWorksDefault creates ShakeWorksDefault with default headers values

func (*ShakeWorksDefault) SetPayload added in v0.2.0

func (o *ShakeWorksDefault) SetPayload(payload *models.Error)

SetPayload sets the payload to the shake works default response

func (*ShakeWorksDefault) SetStatusCode added in v0.2.0

func (o *ShakeWorksDefault) SetStatusCode(code int)

SetStatusCode sets the status to the shake works default response

func (*ShakeWorksDefault) WithPayload added in v0.2.0

func (o *ShakeWorksDefault) WithPayload(payload *models.Error) *ShakeWorksDefault

WithPayload adds the payload to the shake works default response

func (*ShakeWorksDefault) WithStatusCode added in v0.2.0

func (o *ShakeWorksDefault) WithStatusCode(code int) *ShakeWorksDefault

WithStatusCode adds the status to the shake works default response

func (*ShakeWorksDefault) WriteResponse added in v0.2.0

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

WriteResponse to the client

type ShakeWorksHandler added in v0.2.0

type ShakeWorksHandler interface {
	Handle(ShakeWorksParams) middleware.Responder
}

ShakeWorksHandler interface for that can handle valid shake works params

type ShakeWorksHandlerFunc added in v0.2.0

type ShakeWorksHandlerFunc func(ShakeWorksParams) middleware.Responder

ShakeWorksHandlerFunc turns a function with the right signature into a shake works handler

func (ShakeWorksHandlerFunc) Handle added in v0.2.0

Handle executing the request and returning a response

type ShakeWorksOK added in v0.2.0

type ShakeWorksOK struct {

	/*
	  In: Body
	*/
	Payload io.ReadCloser `json:"body,omitempty"`
}

ShakeWorksOK The HTML document containing a snippet of Shakespeare's complete works.

swagger:response shakeWorksOK

func NewShakeWorksOK added in v0.2.0

func NewShakeWorksOK() *ShakeWorksOK

NewShakeWorksOK creates ShakeWorksOK with default headers values

func (*ShakeWorksOK) SetPayload added in v0.2.0

func (o *ShakeWorksOK) SetPayload(payload io.ReadCloser)

SetPayload sets the payload to the shake works o k response

func (*ShakeWorksOK) WithPayload added in v0.2.0

func (o *ShakeWorksOK) WithPayload(payload io.ReadCloser) *ShakeWorksOK

WithPayload adds the payload to the shake works o k response

func (*ShakeWorksOK) WriteResponse added in v0.2.0

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

WriteResponse to the client

type ShakeWorksParams added in v0.2.0

type ShakeWorksParams struct {

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

	/*The line number to fetch & focus.
	  Required: true
	  In: query
	*/
	Line int64
	/*The maximum number of lines to return. Half before, half after.
	  In: query
	  Default: 1000
	*/
	MaxLines *int64
}

ShakeWorksParams contains all the bound params for the shake works operation typically these are obtained from a http.Request

swagger:parameters shakeWorks

func NewShakeWorksParams added in v0.2.0

func NewShakeWorksParams() ShakeWorksParams

NewShakeWorksParams creates a new ShakeWorksParams object with the default values initialized.

func (*ShakeWorksParams) BindRequest added in v0.2.0

func (o *ShakeWorksParams) 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 NewShakeWorksParams() beforehand.

type ShakeWorksURL added in v0.2.0

type ShakeWorksURL struct {
	Line     int64
	MaxLines *int64
	// contains filtered or unexported fields
}

ShakeWorksURL generates an URL for the shake works operation

func (*ShakeWorksURL) Build added in v0.2.0

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

Build a url path and query string

func (*ShakeWorksURL) BuildFull added in v0.2.0

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

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

func (*ShakeWorksURL) Must added in v0.2.0

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

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

func (*ShakeWorksURL) SetBasePath added in v0.2.0

func (o *ShakeWorksURL) 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 (*ShakeWorksURL) String added in v0.2.0

func (o *ShakeWorksURL) String() string

String returns the string representation of the path with query string

func (*ShakeWorksURL) StringFull added in v0.2.0

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

StringFull returns the string representation of a complete url

func (*ShakeWorksURL) WithBasePath added in v0.2.0

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

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