domain

package
v0.0.0-...-706d53e Latest Latest
Warning

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

Go to latest
Published: Dec 29, 2022 License: Apache-2.0 Imports: 30 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrFollowMismatchDomain = errors.New("unable to follow an user outside this instance")
View Source
var ErrUserDoesNotExist = errors.New("user does not exist")

Functions

func NewInboxService

func NewInboxService(
	log logger.Logger,
	database database.Database,
	actorRepository repository.ActorRepository,
	userRepo repository.UserRepository,
	keyService crypto.KeyManager,
	activityPubClient activitypubclient.ActivityPubClient,
	vocabService activitypub.VocabService,
	worker client.BackgroundWorkerClient,
	authorizationChecker authorization.AuthorizationChecker,
	config config.Config,
) *inboxService

func NewTweetService

func NewTweetService(
	logger logger.Logger,
	userService UserService,
	tweeterClient twitter.TwitterClient,
	tweetRepo repository.TweetRepository,
) *tweetService

func NewUserService

func NewUserService(
	log logger.Logger,
	manager crypto.KeyManager,
	userRepo repository.UserRepository,
	client twitter.TwitterClient,
) *userService

Types

type ActorNotAllowedError

type ActorNotAllowedError struct {
	// contains filtered or unexported fields
}

func (*ActorNotAllowedError) Actor

func (e *ActorNotAllowedError) Actor() string

func (*ActorNotAllowedError) Error

func (e *ActorNotAllowedError) Error() string

type InboxFollowRequest

type InboxFollowRequest struct {
	Actor string
}

type InboxService

type InboxService interface {
	Follow(context.Context, vocab.ActivityStreamsFollow) error
	UnFollow(context.Context, vocab.ActivityStreamsUndo) error
}

type TweetService

type TweetService interface {
	SaveTweetAndReferences(context.Context, string) (*twittermodels.Tweet, error)
}

type TwitterUserDoesNotExistError

type TwitterUserDoesNotExistError struct {
	Username string
}

func (*TwitterUserDoesNotExistError) Error

type UnsuportedUndoObjectError

type UnsuportedUndoObjectError struct {
	VocabType vocab.Type
}

func (*UnsuportedUndoObjectError) Error

func (u *UnsuportedUndoObjectError) Error() string

type UserService

type UserService interface {
	GetFullUser(context.Context, string) (*domainmodels.User, error)
	BatchCreateUsersFromIDs(context.Context, []string) ([]*models.User, error)
	BatchCreateUsers(ctx context.Context, allowedTwitterUsers []string) error
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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