mastodon

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultTimeout  = 3 * time.Second
	DefaultAttempts = 2
)
View Source
const (
	InReplyTo           = "inReplyTo"
	TagType             = "type"
	TagName             = "name"
	Attachment          = "attachment"
	AttachmentURL       = "url"
	AttachmentMediaType = "mediaType"
	Tag                 = "tag"
	TagTypeHashtag      = "Hashtag"
	TagTypeMention      = "Mention"
	KafkaTopic          = "kafka_topic"
)

Variables

This section is empty.

Functions

func MessageTypeStrings

func MessageTypeStrings() []string

MessageTypeStrings returns a slice of all String values of the enum

Types

type Client

type Client interface {
	GetKafkaConsumer() *kgo.Client
}

func NewClient

func NewClient(endpoint string, kafkaTopic string, offset *int64) (Client, error)

type MessageType

type MessageType int
const (
	MessageTypeNone     MessageType = iota // Invalid default value
	MessageTypeCreate                      // Create ActivityPub message
	MessageTypeAnnounce                    // Announce ActivityPub message
	MessageTypeLike                        // Like ActivityPub message
)

func MessageTypeString

func MessageTypeString(s string) (MessageType, error)

MessageTypeString retrieves an enum value from the enum constants string name. Throws an error if the param is not part of the enum.

func MessageTypeValues

func MessageTypeValues() []MessageType

MessageTypeValues returns all values of the enum

func (MessageType) IsAMessageType

func (i MessageType) IsAMessageType() bool

IsAMessageType returns "true" if the value is listed in the enum definition. "false" otherwise

func (MessageType) String

func (i MessageType) String() string

func (MessageType) Values

func (MessageType) Values() []string

Jump to

Keyboard shortcuts

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