Documentation
¶
Overview ¶
Package v1 provides primitives to interact with the openapi HTTP API.
Code generated by github.com/deepmap/oapi-codegen version v1.11.0 DO NOT EDIT.
Package v1 is the generated API interfaces for the OpenAPI spec in api/rest/v1.
Index ¶
- 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
- type ChiServerOptions
- type GetEntriesParams
- type GetEntriesResponse
- type InvalidParamFormatError
- type LogEntry
- type MiddlewareFunc
- type RequiredHeaderError
- type RequiredParamError
- type ServerInterface
- type ServerInterfaceWrapper
- type TooManyValuesForParamError
- type UnescapedCookieParamError
- type UnmarshalingParamError
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 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 GetEntriesParams ¶
type GetEntriesParams struct {
// The number of entries to return from the specified file name. When used with the `filterByText` parameter, the results will return upto this many entries that match the filter criteria.
NumEntries *int `form:"numEntries,omitempty" json:"numEntries,omitempty"`
// A simple string to search for specific substrings in the result set. When used with the `numEntries` parameter, the results will return up to this many entries that match the filter criteria.
FilterByText *string `form:"filterByText,omitempty" json:"filterByText,omitempty"`
}
GetEntriesParams defines parameters for GetEntries.
type GetEntriesResponse ¶
type GetEntriesResponse struct {
Entries []LogEntry `json:"entries"`
}
GetEntriesResponse defines model for GetEntriesResponse.
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 ServerInterface ¶
type ServerInterface interface {
// Given the name of a log file expected to be in the preconfigured directory, returns the latest entries.
// (GET /{filename})
GetEntries(w http.ResponseWriter, r *http.Request, filename string, params GetEntriesParams)
}
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) GetEntries ¶
func (siw *ServerInterfaceWrapper) GetEntries(w http.ResponseWriter, r *http.Request)
GetEntries 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