Documentation ¶
Overview ¶
Package creditserver 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 creditserver 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 creditserver 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 ¶
- func GetSwagger() (swagger *openapi3.T, err error)
- func Handler(si ServerInterface) http.Handler
- func HandlerFromMux(si ServerInterface, r chi.Router) http.Handler
- func HandlerFromMuxWithBaseURL(si ServerInterface, r chi.Router, baseURL string) http.Handler
- func HandlerWithOptions(si ServerInterface, options ChiServerOptions) http.Handler
- func PathToRawSpec(pathToFile string) map[string]func() ([]byte, error)
- type ChiServerOptions
- type CreateJSONBody
- type CreateJSONRequestBody
- type InvalidParamFormatError
- type MiddlewareFunc
- type RequiredHeaderError
- type RequiredParamError
- type RestCreateCreditPayment
- type RestCreditPayment
- type RestUpdateCreditPayment
- type ServerInterface
- type ServerInterfaceWrapper
- func (siw *ServerInterfaceWrapper) Create(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) Delete(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) GetByAcceptNo(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) Healthz(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) Update(w http.ResponseWriter, r *http.Request)
- type TooManyValuesForParamError
- type UnescapedCookieParamError
- type UnmarshalingParamError
- type UpdateJSONBody
- type UpdateJSONRequestBody
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetSwagger ¶
GetSwagger returns the Swagger specification corresponding to the generated code in this file. The external references of Swagger specification are resolved. The logic of resolving external references is tightly connected to "import-mapping" feature. Externally referenced files must be embedded in the corresponding golang packages. Urls can be supported but this task was out of the scope.
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 CreateJSONBody ¶
type CreateJSONBody RestCreateCreditPayment
CreateJSONBody defines parameters for Create.
type CreateJSONRequestBody ¶
type CreateJSONRequestBody CreateJSONBody
CreateJSONRequestBody defines body for Create for application/json ContentType.
type InvalidParamFormatError ¶
func (*InvalidParamFormatError) Error ¶
func (e *InvalidParamFormatError) Error() string
func (*InvalidParamFormatError) Unwrap ¶
func (e *InvalidParamFormatError) Unwrap() error
type MiddlewareFunc ¶
type MiddlewareFunc func(http.HandlerFunc) http.HandlerFunc
type RequiredHeaderError ¶
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 RestCreateCreditPayment ¶
type RestCreateCreditPayment struct { CustomerId int32 `json:"customerId"` OrderDate string `json:"orderDate"` OrderNo string `json:"orderNo"` TotalPrice int32 `json:"totalPrice"` }
RestCreateCreditPayment defines model for RestCreateCreditPayment.
type RestCreditPayment ¶
type RestCreditPayment struct { AcceptDate *string `json:"acceptDate,omitempty"` AcceptNo *string `json:"acceptNo,omitempty"` CustomerId *int32 `json:"customerId,omitempty"` OrderDate *string `json:"orderDate,omitempty"` OrderNo *string `json:"orderNo,omitempty"` TotalPrice *int32 `json:"totalPrice,omitempty"` }
RestCreditPayment defines model for RestCreditPayment.
type RestUpdateCreditPayment ¶
type RestUpdateCreditPayment struct { AcceptDate *string `json:"acceptDate,omitempty"` AcceptNo string `json:"acceptNo"` CustomerId *int32 `json:"customerId,omitempty"` OrderDate *string `json:"orderDate,omitempty"` OrderNo *string `json:"orderNo,omitempty"` TotalPrice *int32 `json:"totalPrice,omitempty"` }
RestUpdateCreditPayment defines model for RestUpdateCreditPayment.
type ServerInterface ¶
type ServerInterface interface { // Create Credit // (POST /credit) Create(w http.ResponseWriter, r *http.Request) // Update Credit // (PUT /credit) Update(w http.ResponseWriter, r *http.Request) // Delete credit by acceptNo // (DELETE /credit/{acceptNo}) Delete(w http.ResponseWriter, r *http.Request, acceptNo string) // Get credit by accpetNo // (GET /credit/{acceptNo}) GetByAcceptNo(w http.ResponseWriter, r *http.Request, acceptNo string) // Credit Service Health Check // (GET /healthz) Healthz(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) Create ¶
func (siw *ServerInterfaceWrapper) Create(w http.ResponseWriter, r *http.Request)
Create operation middleware
func (*ServerInterfaceWrapper) Delete ¶
func (siw *ServerInterfaceWrapper) Delete(w http.ResponseWriter, r *http.Request)
Delete operation middleware
func (*ServerInterfaceWrapper) GetByAcceptNo ¶
func (siw *ServerInterfaceWrapper) GetByAcceptNo(w http.ResponseWriter, r *http.Request)
GetByAcceptNo operation middleware
func (*ServerInterfaceWrapper) Healthz ¶
func (siw *ServerInterfaceWrapper) Healthz(w http.ResponseWriter, r *http.Request)
Healthz operation middleware
func (*ServerInterfaceWrapper) Update ¶
func (siw *ServerInterfaceWrapper) Update(w http.ResponseWriter, r *http.Request)
Update operation middleware
type TooManyValuesForParamError ¶
func (*TooManyValuesForParamError) Error ¶
func (e *TooManyValuesForParamError) Error() string
type UnescapedCookieParamError ¶
func (*UnescapedCookieParamError) Error ¶
func (e *UnescapedCookieParamError) Error() string
func (*UnescapedCookieParamError) Unwrap ¶
func (e *UnescapedCookieParamError) Unwrap() error
type UnmarshalingParamError ¶
func (*UnmarshalingParamError) Error ¶
func (e *UnmarshalingParamError) Error() string
func (*UnmarshalingParamError) Unwrap ¶
func (e *UnmarshalingParamError) Unwrap() error
type UpdateJSONBody ¶
type UpdateJSONBody RestUpdateCreditPayment
UpdateJSONBody defines parameters for Update.
type UpdateJSONRequestBody ¶
type UpdateJSONRequestBody UpdateJSONBody
UpdateJSONRequestBody defines body for Update for application/json ContentType.