mastodon

package
v0.20.1 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2024 License: GPL-3.0 Imports: 19 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, error)

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