minimal webdev toolkit in go
Find a file
2022-01-09 20:16:30 -07:00
auth rename project, add a naive test file 2022-01-08 13:31:10 -07:00
cookie initial commit 2022-01-04 13:23:25 -07:00
indentalUserDB add README and LICENSE, and refactor IndentalUserDB to support Data map 2022-01-09 20:16:30 -07:00
renderer add nested template support in renderer and IndentalUserDB UserStore implementation 2022-01-07 22:52:37 -07:00
router remove ServerTask in router 2022-01-08 13:51:25 -07:00
testData ignore testData/userDB.ndtl 2022-01-08 13:52:08 -07:00
.gitignore remove ServerTask in router 2022-01-08 13:51:25 -07:00
go.mod rename project, add a naive test file 2022-01-08 13:31:10 -07:00
go.sum rename project, add a naive test file 2022-01-08 13:31:10 -07:00
LICENSE add README and LICENSE, and refactor IndentalUserDB to support Data map 2022-01-09 20:16:30 -07:00
quartzgun.png add README and LICENSE, and refactor IndentalUserDB to support Data map 2022-01-09 20:16:30 -07:00
quartzgun_test.go rename project, add a naive test file 2022-01-08 13:31:10 -07:00
README.md add README and LICENSE, and refactor IndentalUserDB to support Data map 2022-01-09 20:16:30 -07:00

quartzgun

A lightweight web framework for Go

Quartz Gun effect from Eureka Seven AO, showing a tree of light spanning down to the earth with its root in low orbit

philosophy/design

quartzgun is designed to enable speedy development of efficient web sites and APIs in Go. There are no dependencies outside of the standard library except for bcrypt, and the library is modular -- you can use any part of it independently. The router uses the func(http.Handler) http.Handler middleware pattern so that you can plug and play existing middleware.

There are pre-made renderers which are designed as plug and play endpoints in your middleware chains. They are used for providing the basic functionality of the route, rendering an HTML template in the case of a normal page, or JSON or XML for API endpoints.

The auth system is designed from scratch to provide a modular system where new authentication/authorization backends can be added easily by satisfying the auth.UserStore interface.

about the name

The Quartz Gun is a weapon in the anime Eureka Seven AO; it's fueled by a sentient entity known as Quartz, and instead of being used in a traditional sense as a weapon, it alters the timeline when fired. Thinking about URL routes reminded me of the tree of light it emits when fired, so I named the library quartzgun.

usage

A more complete usage guide will be forthcoming when the library is more complete, but for now you can check out the quartzgun_test.go file for an overview of how to use it.

roadmap/features

core functionality

  • router (static service trees, paramaterized routes, and per-method handlers on routes)
  • basic renderers (HTML template, JSON, XML)

auth

  • top-level wrapper for attaching UserStore backends to cookie handler
  • POC indental UserStore implementation

etc

  • generic DAL wrapper? might be unneccessary

license

quartzgun is licensed under the MIT license -- see the LICENSE file for details but the long and short of it is you can use/modify it for any reason, but give me (and other authors where applicable) credit for writing it.

contributing

Send patches to nilix@nilfm.cc using git format-patch -s HEAD~<however many commits>. The -s flag ensures that your name makes it into the commit log.