summaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authortjpcc <tjp@ctrl-c.club>2023-01-28 15:22:38 -0700
committertjpcc <tjp@ctrl-c.club>2023-01-28 15:29:44 -0700
commit84d8e515befa833cc965ab7dfd8e9cf5aa02eddc (patch)
treef3701e5d59ebf66577e2edc584a980b2cfcce871 /README.md
parent66a1b1f39a1e1d5499b548b36d18c8daa872d7da (diff)
README updates
Diffstat (limited to 'README.md')
-rw-r--r--README.md35
1 files changed, 22 insertions, 13 deletions
diff --git a/README.md b/README.md
index 2e6137d..6793757 100644
--- a/README.md
+++ b/README.md
@@ -3,7 +3,7 @@
Gus is the toolkit for working with the small web in Go.
-Think of it as a net/http for small web protocols. You still have to write your server, but you can focus on the logic you want to implement knowing the protocol is already dealt with. It's been said of gemini that you can write your server in a day. Now you can write it in under an hour.
+Think of it as a net/http for small web protocols. You still have to write your server, but you can focus on the logic you want to implement knowing the protocol is already dealt with. It's been said of gemini that you can write your server in a day. Now you can write it in well under an hour.
## The "gus" package
@@ -16,21 +16,31 @@ Gus is carefully structured as composable building blocks. The top-level package
* a "Middleware" abstraction
* some useful Handler wrappers: filtering, falling through a list of handlers
-## gus/gemini
+## Protocols
-Gus is determined to be structured as composable building blocks, and the gemini package mainly just defines the structure that holds the blocks together.
+The packages gus/gemini and gus/gopher provide concrete implementations of gus abstractions specific to those protocols.
-The gemini package provides some gemini-specific concrete implementations.
+* I/O (parsing, formatting) request and responses
+* constructors for the various kinds of protocol responses
+* helpers for building a protocol-suitable TLS config
+* Client implementations
+* Servers which can run your Handlers.
-* I/O (parsing, formatting) request and responses for the gemini protocol
-* constructors for the various kinds of gemini protocol responses
-* a helper for building a gemini-suitable TLS config
-* a Client implementation
-* a Server which can run your Handlers.
+The primary text formats for those protocols have higher-level support provided in sub-packages:
-## gus/gemini/gemtext
+* gus/gemini/gemtext supports parsing gemtext and getting direct programmatic access to its AST. Deeper sub-packages provide converters to other formats (markdown and HTML) with overridable templates.
+* gus/gopher/gophermap similarly parses the gophermap format and provides access to its AST.
-The gemtext package provides a parser and converters for gemtext documents. It exposes an AST representation for parsed gemtext, and functions to write that AST out as other formats (currently markdown and HTML are supported, but more are planned).
+## Logging
+
+Gus borrows the logging interface from go-kit.
+
+=> [The logger interface from go-kit/log.](https://pkg.go.dev/github.com/go-kit/log#Logger)
+
+The gus/logging package provides everything you need to get a good basic start to producing helpful logs.
+
+* A request-logging middleware with common diagnostics (time, duration, url, status codes, response body lengths)
+* A simple constructor of useful default loggers at various levels. They output colorful logfmt lines to stdout.
## gus/contrib/*
@@ -38,7 +48,6 @@ This is where useful building blocks themselves start to come in. Sub-packages o
The sub-packages include:
-* log contains a simple request-logging middleware
* fs has handlers that make file servers possible: serve files, build directory listings, etc
* cgi includes handlers which can execute CGI programs
* sharedhost which provides means of handling /~username URLs
@@ -69,7 +78,7 @@ There's lots still to do, and contributions are very welcome!
=> [send me an email directly,](mailto:tjp@ctrl-c.club)
-or poke me on IRC: I'm @tjp on irc.tilde.chat, and you'll find me in #gemini
+or poke me on IRC: I'm @tjp on irc.tilde.chat where you'll find me in #gemini
------------------------