Documentation
¶
Index ¶
- type Controller
- type Ctx
- type DotEnvParser
- type Json
- type Middleware
- type Res
- func Accepted(body string) Res
- func AlreadyReported(body string) Res
- func BadGateway(body string) Res
- func BadRequest(body string) Res
- func BasicAuth(ctx Ctx, next func()) Res
- func Conflict(body string) Res
- func Continue(body string) Res
- func Created(body string) Res
- func EarlyHints(body string) Res
- func ExpectationFailed(body string) Res
- func FailedDependency(body string) Res
- func Forbidden(body string) Res
- func Found(body string) Res
- func GatewayTimeout(body string) Res
- func Gone(body string) Res
- func HTTPVersionNotSupported(body string) Res
- func IMUsed(body string) Res
- func InsufficientStorage(body string) Res
- func InternalError(body string) Res
- func LengthRequired(body string) Res
- func Locked(body string) Res
- func Logger(ctx Ctx, next func()) Res
- func LoopDetected(body string) Res
- func MethodNotAllowed(body string) Res
- func MisdirectedRequest(body string) Res
- func MovedPermanently(body string) Res
- func MultiStatus(body string) Res
- func MultipleChoices(body string) Res
- func NetworkAuthenticationRequired(body string) Res
- func NoContent(body string) Res
- func NonAuthoritativeInfo(body string) Res
- func NotAcceptable(body string) Res
- func NotExtended(body string) Res
- func NotFound(body string) Res
- func NotImplemented(body string) Res
- func NotModified(body string) Res
- func Ok(body string) Res
- func PartialContent(body string) Res
- func PaymentRequired(body string) Res
- func PermanentRedirect(body string) Res
- func PreconditionFailed(body string) Res
- func PreconditionRequired(body string) Res
- func Processing(body string) Res
- func ProxyAuthRequired(body string) Res
- func RequestEntityTooLarge(body string) Res
- func RequestHeaderFieldsTooLarge(body string) Res
- func RequestTimeout(body string) Res
- func RequestURITooLong(body string) Res
- func RequestedRangeNotSatisfiable(body string) Res
- func ResetContent(body string) Res
- func Response(statusCode int, body string) Res
- func SeeOther(body string) Res
- func ServiceUnavailable(body string) Res
- func SwitchingProtocols(body string) Res
- func Teapot(body string) Res
- func TemporaryRedirect(body string) Res
- func TooEarly(body string) Res
- func TooManyRequests(body string) Res
- func Unauthorized(body string) Res
- func UnavailableForLegalReasons(body string) Res
- func UnprocessableEntity(body string) Res
- func UnsupportedMediaType(body string) Res
- func UpgradeRequired(body string) Res
- func UseProxy(body string) Res
- func VariantAlsoNegotiates(body string) Res
- type Route
- type RouteNameMode
- type WebApp
- func (app *WebApp) Connect(handler Controller) *WebApp
- func (app *WebApp) Debug(val bool) *WebApp
- func (app *WebApp) Delete(handler Controller) *WebApp
- func (app *WebApp) Do(handlers ...Controller) *WebApp
- func (app *WebApp) DoRoute(handler Controller, method string)
- func (app *WebApp) DotEnv(dotenvFile string) *WebApp
- func (app *WebApp) Env(environment string) *WebApp
- func (app *WebApp) Get(handler Controller) *WebApp
- func (app *WebApp) Gmw(middlewares ...Middleware) *WebApp
- func (app *WebApp) Head(handler Controller) *WebApp
- func (app *WebApp) Mw(middlewares ...Middleware) *WebApp
- func (app *WebApp) Options(handler Controller) *WebApp
- func (app *WebApp) Patch(handler Controller) *WebApp
- func (app *WebApp) Port(port int) *WebApp
- func (app *WebApp) Post(handler Controller) *WebApp
- func (app *WebApp) PrintRoutes()
- func (app *WebApp) Put(handler Controller) *WebApp
- func (app *WebApp) RegisterRoutes()
- func (app *WebApp) RouteBy(routeMode RouteNameMode) *WebApp
- func (app *WebApp) Run() bool
- func (app *WebApp) Sqlite(path string) *WebApp
- func (app *WebApp) Trace(handler Controller) *WebApp
- func (app *WebApp) Var(key string) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Controller ¶
type DotEnvParser ¶
type DotEnvParser struct {
// contains filtered or unexported fields
}
func (*DotEnvParser) Parse ¶
func (d *DotEnvParser) Parse() map[string]string
func (*DotEnvParser) ParseVariable ¶
func (d *DotEnvParser) ParseVariable() string
type Middleware ¶
type Res ¶
type Res = struct {
// contains filtered or unexported fields
}
func AlreadyReported ¶
func BadGateway ¶
func BadRequest ¶
func EarlyHints ¶
func ExpectationFailed ¶
func FailedDependency ¶
func GatewayTimeout ¶
func HTTPVersionNotSupported ¶
func InsufficientStorage ¶
func InternalError ¶
func LengthRequired ¶
func LoopDetected ¶
func MethodNotAllowed ¶
func MisdirectedRequest ¶
func MovedPermanently ¶
func MultiStatus ¶
func MultipleChoices ¶
func NonAuthoritativeInfo ¶
func NotAcceptable ¶
func NotExtended ¶
func NotImplemented ¶
func NotModified ¶
func PartialContent ¶
func PaymentRequired ¶
func PermanentRedirect ¶
func PreconditionFailed ¶
func PreconditionRequired ¶
func Processing ¶
func ProxyAuthRequired ¶
func RequestEntityTooLarge ¶
func RequestTimeout ¶
func RequestURITooLong ¶
func ResetContent ¶
func ServiceUnavailable ¶
func SwitchingProtocols ¶
func TemporaryRedirect ¶
func TooManyRequests ¶
func Unauthorized ¶
func UnprocessableEntity ¶
func UnsupportedMediaType ¶
func UpgradeRequired ¶
func VariantAlsoNegotiates ¶
type RouteNameMode ¶
type RouteNameMode int
const ( CamelCase RouteNameMode = iota SnakeCase PascalCase )
type WebApp ¶
type WebApp struct {
// contains filtered or unexported fields
}
func (*WebApp) Connect ¶
func (app *WebApp) Connect(handler Controller) *WebApp
func (*WebApp) Delete ¶
func (app *WebApp) Delete(handler Controller) *WebApp
func (*WebApp) Do ¶
func (app *WebApp) Do(handlers ...Controller) *WebApp
func (*WebApp) DoRoute ¶
func (app *WebApp) DoRoute(handler Controller, method string)
func (*WebApp) Get ¶
func (app *WebApp) Get(handler Controller) *WebApp
func (*WebApp) Gmw ¶
func (app *WebApp) Gmw(middlewares ...Middleware) *WebApp
Registers middleware into the global middleware pipeline. Applies to all routes.
func (*WebApp) Head ¶
func (app *WebApp) Head(handler Controller) *WebApp
func (*WebApp) Mw ¶
func (app *WebApp) Mw(middlewares ...Middleware) *WebApp
Registers middleware for a specific route.
func (*WebApp) Options ¶
func (app *WebApp) Options(handler Controller) *WebApp
func (*WebApp) Patch ¶
func (app *WebApp) Patch(handler Controller) *WebApp
func (*WebApp) Post ¶
func (app *WebApp) Post(handler Controller) *WebApp
func (*WebApp) PrintRoutes ¶
func (app *WebApp) PrintRoutes()
PrintRoutes outputs all registered routes with their HTTP methods and resources
func (*WebApp) Put ¶
func (app *WebApp) Put(handler Controller) *WebApp
func (*WebApp) RegisterRoutes ¶
func (app *WebApp) RegisterRoutes()
func (*WebApp) RouteBy ¶
func (app *WebApp) RouteBy(routeMode RouteNameMode) *WebApp
Changes the route name generation to use a different casing. The default is camelCase.
func (*WebApp) Trace ¶
func (app *WebApp) Trace(handler Controller) *WebApp
Source Files
¶
Click to show internal directories.
Click to hide internal directories.