https://github.com/benpate/toot-echo
Echo adapter for the toot Mastodon API
https://github.com/benpate/toot-echo
Last synced: 4 months ago
JSON representation
Echo adapter for the toot Mastodon API
- Host: GitHub
- URL: https://github.com/benpate/toot-echo
- Owner: benpate
- License: agpl-3.0
- Created: 2023-10-10T00:19:57.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2025-01-01T21:51:54.000Z (6 months ago)
- Last Synced: 2025-03-19T01:11:22.539Z (4 months ago)
- Language: Go
- Size: 59.6 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# toot-echo
[](http://pkg.go.dev/github.com/benpate/toot-echo)
[](https://github.com/benpate/toot-echo/releases)
[](https://github.com/benpate/toot-echo/actions/workflows/go.yml)
[](https://goreportcard.com/report/github.com/benpate/toot-echo)
[](https://codecov.io/gh/benpate/toot-echo)## Echo adapter for the toot Mastodon API
Toot-echo connects the [toot](http://github.com/benpate/toot-echo) library to the [echo](https://echo.labstack.com/) router. This makes it easy for you to Mastodon-ize your Go/echo application.
```go
api.PostStatus = func(authorization model.Authorization, values txn.PostStatus) (object.Status, error) {
// Do the thing that:
// 1) creates a new `status`
// 2) writes it to the database
// 3) returns the value to the caller
}// Once your handlers are defined, connect Toot to your router like this:
e := echo.New()
tootecho.Register(e, api)
```## Routers
Currently, toot-echo is the only router adapter I have created for Toot. It should, however, be a simple project to write adapters for other routers. If you'd like to use Toot with a different router, please get in touch and let's work together.
## Project Status (Alpha?)
This project is still in early alpha testing, as I continue filling out the Mastodon support in [Emissary](https://emissary.dev). Some interfaces may change in the future if I run into trouble making things work with this reference implementation.
However, at this point, feedback from other developers will be immensely helpful in making Tooth a useful tool for the Go community. Please feel free to open issues, or submit pull requests.