webhook

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: Feb 11, 2023 License: AGPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const AddResultBadRequestCode int = 400

AddResultBadRequestCode is the HTTP code returned for type AddResultBadRequest

View Source
const AddResultCreatedCode int = 201

AddResultCreatedCode is the HTTP code returned for type AddResultCreated

View Source
const AddResultInternalServerErrorCode int = 500

AddResultInternalServerErrorCode is the HTTP code returned for type AddResultInternalServerError

Variables

This section is empty.

Functions

This section is empty.

Types

type AddResult

type AddResult struct {
	Context *middleware.Context
	Handler AddResultHandler
}
AddResult swagger:route POST /v1/_webhooks/results webhook addResult

ACRCloud results callback

This hook is called by the ACRCloud service when it knows what song we weere playing.

func NewAddResult

func NewAddResult(ctx *middleware.Context, handler AddResultHandler) *AddResult

NewAddResult creates a new http.Handler for the add result operation

func (*AddResult) ServeHTTP

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

type AddResultBadRequest

type AddResultBadRequest struct {
}

AddResultBadRequest Bad Request

swagger:response addResultBadRequest

func NewAddResultBadRequest

func NewAddResultBadRequest() *AddResultBadRequest

NewAddResultBadRequest creates AddResultBadRequest with default headers values

func (*AddResultBadRequest) WriteResponse

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

WriteResponse to the client

type AddResultCreated

type AddResultCreated struct {
}

AddResultCreated Created

swagger:response addResultCreated

func NewAddResultCreated

func NewAddResultCreated() *AddResultCreated

NewAddResultCreated creates AddResultCreated with default headers values

func (*AddResultCreated) WriteResponse

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

WriteResponse to the client

type AddResultHandler

type AddResultHandler interface {
	Handle(AddResultParams, *models.Principal) middleware.Responder
}

AddResultHandler interface for that can handle valid add result params

type AddResultHandlerFunc

type AddResultHandlerFunc func(AddResultParams, *models.Principal) middleware.Responder

AddResultHandlerFunc turns a function with the right signature into a add result handler

func (AddResultHandlerFunc) Handle

Handle executing the request and returning a response

type AddResultInternalServerError

type AddResultInternalServerError struct {
}

AddResultInternalServerError Server Error

swagger:response addResultInternalServerError

func NewAddResultInternalServerError

func NewAddResultInternalServerError() *AddResultInternalServerError

NewAddResultInternalServerError creates AddResultInternalServerError with default headers values

func (*AddResultInternalServerError) WriteResponse

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

WriteResponse to the client

type AddResultParams

type AddResultParams struct {

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

	/*
	  In: header
	*/
	XRequestID *string
	/*ACRCloud results entry
	  Required: true
	  In: body
	*/
	Body *models.Webhook
}

AddResultParams contains all the bound params for the add result operation typically these are obtained from a http.Request

swagger:parameters addResult

func NewAddResultParams

func NewAddResultParams() AddResultParams

NewAddResultParams creates a new AddResultParams object

There are no default values defined in the spec.

func (*AddResultParams) BindRequest

func (o *AddResultParams) 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 NewAddResultParams() beforehand.

type AddResultURL

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

AddResultURL generates an URL for the add result operation

func (*AddResultURL) Build

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

Build a url path and query string

func (*AddResultURL) BuildFull

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

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

func (*AddResultURL) Must

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

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

func (*AddResultURL) SetBasePath

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

func (o *AddResultURL) String() string

String returns the string representation of the path with query string

func (*AddResultURL) StringFull

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

StringFull returns the string representation of a complete url

func (*AddResultURL) WithBasePath

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

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