service

package
v0.0.0-...-b743e6f Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2024 License: AGPL-3.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const NoBot = "#nobot"

Variables

View Source
var ErrInvalid = errors.New("invalid argument")
View Source
var ErrNoAccept = errors.New("follow request is not accepted yet")
View Source
var ErrNoBot = errors.New(fmt.Sprintf("actor or activity contains the %s tag", NoBot))

Functions

func ActivityHasNoBotTag

func ActivityHasNoBotTag(a util.ActivityTags) (contains bool)

func ActorHasNoBotTag

func ActorHasNoBotTag(o util.ObjectTags) (contains bool)

Types

type Service

type Service interface {
	RequestFollow(ctx context.Context, addr, groupId, userId, subId, term string) (url string, err error)

	HandleActivity(
		ctx context.Context,
		actorIdLocal, pubKeyId string,
		actor vocab.Actor,
		actorTags util.ObjectTags,
		activity vocab.Activity,
		activityTags util.ActivityTags,
	) (post func(), err error)

	Read(ctx context.Context, url vocab.IRI) (src model.Source, err error)

	List(
		ctx context.Context,
		filter model.Filter,
		limit uint32,
		cursor string,
		order model.Order,
	) (
		page []string,
		err error,
	)

	Unfollow(ctx context.Context, url vocab.IRI, groupId, userId string) (err error)
}

func NewLogging

func NewLogging(svc Service, log *slog.Logger) Service

func NewService

func NewService(
	stor storage.Storage,
	ap activitypub.Service,
	hostSelf string,
	conv converter.Service,
	w writer.Service,
	r reader.Service,
	cbUrlBase string,
) Service

func NewServiceMock

func NewServiceMock() Service

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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