| ex | ||
| .gitignore | ||
| .gogogo.conf | ||
| .golangci.yml | ||
| go.mod | ||
| go.sum | ||
| LICENSE.txt | ||
| main.go | ||
| Makefile | ||
| README.md | ||
| responder.go | ||
| responder_test.go | ||
GoMeta - a simple meta data provider for go-import
Probably about the same as this
It implements the VCS-Find protocol.
I'd like to use names for my go module import paths that are independent on the VCS hoster, and are persistent for a longer period of time.
go.schlittermann.de/<package>schlittermann.de/go/<package>(untested)
GoMeta
The GoMeta tool is a simple Web service, that serves the Go import
HTTP requests like GET https://go.schlittermann.de/heiko/foo?go-get=1
and responds with a proper HTML containing meta tags pointing to the
actual hosting site.
Currently this is done in a quite static manner, but as soon as there is enough demand, I'll extend GoMeta to read a configuration with mappings or similar (depending on the requirements).
Requests and responses
- https://go.schlittermann.de/heiko/hello` results in a HTTP redirect to https://pkg.go.dev/go.schlittermann.de/heiko/hello
- https://go.schlittermann.de/heiko/hello?go-get=1
results in a complete response according to the [VCS-Find protocol](vcs-find). Additionally it uses a meta tag to redirect the browser (if any) to https://pkg.go.dev/go.schlittermann.de/heiko/hello. Aredirect=0` query parameter can be used to suppress this redirection.
System Integration and Configuration
There is an example Systemd service file, which can help running the GoMeta server. This file serves as an example only. It is accompanied by an example defaults file which is referenced by the service file.
Standalone
You may run the GoMeta standalone, serving HTTP (-listen.http) and
HTTPS (-listen.https), defaulting to ":80" and ":443". The HTTPS
listener needs an X509 certificate (-crt and -key).
Behind a Webserver
You can run GoMeta behind a webserver doing all the TLS stuff for you:
<VirtualHost *:443>
# Run GoMeta as
# gometa -listen.http=localhost:8080 -listen.https="" -trust-x-forwarded-for
# and forward the requests.
ServerName go.schlittermann.de
CustomLog …
ErrorLog …
SSLEngine On
SSLCertificateFile …
SSLCertificateKeyFile …
ProxyPreserveHost On
ProxyPass / http://localhost:8080/
ProxyPassReverse / http://localhost:8080/
</VirtualHost>