package
0.1.6
Repository: https://github.com/seal-io/hermitcrab.git
Documentation: pkg.go.dev

# Packages

No description provided by the author
No description provided by the author

# Functions

Alias wraps the given resource handler with a new alias kind.
ExposeOpenAPI is a RouterOption to add route to serve the OpenAPI schema spec, and provide the SwaggerUI as well.
FullPageResponse returns the given data in a pagination, which treats the given data as a full page.
If is a gin middleware, which is used for judging the incoming request, execute given handle if matched.
IsBidiStreamRequest returns true if the incoming request is a websocket request.
IsUnidiStreamRequest returns true if the incoming request is a watching request.
No description provided by the author
No description provided by the author
NoPageResponse returns the given data without pagination.
Only is a gin middleware, which is used for judging the incoming request, aborts with 403 if not match.
OnlyLocalIP judges the incoming request whether is from localhost, aborts with 403 if not match.
PageResponse returns the given data in a pagination, which calculates the pagination info with the given request page and perPage.
Per is a gin middleware, which is used for providing new handler for different incoming request.
PerIP provides new handler according to incoming request IP.
RequestCounting limits the request count in the given maximum, returns 429 if the new request has waited with the given duration.
RequestShaping arranges all requests to be received on the given qps, returns 429 if the new request can be allowed within the given latency, if the given latency is not positive, RequestShaping will never return 429.
RequestThrottling controls the request count per second and allows bursting, returns 429 if the new request is not allowed.
SkipLoggingPaths is a RouterOption to ignore logging for the given paths.
TypedResponse returns the given data in typed.
WithDefaultHandler is a RouterOption to configure the default handler for gin.
WithDefaultWriter is a RouterOption to configure the default writer for gin.
WithResourceAuthorizer if a RouterOption to configure the authorizer for the routes of IResourceHandler.
WithRouteAdviceProviders is a RouterOption to configure the advice providers for the reflected routes of a IHandler.

# Constants

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Structs

No description provided by the author
RequestBidiStream holds the request for dual-directions stream.
RequestPagination holds the requesting pagination data.
RequestUnidiStream holds the request for single-direction stream.
ResourceProfile holds the profile of a resource.
ResponseCollection holds the response data of collection with a pagination.
ResponseFile is similar to render.Reader, but be able to close the file reader out of the handler processing.
ResponsePagination holds the pagination data.
Route holds the information of a resource route.
RouteProfile holds the profile of a route.
No description provided by the author
No description provided by the author
No description provided by the author

# Interfaces

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Validator holds the operation of validation.

# Type aliases

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author