Updates
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
* update README * move "gemtext" to within "gemini"
This commit is contained in:
parent
2ef530daa4
commit
6586db782e
29
README.gmi
29
README.gmi
|
@ -4,22 +4,31 @@ 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.
|
||||
|
||||
## The "gus" package
|
||||
|
||||
Gus is carefully structured as composable building blocks. The top-level package defines the framework in which servers and clients can be built.
|
||||
|
||||
* a request type
|
||||
* a response type
|
||||
* a "Server" interface type
|
||||
* a "Handler" abstraction
|
||||
* a "Middleware" abstraction
|
||||
* some useful Handler wrappers: filtering, falling through a list of handlers
|
||||
|
||||
## gus/gemini
|
||||
|
||||
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 package contains:
|
||||
* a request type
|
||||
* a response type
|
||||
* a "Handler" abstraction
|
||||
* a "Middleware" abstraction
|
||||
* some useful Handler wrappers: filtering, falling through a list of handlers
|
||||
* helpers for building a gemini-suitable TLS config
|
||||
* a Server that can run your handler(s)
|
||||
The gemini package provides some gemini-specific concrete implementations.
|
||||
* 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.
|
||||
|
||||
## gus/gemtext
|
||||
## gus/gemini/gemtext
|
||||
|
||||
The gemtext package today provides a parser for gemtext documents. In the future, there will be conversions for the in-memory parsed representation into markdown, html, and whatever else people come up with.
|
||||
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).
|
||||
|
||||
## gus/contrib/*
|
||||
|
||||
|
|
29
README.md
29
README.md
|
@ -5,23 +5,32 @@ 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.
|
||||
|
||||
## The "gus" package
|
||||
|
||||
Gus is carefully structured as composable building blocks. The top-level package defines the framework in which servers and clients can be built.
|
||||
|
||||
* a request type
|
||||
* a response type
|
||||
* a "Server" interface type
|
||||
* a "Handler" abstraction
|
||||
* a "Middleware" abstraction
|
||||
* some useful Handler wrappers: filtering, falling through a list of handlers
|
||||
|
||||
## gus/gemini
|
||||
|
||||
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 package contains:
|
||||
The gemini package provides some gemini-specific concrete implementations.
|
||||
|
||||
* a request type
|
||||
* a response type
|
||||
* a "Handler" abstraction
|
||||
* a "Middleware" abstraction
|
||||
* some useful Handler wrappers: filtering, falling through a list of handlers
|
||||
* helpers for building a gemini-suitable TLS config
|
||||
* a Server that can run your handler(s)
|
||||
* 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.
|
||||
|
||||
## gus/gemtext
|
||||
## gus/gemini/gemtext
|
||||
|
||||
The gemtext package today provides a parser for gemtext documents. In the future, there will be conversions for the in-memory parsed representation into markdown, html, and whatever else people come up with.
|
||||
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).
|
||||
|
||||
## gus/contrib/*
|
||||
|
||||
|
|
|
@ -4,8 +4,8 @@ import (
|
|||
"log"
|
||||
"os"
|
||||
|
||||
"tildegit.org/tjp/gus/gemtext"
|
||||
"tildegit.org/tjp/gus/gemtext/htmlconv"
|
||||
"tildegit.org/tjp/gus/gemini/gemtext"
|
||||
"tildegit.org/tjp/gus/gemini/gemtext/htmlconv"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
|
|
@ -4,8 +4,8 @@ import (
|
|||
"log"
|
||||
"os"
|
||||
|
||||
"tildegit.org/tjp/gus/gemtext"
|
||||
"tildegit.org/tjp/gus/gemtext/mdconv"
|
||||
"tildegit.org/tjp/gus/gemini/gemtext"
|
||||
"tildegit.org/tjp/gus/gemini/gemtext/mdconv"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
|
|
@ -4,7 +4,7 @@ import (
|
|||
"bytes"
|
||||
"testing"
|
||||
|
||||
"tildegit.org/tjp/gus/gemtext"
|
||||
"tildegit.org/tjp/gus/gemini/gemtext"
|
||||
)
|
||||
|
||||
func FuzzParse(f *testing.F) {
|
|
@ -4,8 +4,8 @@ import (
|
|||
"html/template"
|
||||
"io"
|
||||
|
||||
"tildegit.org/tjp/gus/gemtext"
|
||||
"tildegit.org/tjp/gus/gemtext/internal"
|
||||
"tildegit.org/tjp/gus/gemini/gemtext"
|
||||
"tildegit.org/tjp/gus/gemini/gemtext/internal"
|
||||
)
|
||||
|
||||
// Convert writes markdown to a writer from the provided gemtext document.
|
|
@ -7,8 +7,8 @@ import (
|
|||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
"tildegit.org/tjp/gus/gemtext"
|
||||
"tildegit.org/tjp/gus/gemtext/htmlconv"
|
||||
"tildegit.org/tjp/gus/gemini/gemtext"
|
||||
"tildegit.org/tjp/gus/gemini/gemtext/htmlconv"
|
||||
)
|
||||
|
||||
var gmiDoc = `
|
|
@ -5,7 +5,7 @@ import (
|
|||
"net/url"
|
||||
"text/template"
|
||||
|
||||
"tildegit.org/tjp/gus/gemtext"
|
||||
"tildegit.org/tjp/gus/gemini/gemtext"
|
||||
)
|
||||
|
||||
var Renderers = map[gemtext.LineType]string{
|
|
@ -4,8 +4,8 @@ import (
|
|||
"io"
|
||||
"text/template"
|
||||
|
||||
"tildegit.org/tjp/gus/gemtext"
|
||||
"tildegit.org/tjp/gus/gemtext/internal"
|
||||
"tildegit.org/tjp/gus/gemini/gemtext"
|
||||
"tildegit.org/tjp/gus/gemini/gemtext/internal"
|
||||
)
|
||||
|
||||
// Convert writes markdown to a writer from the provided gemtext document.
|
|
@ -8,8 +8,8 @@ import (
|
|||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
"tildegit.org/tjp/gus/gemtext"
|
||||
"tildegit.org/tjp/gus/gemtext/mdconv"
|
||||
"tildegit.org/tjp/gus/gemini/gemtext"
|
||||
"tildegit.org/tjp/gus/gemini/gemtext/mdconv"
|
||||
)
|
||||
|
||||
var gmiDoc = `
|
|
@ -3,7 +3,7 @@ package gemtext_test
|
|||
import (
|
||||
"testing"
|
||||
|
||||
"tildegit.org/tjp/gus/gemtext"
|
||||
"tildegit.org/tjp/gus/gemini/gemtext"
|
||||
)
|
||||
|
||||
func TestParseLinkLine(t *testing.T) {
|
|
@ -7,7 +7,7 @@ import (
|
|||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
"tildegit.org/tjp/gus/gemtext"
|
||||
"tildegit.org/tjp/gus/gemini/gemtext"
|
||||
)
|
||||
|
||||
func TestParse(t *testing.T) {
|
Reference in New Issue