emuarius

package module
v0.0.0-...-499ab39 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 23, 2018 License: MIT Imports: 23 Imported by: 0

README

emuarius

Bridge between Twitter and Mastodon (or any OStatus-compliant instance). Powered by go-ostatus.

For the moment, this is a read-only bridge: you'll be able to see Twitter activity from Mastodon (try to follow twitter_username@rootURL), but you won't be able to interact with it.

Usage

Your server must be configured with a domain name and HTTPS.

go get -u github.com/emersion/emuarius/cmd/...
cp emuarius.example.toml emuarius.toml
# Fill emuarius.toml with Twitter app credentials
emuarius
Docker
docker build -t emuarius .
docker run -p 4004:4004 \
-e "EMUARIUS_TWITTER_CONSUMER_SECRET=xxx" \
-e "EMUARIUS_TWITTER_ACCESS_TOKEN=xxx" \
-e "EMUARIUS_TWITTER_ACCESS_TOKEN_SECRET=xxx" \
-e "EMUARIUS_TWITTER_CONSUMER_KEY=xxx"  emuarius

Configuration

You can configure emuarius with a toml configuration file or environment variables. Environment variables will take precedence over toml values.

toml env default
PORT
address EMUARIUS_ADDRESS :4004 or 0.0.0.0:$PORT
rootURL EMUARIUS_ROOT_URL http://localhost:4004
databasePath EMUARIUS_DATABASE_PATH ./emuarius.db
twitter.consumerKey EMUARIUS_TWITTER_CONSUMER_KEY
twitter.consumerSecret EMUARIUS_TWITTER_CONSUMER_SECRET
twitter.accessToken EMUARIUS_TWITTER_ACCESS_TOKEN
twitter.accessTokenSecret EMUARIUS_TWITTER_ACCESS_TOKEN_SECRET

License

MIT

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HostMeta

func HostMeta(rootURL string) *xrd.Resource

func NewSubscriptionDB

func NewSubscriptionDB(p *pubsubhubbub.Publisher, db *bolt.DB) error

Types

type Backend

type Backend struct {
	salmon.PublicKeyBackend
	// contains filtered or unexported fields
}

func NewBackend

func NewBackend(api *anaconda.TwitterApi, db *bolt.DB, rootURL string) *Backend

func (*Backend) Feed

func (be *Backend) Feed(topicURL string) (*activitystream.Feed, error)

func (*Backend) Notify

func (be *Backend) Notify(entry *activitystream.Entry) error

func (*Backend) Resource

func (be *Backend) Resource(uri string, rel []string) (*xrd.Resource, error)

func (*Backend) Subscribe

func (be *Backend) Subscribe(topicURL string, notifies chan<- pubsubhubbub.Event) error

func (*Backend) Unsubscribe

func (be *Backend) Unsubscribe(notifies chan<- pubsubhubbub.Event) error

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL