activitypub

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: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultStartTime int64

Functions

func GetTimestampStart

func GetTimestampStart() int64

func NewSource

func NewSource(config *config.Module, checkpoint *engine.Checkpoint, databaseClient database.Client) (engine.DataSource, error)

NewSource creates a new data protocol instance

Types

type Option

type Option struct {
	KafkaTopic     string `json:"kafka_topic"`
	TimestampStart int64  `json:"timestamp_start" mapstructure:"timestamp_start"`
}

Option represents the configuration options for the ActivityPub client.

func NewOption

func NewOption(n network.Network, parameters *config.Parameters) (*Option, error)

NewOption creates a new Option instance from the provided parameters.

type State

type State struct {
	LastOffset int64 `json:"last_offset"`
}

State represents the state of the ActivityPub data protocol.

type Task

type Task struct {
	Network network.Network
	Message activitypub.Object
}

func (Task) BuildActivity

func (t Task) BuildActivity(options ...activityx.Option) (*activityx.Activity, error)

func (Task) GetNetwork

func (t Task) GetNetwork() network.Network

func (Task) GetTimestamp

func (t Task) GetTimestamp() uint64

func (Task) ID

func (t Task) ID() string

func (Task) Validate

func (t Task) Validate() error

Jump to

Keyboard shortcuts

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