api

package
v0.4.5 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2025 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateEntityRequest

type CreateEntityRequest struct {
	ID string `json:"id"`
}

CreateEntityRequest is a struct for a request to create an entity.

type Handler

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

func NewHandler

func NewHandler(service *Service) Handler

func (Handler) CreateEntity

func (h Handler) CreateEntity(c echo.Context) error

CreateEntity handles entity creation.

func (Handler) Follow

func (h Handler) Follow(c echo.Context) error

Follow handles entity follow requests.

func (Handler) GetEntity

func (h Handler) GetEntity(c echo.Context) error

func (Handler) GetStats

func (h Handler) GetStats(c echo.Context) error

func (Handler) GetUserSettings

func (h Handler) GetUserSettings(c echo.Context) error

func (Handler) ImportNote

func (h Handler) ImportNote(c echo.Context) error

func (Handler) ResolvePerson

func (h Handler) ResolvePerson(c echo.Context) error

func (Handler) UnFollow

func (h Handler) UnFollow(c echo.Context) error

Unfollow handles entity unfollow requests.

func (Handler) UpdateEntityAliases

func (h Handler) UpdateEntityAliases(c echo.Context) error

func (Handler) UpdateUserSettings

func (h Handler) UpdateUserSettings(c echo.Context) error

type Service

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

func NewService

func NewService(
	store *store.Store,
	client client.Client,
	apclient *apclient.ApClient,
	bridge *bridge.Service,
	config types.ApConfig,
) *Service

func (*Service) CreateEntity

func (s *Service) CreateEntity(ctx context.Context, requester string, id string) (types.ApEntity, error)

func (*Service) Follow

func (s *Service) Follow(ctx context.Context, requester, targetID string) (types.ApFollow, error)

func (*Service) GetEntityByCCID

func (s *Service) GetEntityByCCID(ctx context.Context, ccid string) (types.ApEntity, error)

func (*Service) GetEntityByID

func (s *Service) GetEntityByID(ctx context.Context, id string) (types.ApEntity, error)

func (*Service) GetStats

func (s *Service) GetStats(ctx context.Context, id string) (types.AccountStats, error)

func (*Service) GetUserSettings

func (s *Service) GetUserSettings(ctx context.Context, requester string) (types.ApUserSettings, error)

func (*Service) ImportNote

func (s *Service) ImportNote(ctx context.Context, noteID, requester string) (core.Message, error)

func (*Service) ResolvePerson

func (s *Service) ResolvePerson(ctx context.Context, id, requester string) (any, error)

func (*Service) UnFollow

func (s *Service) UnFollow(ctx context.Context, requester, targetID string) (types.ApFollow, error)

func (*Service) UpdateEntityAliases

func (s *Service) UpdateEntityAliases(ctx context.Context, requester string, aliases []string) (types.ApEntity, error)

func (*Service) UpsertUserSettings

func (s *Service) UpsertUserSettings(ctx context.Context, settings types.ApUserSettings) error

type UpdateEntityAliasesRequest

type UpdateEntityAliasesRequest struct {
	Aliases []string `json:"aliases"`
}

Jump to

Keyboard shortcuts

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