MCPcopy Create free account

hub / github.com/go-chi/chi / types & classes

Types & classes57 in github.com/go-chi/chi

↓ 1 callersFuncTypeHandler
func(w http.ResponseWriter, r *http.Request) error
_examples/custom-handler/main.go:10
↓ 1 callersTypeAliasMiddlewares
Middlewares type is a slice of standard middleware handlers with methods to compose middleware chains and http.Handler's.
chi.go:134
↓ 1 callersTypeAliasmethodTyp
tree.go:16
↓ 1 callersTypeAliasnodeTyp
tree.go:77
StructArticle
Article is runtime object, that's not meant to be sent via REST.
_examples/versions/data/article.go:4
StructArticle
Article presented in API version 2.
_examples/versions/presenter/v2/article.go:11
StructArticle
Article presented in API version 2.
_examples/versions/presenter/v3/article.go:12
StructArticle
Article presented in API version 1.
_examples/versions/presenter/v1/article.go:10
StructArticle
Article data model. I suggest looking at https://upper.io for an easy and powerful data persistence adapter.
_examples/rest/main.go:447
StructArticleRequest
ArticleRequest is the request payload for Article data model. NOTE: It's good practice to have well defined request and response payloads so you can
_examples/rest/main.go:319
StructArticleResponse
ArticleResponse is the response payload for the Article data model. See NOTE above in ArticleRequest as well. In the ArticleResponse object, first a
_examples/rest/main.go:350
StructChainHandler
ChainHandler is a http.Handler with support for handler composition and execution.
chain.go:24
StructCompressor
Compressor represents a set of encoding configurations.
middleware/compress.go:47
StructContext
Context is the default routing context set on the root node of a request context to track route patterns, URL parameters and an optional routing path.
context.go:45
StructDefaultLogFormatter
DefaultLogFormatter is a simple logger that implements a LogFormatter.
middleware/logger.go:92
FuncTypeEncoderFunc
An EncoderFunc is a function that wraps the provided io.Writer with a streaming compression algorithm and returns it. In case of failure, the functio
middleware/compress.go:256
StructErrResponse
NOTE: as a thought, the request and response payloads for an Article could be the same payload type, perhaps will do an example with it as well. type
_examples/rest/main.go:401
StructHeaderRoute
middleware/route_headers.go:109
TypeAliasHeaderRouter
middleware/route_headers.go:46
InterfaceLogEntry
LogEntry records the final log when a request completes. See defaultLogEntry for an example implementation.
middleware/logger.go:69
InterfaceLogFormatter
LogFormatter initiates the beginning of a new LogEntry per request. See DefaultLogFormatter for an example implementation.
middleware/logger.go:63
InterfaceLoggerInterface
LoggerInterface accepts printing to stdlib logger or compatible logger.
middleware/logger.go:87
StructMux
Mux is a simple HTTP route multiplexer that parses a request path, records any URL params, and executes an end handler. It implements the http.Handler
mux.go:21
StructPattern
middleware/route_headers.go:128
StructRoute
Route describes the details of a routing handler. Handlers map key is an HTTP method
tree.go:843
StructRouteParams
RouteParams is a structure to track URL routing parameters efficiently.
context.go:143
InterfaceRouter
Router consisting of the core routing methods used by chi's Mux, using only the standard net/http.
chi.go:67
InterfaceRoutes
Routes interface adds two methods for router traversal, which is also used by the `docgen` subpackage to generation documentation for Routers.
chi.go:119
StructThrottleOpts
ThrottleOpts represents a set of throttling options.
middleware/throttle.go:20
StructUser
-- Data model objects and persistence mocks: -- User data model
_examples/rest/main.go:440
StructUserPayload
-- Request and Response payloads for the REST api. The payloads embed the data model objects an In a real-world project, it would make sense to put
_examples/rest/main.go:290
FuncTypeWalkFunc
WalkFunc is the type of the function called for each method and route visited by Walk.
tree.go:850
InterfaceWrapResponseWriter
WrapResponseWriter is a proxy around an http.ResponseWriter that allows you to hook into various parts of the response process.
middleware/wrap_writer.go:49
StructbasicWriter
basicWriter wraps a http.ResponseWriter that implements the minimal http.ResponseWriter interface.
middleware/wrap_writer.go:74
InterfacecompressFlusher
middleware/compress.go:339
StructcompressResponseWriter
middleware/compress.go:264
StructcontextKey
contextKey is a value for use with context.WithValue. It's used as a pointer so it fits in an interface{} without allocation. This technique for defin
context.go:156
StructcontextKey
contextKey is a value for use with context.WithValue. It's used as a pointer so it fits in an interface{} without allocation. This technique for defin
middleware/middleware.go:17
StructctxKey
mux_test.go:1875
TypeAliasctxKeyRequestID
Key to use when setting the request ID.
middleware/request_id.go:18
StructdefaultLogEntry
middleware/logger.go:127
Structendpoint
tree.go:117
TypeAliasendpoints
endpoints is a mapping of http method constants to handlers for a given route.
tree.go:115
StructflushHijackWriter
flushHijackWriter ...
middleware/wrap_writer.go:165
StructflushWriter
flushWriter ...
middleware/wrap_writer.go:140
StructhijackWriter
hijackWriter ...
middleware/wrap_writer.go:153
Structhttp2FancyWriter
http2FancyWriter is a HTTP2 writer that additionally satisfies http.Flusher, and io.ReaderFrom. It exists for the common case of wrapping the http.Res
middleware/wrap_writer.go:228
StructhttpFancyWriter
httpFancyWriter is a HTTP writer that additionally satisfies http.Flusher, http.Hijacker, and io.ReaderFrom. It exists for the common case of wrapping
middleware/wrap_writer.go:187
InterfaceioResetterWriter
Interface for types that allow resetting io.Writers.
middleware/compress.go:259
Structnode
tree.go:86
TypeAliasnodes
tree.go:802
StructprettyStack
middleware/recoverer.go:66
StructtestLoggerWriter
middleware/logger_test.go:13
Structthrottler
throttler limits number of currently processed requests at a time.
middleware/throttle.go:119
StructtodosResource
_examples/todos-resource/todos.go:9
Structtoken
token represents a request that is being processed.
middleware/throttle.go:116
StructusersResource
_examples/todos-resource/users.go:9