http
v1.0.3
github.com/nx-a/http
Documentation
pkg.go.dev ↗Functions
AddRoute
func AddRoute(method, path, role string, route RouteFunc)
Listen
func Listen(cfg Gettable, access Accessibly) (chan bool, *fiber.App)
Types
Accessibly
type Accessibly interface {
Middleware(access, url string) func(ctx *fiber.Ctx) error
}
Gettable
type Gettable interface {
Get(name string) string
GetDef(name, def string) string
}
Route
type Route struct {
Role string
Path string
Method string
Handler RouteFunc
}
RouteFunc
type RouteFunc func(ctx *fiber.Ctx) error