Categorygithub.com/go-flow/flow/v2
modulepackage
2.0.8
Repository: https://github.com/go-flow/flow.git
Documentation: pkg.go.dev

# README

A Progressive Go for building efficient and scalable server-side applications.

Build Status codecov GoDoc GoReport GitHub contributors License: MIT

Description

Flow is a web framework for building efficient, scalable Go (Golang) applications.

Thanks to httprouter library, flow provides lightweight high performance HTTP request router. If you need performance and good productivity, flow is right tool for you :)

Philosophy

In recent years Go is gaining in populariti on the web for building REST APIs and microservices. there are a lot of amazing libraries, helpers and tools available for Go, none of them effectively solve the main problem - the architecture.

Flow aims to provide an application architecture out of the box which allows for effortless creation of highly testable, scalable, loosely coupled and easily maintainable applications.

Getting started

Github pages link page comming soon

Issues

Please make sure to read the Issue Reporting Checklist before opening an issue. Issues not conforming to the guideliness may be closed immediately.

Support

Flow is an MIT-licensed open source project. It can grow thanks to the Ministry of Programming and amazing team.

License

Flow is MIT licensed.

# Packages

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

# Functions

Bootstrap creates Flow Module instance for given factory object.
CleanPath is the URL version of path.Clean, it returns a canonical URL path for p, eliminating .
NewModule creates new Module object.
NewOptions creates New application Options instance.
No description provided by the author
NewRouter creates new Router instance with default options.
NewRouterWithOptions creates new Router instance for given options.
ParamsFromContext pulls the URL parameters from a request context, or returns nil if none are present.
ResponseData creates []byte render Response.
ResponseDownload creates file attachment ActionResult with following headers: Content-Type Content-Length Content-Disposition Content-Type is set using mime#TypeByExtension with the filename's extension.
ResponseError creates new Error response for given http code and error.
ResponseFile serves content from given file.
No description provided by the author
ResponseJSON creates JSON rendered Response.
ResponseReader creates io.Reader render Response for given http code, reader and content type.
ResponseRedirect creates Redirect ewsponse for given http code and destination URL.
ResponseText creates Text rendered Response.
ResponseXML creates XML rendered Response.

# Variables

ParamsKey is the request context key under which URL params are stored.

# Structs

MiddlewareStack holds middlewares applied to router.
Module struct.
Options holds application configuration Options.
Param is a single URL parameter, consisting of a key and a value.
Route structure.
Router is a http.Handler which can be used to dispatch requests to different handler functions via configurable routes.
RouterOptions holds router configuration Options.

# Interfaces

ActionHandler interface is used to define http action handlers defined by module router.
Injector defines Dependency Injector interface.
ModuleFactory interface for creating flow.Module.
ModuleOptioner interface is used for providing Application Options This interface is used only for root module or AppModule.
ModuleStarter interface used when http application is served Start method is invoked if module implements the interface.
ModuleStopper interface used when http application is stopped Stop method is invoked during shutdown process if module implements the interface.
No description provided by the author
Response defines interface for HTTP action responses.
RouterFactory interface responsible for creating module routers.

# Type aliases

HandlerFunc is a function that is registered to a route to handle http requests.
Map is shortcut for map[string]interface{}.
MiddlewareFunc defines middleware handler function.
MiddlewareHandlerFunc defines middleware interface func DoSomething(next MiddlewareFunc) MiddlewareFunc { return func(w http.ResponseWriter, r *http.Request) Response { // do something before calling the next handler resp := next(w, r) // do something after call the handler return resp } }.
Params is a Param-slice, as returned by the router.
Routes is Route collection.