mastodon

package
v0.19.1 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2023 License: GPL-3.0 Imports: 18 Imported by: 0

Documentation

Overview

Package mastodon implements the mastodon daemon service.

Index

Constants

This section is empty.

Variables

View Source
var ErrServiceClosed = errors.New("mastodon: Service closed")

ErrServiceClosed is returned by the Service's Serve method after a call to Shutdown.

Functions

This section is empty.

Types

type Mastodon

type Mastodon struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

Mastodon represents a Mastodon service in the application

func New

func New(ctx context.Context, opts service.Options) *Mastodon

New mastodon struct.

func (*Mastodon) Serve

func (m *Mastodon) Serve() error

Serve loop request direct messages from the Mastodon instance. Serve always returns a nil error.

func (*Mastodon) Shutdown added in v0.16.0

func (m *Mastodon) Shutdown() error

Shutdown shuts down the Mastodon service, it always retuan a nil error.

func (*Mastodon) ToMastodon added in v0.19.0

func (m *Mastodon) ToMastodon(ctx context.Context, text, id string) bool

Jump to

Keyboard shortcuts

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