chatswaggeropenapi

package
v0.0.0-...-1fccb44 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2021 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

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

Code generated by github.com/deepmap/oapi-codegen version v1.9.0 DO NOT EDIT.

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

Code generated by github.com/deepmap/oapi-codegen version v1.9.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 chi.Router) http.Handler

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

func HandlerFromMuxWithBaseURL

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

func HandlerWithOptions

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

HandlerWithOptions creates http.Handler with additional options

Types

type ChiServerOptions

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

type CreateUserJSONBody

type CreateUserJSONBody CreateUserRequest

CreateUserJSONBody defines parameters for CreateUser.

type CreateUserJSONRequestBody

type CreateUserJSONRequestBody CreateUserJSONBody

CreateUserJSONRequestBody defines body for CreateUser for application/json ContentType.

type CreateUserRequest

type CreateUserRequest struct {
	Password string `json:"password"`
	UserName string `json:"userName"`
}

CreateUserRequest defines model for CreateUserRequest.

type CreateUserResponse

type CreateUserResponse struct {
	Id       *string `json:"id,omitempty"`
	UserName *string `json:"userName,omitempty"`
}

CreateUserResponse defines model for CreateUserResponse.

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 LoginUserJSONBody

type LoginUserJSONBody LoginUserRequest

LoginUserJSONBody defines parameters for LoginUser.

type LoginUserJSONRequestBody

type LoginUserJSONRequestBody LoginUserJSONBody

LoginUserJSONRequestBody defines body for LoginUser for application/json ContentType.

type LoginUserRequest

type LoginUserRequest struct {
	// The password for login in clear text
	Password string `json:"password"`

	// The user name for login
	UserName string `json:"userName"`
}

LoginUserRequest defines model for LoginUserRequest.

type LoginUserResonse

type LoginUserResonse struct {
	// A url for websoket API with a one-time token for starting chat
	Url string `json:"url"`
}

LoginUserResonse defines model for LoginUserResonse.

type MiddlewareFunc

type MiddlewareFunc func(http.HandlerFunc) http.HandlerFunc

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 ServerInterface

type ServerInterface interface {
	// Register (create) user
	// (POST /user)
	CreateUser(w http.ResponseWriter, r *http.Request)
	// Logs user into the system
	// (POST /user/login)
	LoginUser(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) CreateUser

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

CreateUser operation middleware

func (*ServerInterfaceWrapper) LoginUser

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

LoginUser 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