creditserver

package
v0.0.0-...-c41c7e3 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

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

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetSwagger

func GetSwagger() (swagger *openapi3.T, err error)

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

func PathToRawSpec

func PathToRawSpec(pathToFile string) map[string]func() ([]byte, error)

Constructs a synthetic filesystem for resolving external references when loading openapi specifications.

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

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.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 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

Create operation middleware

func (*ServerInterfaceWrapper) Delete

Delete operation middleware

func (*ServerInterfaceWrapper) GetByAcceptNo

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

GetByAcceptNo operation middleware

func (*ServerInterfaceWrapper) Healthz

Healthz operation middleware

func (*ServerInterfaceWrapper) Update

Update 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

type UpdateJSONBody

type UpdateJSONBody RestUpdateCreditPayment

UpdateJSONBody defines parameters for Update.

type UpdateJSONRequestBody

type UpdateJSONRequestBody UpdateJSONBody

UpdateJSONRequestBody defines body for Update for application/json ContentType.

Jump to

Keyboard shortcuts

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