# Functions
The hookfunc will run in GoCrab.Run() such as middlerware start, buildtemplate, admin start.
No description provided by the author
register router for all method usage: GoCrab.Any("/api", func(ctx *context.Context){ ctx.Output.Body("hello world") }).
AutoPrefix adds controller handler to CrabApp with prefix.
AutoRouter adds defined controller handler to CrabApp.
No description provided by the author
Critical logs a message at critical level.
Debug logs a message at debug level.
register router for Delete method usage: GoCrab.Delete("/api", func(ctx *context.Context){ ctx.Output.Body("hello world") }).
No description provided by the author
Error logs a message at error level.
ErrorController registers ControllerInterface to each http err code string.
ErrorHandler registers http.HandlerFunc to each http err code string.
To append a slice's value into "exceptMethod", for controller's methods shouldn't reflect to AutoRouter.
register router for Get method usage: GoCrab.Get("/", func(ctx *context.Context){ ctx.Output.Body("hello world") }).
register router for own Handler usage: GoCrab.Handler("/api", func(ctx *context.Context){ ctx.Output.Body("hello world") }).
register router for Head method usage: GoCrab.Head("/api", func(ctx *context.Context){ ctx.Output.Body("hello world") }).
Router add list from usage: GoCrab.Include(&BankAccount{}, &OrderController{},&RefundController{},&ReceiptController{}) type BankAccount struct{ GoCrab.Controller }
register the function func (b *BankAccount)Mapping(){ b.Mapping("ShowAccount" , b.ShowAccount) b.Mapping("ModifyAccount", b.ModifyAccount)}
//@router /account/:id [get] func (b *BankAccount) ShowAccount(){ //logic }
//@router /account/:id [post] func (b *BankAccount) ModifyAccount(){ //logic }
the comments @router url methodlist url support all the function Router's pattern methodlist [get post head put delete options *].
Deprecated: compatibility alias for Warning(), Will be removed in 1.5.0.
Info logs a message at info level.
InsertFilter adds a FilterFunc with pattern condition and action constant.
NewApp returns a new GoCrab application.
NewControllerRegister returns a new ControllerRegistor.
No description provided by the author
No description provided by the author
register router for Options method usage: GoCrab.Options("/api", func(ctx *context.Context){ ctx.Output.Body("hello world") }).
ParseConfig parsed default config file.
register router for Patch method usage: GoCrab.Patch("/api", func(ctx *context.Context){ ctx.Output.Body("hello world") }).
register router for Post method usage: GoCrab.Post("/api", func(ctx *context.Context){ ctx.Output.Body("hello world") }).
register router for Put method usage: GoCrab.Put("/api", func(ctx *context.Context){ ctx.Output.Body("hello world") }).
RESTRouter adds a restful controller handler to CrabApp.
Router adds a patterned controller handler to CrabApp.
Run GoCrab application.
SetLogLevel sets the global log level used by the simple logger.
No description provided by the author
SetLogger sets a new logger.
this function is for test package init.
Trace logs a message at trace level.
Deprecated: compatibility alias for Warning(), Will be removed in 1.5.0.
Warning logs a message at warning level.
# Constants
No description provided by the author
No description provided by the author
No description provided by the author
default filter execution points.
No description provided by the author
No description provided by the author
Log levels to control the logging output.
Log levels to control the logging output.
Log levels to control the logging output.
Log levels to control the logging output.
Log levels to control the logging output.
Log levels to control the logging output.
Log levels to control the logging output.
Log levels to control the logging output.
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
# Variables
print access logs, default is false.
No description provided by the author
No description provided by the author
config provider.
No description provided by the author
No description provided by the author
flag of render template automatically.
flag of copy raw request body in context.
GoCrab application.
No description provided by the author
flag of display directory index.
flag of enable gzip.
No description provided by the author
No description provided by the author
map of http handlers for each error string.
flag of show errors in page.
pkgpath+controller:comments.
GoCrab server name exported in response header.
No description provided by the author
No description provided by the author
No description provided by the author
supported http methods.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
logger references the used application logger.
No description provided by the author
flag of auto recover panic.
No description provided by the author
router case sensitive default is true.
run mode, "dev" or "prod".
No description provided by the author
No description provided by the author
custom error when user stop request handler manually.
No description provided by the author
No description provided by the author
# Structs
App defines GoCrab application with a new PatternServeMux.
Controller defines some basic http request handler operations, such as http context, template and view, session.
store the comment for the controller method.
ControllerRegistor containers registered router rules, controller handlers and filters.
FilterRouter defines filter operation before controller handler execution.
No description provided by the author
No description provided by the author
# Interfaces
ControllerInterface is an interface to uniform all controller handler.
No description provided by the author
# Type aliases
FilterFunc defines filter function type.