1
0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo.git synced 2024-12-12 11:38:00 -05:00
forgejo/vendor/gopkg.in/macaron.v1
Mura Li d77176912b Use Go1.11 module (#5743)
* Migrate to go modules

* make vendor

* Update mvdan.cc/xurls

* make vendor

* Update code.gitea.io/git

* make fmt-check

* Update github.com/go-sql-driver/mysql

* make vendor
2019-03-27 19:15:23 +08:00
..
.gitignore Use Go1.11 module (#5743) 2019-03-27 19:15:23 +08:00
.travis.yml Use Go1.11 module (#5743) 2019-03-27 19:15:23 +08:00
context.go Fix serving of raw wiki files other than .md (#5814) 2019-02-05 20:58:55 -05:00
LICENSE Various wiki bug fixes (#2996) 2017-11-28 17:43:51 +08:00
logger.go Various wiki bug fixes (#2996) 2017-11-28 17:43:51 +08:00
macaron.go Fix serving of raw wiki files other than .md (#5814) 2019-02-05 20:58:55 -05:00
macaronlogo.png Use Go1.11 module (#5743) 2019-03-27 19:15:23 +08:00
README.md Use Go1.11 module (#5743) 2019-03-27 19:15:23 +08:00
recovery.go Added all required dependencies 2016-11-04 08:43:11 +01:00
render.go Add ETag header to avatars (#721) 2017-01-25 12:26:31 +08:00
response_writer.go Fix serving of raw wiki files other than .md (#5814) 2019-02-05 20:58:55 -05:00
return_handler.go Added all required dependencies 2016-11-04 08:43:11 +01:00
router.go Fix serving of raw wiki files other than .md (#5814) 2019-02-05 20:58:55 -05:00
static.go Add ETag header to avatars (#721) 2017-01-25 12:26:31 +08:00
tree.go Various wiki bug fixes (#2996) 2017-11-28 17:43:51 +08:00
util_go17.go Various wiki bug fixes (#2996) 2017-11-28 17:43:51 +08:00
util_go18.go Various wiki bug fixes (#2996) 2017-11-28 17:43:51 +08:00

Macaron Build Status

Macaron Logo

Package macaron is a high productive and modular web framework in Go.

Getting Started

The minimum requirement of Go is 1.6.

To install Macaron:

go get gopkg.in/macaron.v1

The very basic usage of Macaron:

package main

import "gopkg.in/macaron.v1"

func main() {
	m := macaron.Classic()
	m.Get("/", func() string {
		return "Hello world!"
	})
	m.Run()
}

Features

  • Powerful routing with suburl.
  • Flexible routes combinations.
  • Unlimited nested group routers.
  • Directly integrate with existing services.
  • Dynamically change template files at runtime.
  • Allow to use in-memory template and static files.
  • Easy to plugin/unplugin features with modular design.
  • Handy dependency injection powered by inject.
  • Better router layer and less reflection make faster speed.

Middlewares

Middlewares allow you easily plugin/unplugin features for your Macaron applications.

There are already many middlewares to simplify your work:

  • render - Go template engine
  • static - Serves static files
  • gzip - Gzip compression to all responses
  • binding - Request data binding and validation
  • i18n - Internationalization and Localization
  • cache - Cache manager
  • session - Session manager
  • csrf - Generates and validates csrf tokens
  • captcha - Captcha service
  • pongo2 - Pongo2 template engine support
  • sockets - WebSockets channels binding
  • bindata - Embed binary data as static and template files
  • toolbox - Health check, pprof, profile and statistic services
  • oauth2 - OAuth 2.0 backend
  • authz - ACL/RBAC/ABAC authorization based on Casbin
  • switcher - Multiple-site support
  • method - HTTP method override
  • permissions2 - Cookies, users and permissions
  • renders - Beego-like render engine(Macaron has built-in template engine, this is another option)
  • piwik - Server-side piwik analytics

Use Cases

  • Gogs: A painless self-hosted Git Service
  • Grafana: The open platform for beautiful analytics and monitoring
  • Peach: A modern web documentation server
  • Go Walker: Go online API documentation
  • Switch: Gopm registry
  • Critical Stack Intel: A 100% free intel marketplace from Critical Stack, Inc.

Getting Help

Credits

License

This project is under the Apache License, Version 2.0. See the LICENSE file for the full license text.