Documentation ¶
Index ¶
- Variables
- func GetInboxURL(actorURI string) (string, error)
- func Subscribe(consumer *Consumer, handler *Handler, logger *log.Logger) error
- type Consumer
- type Handler
- func (h *Handler) CreateAccount(ctx context.Context, username string, name string, summary string) (acc models.Account, err error)
- func (h *Handler) GetActor(ctx context.Context, actor string) (acc models.Account, err error)
- func (h *Handler) GetFollowers(ctx context.Context, actorname string) (follower []models.Follower, err error)
- func (h *Handler) ReceiveInboxActivity(ctx context.Context, activity externalmodel.Activity) error
- func (h *Handler) SendPost(ctx context.Context, sendingActorID string, sendToURI string, content string) error
- func (h *Handler) SendPostToFollowers(ctx context.Context, sendingActorID string, content string) error
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrActorNotFound = errutil.NewError(errutil.TypeNotFound, "actor not found")
)
define errors
View Source
var (
ErrUnsupportedActivityType = errutil.NewError(errutil.TypeBadRequest, "unsupported activity type")
)
View Source
var Module = fx.Options( repository.Module, fx.Provide(ProvideHandler), fx.Provide(NewConsumer), fx.Invoke(Subscribe), )
Functions ¶
func GetInboxURL ¶
Types ¶
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
func ProvideHandler ¶
func ProvideHandler(config config.Config, store *store.Store[repository.ActivityHubRepository]) *Handler
func (*Handler) CreateAccount ¶
func (*Handler) GetFollowers ¶
func (*Handler) ReceiveInboxActivity ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.