write

package
v0.0.0-...-33bd477 Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Overview

Package write provides primitives to interact with the openapi HTTP API.

Code generated by github.com/deepmap/oapi-codegen/v2 version v2.1.0 DO NOT EDIT.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Handler

func Handler(si ServerInterface) http.Handler

Handler creates http.Handler with routing matching OpenAPI spec.

func HandlerFromMux

func HandlerFromMux(si ServerInterface, r *mux.Router) http.Handler

HandlerFromMux creates http.Handler with routing matching OpenAPI spec based on the provided mux.

func HandlerFromMuxWithBaseURL

func HandlerFromMuxWithBaseURL(si ServerInterface, r *mux.Router, baseURL string) http.Handler

func HandlerWithOptions

func HandlerWithOptions(si ServerInterface, options GorillaServerOptions) http.Handler

HandlerWithOptions creates http.Handler with additional options

Types

type ApiResponse

type ApiResponse = externalRef0.ApiResponse

ApiResponse defines model for ApiResponse.

type GorillaServerOptions

type GorillaServerOptions struct {
	BaseURL          string
	BaseRouter       *mux.Router
	Middlewares      []MiddlewareFunc
	ErrorHandlerFunc func(w http.ResponseWriter, r *http.Request, err error)
}

type InvalidParamFormatError

type InvalidParamFormatError struct {
	ParamName string
	Err       error
}

func (*InvalidParamFormatError) Error

func (e *InvalidParamFormatError) Error() string

func (*InvalidParamFormatError) Unwrap

func (e *InvalidParamFormatError) Unwrap() error

type MiddlewareFunc

type MiddlewareFunc func(http.Handler) http.Handler

type PostRecordJSONRequestBody

type PostRecordJSONRequestBody = RecordRequest

PostRecordJSONRequestBody defines body for PostRecord for application/json ContentType.

type PostSelectionJSONRequestBody

type PostSelectionJSONRequestBody = SelectionRequest

PostSelectionJSONRequestBody defines body for PostSelection for application/json ContentType.

type RecordRequest

type RecordRequest = externalRef0.RecordRequest

RecordRequest defines model for RecordRequest.

type RequiredHeaderError

type RequiredHeaderError struct {
	ParamName string
	Err       error
}

func (*RequiredHeaderError) Error

func (e *RequiredHeaderError) Error() string

func (*RequiredHeaderError) Unwrap

func (e *RequiredHeaderError) Unwrap() error

type RequiredParamError

type RequiredParamError struct {
	ParamName string
}

func (*RequiredParamError) Error

func (e *RequiredParamError) Error() string

type Router

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

func NewRouter

func NewRouter() *Router

type SelectionRequest

type SelectionRequest = externalRef0.SelectionRequest

SelectionRequest defines model for SelectionRequest.

type Server

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

Server struct

func NewServer

func NewServer() Server

func (*Server) Configure

func (srv *Server) Configure()

func (*Server) GetHealth

func (srv *Server) GetHealth(w http.ResponseWriter, r *http.Request)

func (*Server) ListenAndServe

func (srv *Server) ListenAndServe() error

func (*Server) PostRecord

func (srv *Server) PostRecord(w http.ResponseWriter, r *http.Request)

func (*Server) PostSelection

func (srv *Server) PostSelection(w http.ResponseWriter, r *http.Request)

func (*Server) Shutdown

func (srv *Server) Shutdown(ctx context.Context) error

type ServerInterface

type ServerInterface interface {
	// Health check endpoint
	// (GET /health)
	GetHealth(w http.ResponseWriter, r *http.Request)

	// (POST /record)
	PostRecord(w http.ResponseWriter, r *http.Request)

	// (POST /selection)
	PostSelection(w http.ResponseWriter, r *http.Request)
}

ServerInterface represents all server handlers.

type ServerInterfaceWrapper

type ServerInterfaceWrapper struct {
	Handler            ServerInterface
	HandlerMiddlewares []MiddlewareFunc
	ErrorHandlerFunc   func(w http.ResponseWriter, r *http.Request, err error)
}

ServerInterfaceWrapper converts contexts to parameters.

func (*ServerInterfaceWrapper) GetHealth

func (siw *ServerInterfaceWrapper) GetHealth(w http.ResponseWriter, r *http.Request)

GetHealth operation middleware

func (*ServerInterfaceWrapper) PostRecord

func (siw *ServerInterfaceWrapper) PostRecord(w http.ResponseWriter, r *http.Request)

PostRecord operation middleware

func (*ServerInterfaceWrapper) PostSelection

func (siw *ServerInterfaceWrapper) PostSelection(w http.ResponseWriter, r *http.Request)

PostSelection operation middleware

type TooManyValuesForParamError

type TooManyValuesForParamError struct {
	ParamName string
	Count     int
}

func (*TooManyValuesForParamError) Error

type UnescapedCookieParamError

type UnescapedCookieParamError struct {
	ParamName string
	Err       error
}

func (*UnescapedCookieParamError) Error

func (e *UnescapedCookieParamError) Error() string

func (*UnescapedCookieParamError) Unwrap

func (e *UnescapedCookieParamError) Unwrap() error

type UnmarshalingParamError

type UnmarshalingParamError struct {
	ParamName string
	Err       error
}

func (*UnmarshalingParamError) Error

func (e *UnmarshalingParamError) Error() string

func (*UnmarshalingParamError) Unwrap

func (e *UnmarshalingParamError) Unwrap() error

Jump to

Keyboard shortcuts

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