service

package
v0.0.0-...-02ad720 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2024 License: AGPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FederationService

type FederationService interface {
	SendToInbox(ctx context.Context, author *entity.User, target *entity.User, object any) ([]byte, error)
	GetUser(ctx context.Context, uri *versiautils.URL) (*versia.User, error)

	DiscoverUser(ctx context.Context, baseURL, username string) (*webfinger.User, error)
	DiscoverInstance(ctx context.Context, baseURL string) (*versia.InstanceMetadata, error)
}

type FollowService

type FollowService interface {
	NewFollow(ctx context.Context, follower, followee *entity.User) (*entity.Follow, error)
	GetFollow(ctx context.Context, id uuid.UUID) (*entity.Follow, error)

	ImportVersiaFollow(ctx context.Context, lFollow *versia.Follow) (*entity.Follow, error)
}

type InboxService

type InboxService interface {
	Handle(ctx context.Context, obj any, userId uuid.UUID) error
}

type InstanceMetadataService

type InstanceMetadataService interface {
	Ours(ctx context.Context) (*entity.InstanceMetadata, error)
}

type NoteService

type NoteService interface {
	CreateNote(ctx context.Context, req api_schema.CreateNoteRequest) (*entity.Note, error)
	GetNote(ctx context.Context, id uuid.UUID) (*entity.Note, error)

	ImportVersiaNote(ctx context.Context, lNote *versia.Note) (*entity.Note, error)
}

type RequestSigner

type RequestSigner interface {
	SignAndSend(c *fiber.Ctx, signer versiacrypto.Signer, body any) error
}

type TaskService

type TaskService interface {
	ScheduleTask(ctx context.Context, type_ string, data any) error
}

type UserService

type UserService interface {
	WithRepositories(repositories repository.Manager) UserService

	NewUser(ctx context.Context, username, password string) (*entity.User, error)

	GetLocalUserByID(ctx context.Context, id uuid.UUID) (*entity.User, error)

	GetWebfingerForUser(ctx context.Context, userID string) (*webfinger.User, error)

	Search(ctx context.Context, req api_schema.SearchUserRequest) (*entity.User, error)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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