svc_impls

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: 31 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrSignatureValidationFailed = errors.New("signature validation failed")
)

Functions

This section is empty.

Types

type FederationServiceImpl

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

func NewFederationServiceImpl

func NewFederationServiceImpl(httpClient *http.Client, telemetry *unitel.Telemetry, log logr.Logger) *FederationServiceImpl

func (*FederationServiceImpl) DiscoverInstance

func (i *FederationServiceImpl) DiscoverInstance(ctx context.Context, baseURL string) (*versia.InstanceMetadata, error)

func (*FederationServiceImpl) DiscoverUser

func (i *FederationServiceImpl) DiscoverUser(ctx context.Context, baseURL, username string) (*webfinger.User, error)

func (*FederationServiceImpl) GetUser

func (*FederationServiceImpl) SendToInbox

func (i *FederationServiceImpl) SendToInbox(ctx context.Context, author *entity.User, user *entity.User, object any) ([]byte, error)

type FollowServiceImpl

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

func NewFollowServiceImpl

func NewFollowServiceImpl(federationService service.FederationService, repositories repository.Manager, telemetry *unitel.Telemetry, log logr.Logger) *FollowServiceImpl

func (FollowServiceImpl) GetFollow

func (i FollowServiceImpl) GetFollow(ctx context.Context, id uuid.UUID) (*entity.Follow, error)

func (FollowServiceImpl) ImportVersiaFollow

func (i FollowServiceImpl) ImportVersiaFollow(ctx context.Context, lFollow *versia.Follow) (*entity.Follow, error)

func (FollowServiceImpl) NewFollow

func (i FollowServiceImpl) NewFollow(ctx context.Context, follower, followee *entity.User) (*entity.Follow, error)

type InboxServiceImpl

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

func NewInboxService

func NewInboxService(federationService service.FederationService, repositories repository.Manager, telemetry *unitel.Telemetry, log logr.Logger) *InboxServiceImpl

func (InboxServiceImpl) Handle

func (i InboxServiceImpl) Handle(ctx context.Context, obj any, userId uuid.UUID) error

func (InboxServiceImpl) WithRepositories

func (i InboxServiceImpl) WithRepositories(repositories repository.Manager) service.InboxService

type InstanceMetadataServiceImpl

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

func NewInstanceMetadataServiceImpl

func NewInstanceMetadataServiceImpl(federationService service.FederationService, repositories repository.Manager, telemetry *unitel.Telemetry, log logr.Logger) *InstanceMetadataServiceImpl

func (InstanceMetadataServiceImpl) Ours

type NoteServiceImpl

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

func NewNoteServiceImpl

func NewNoteServiceImpl(federationService service.FederationService, taskService service.TaskService, repositories repository.Manager, telemetry *unitel.Telemetry, log logr.Logger) *NoteServiceImpl

func (NoteServiceImpl) CreateNote

func (NoteServiceImpl) GetNote

func (i NoteServiceImpl) GetNote(ctx context.Context, id uuid.UUID) (*entity.Note, error)

func (NoteServiceImpl) ImportVersiaNote

func (i NoteServiceImpl) ImportVersiaNote(ctx context.Context, lNote *versia.Note) (*entity.Note, error)

type RequestSignerImpl

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

func NewRequestSignerImpl

func NewRequestSignerImpl(telemetry *unitel.Telemetry, log logr.Logger) *RequestSignerImpl

func (*RequestSignerImpl) SignAndSend

func (i *RequestSignerImpl) SignAndSend(c *fiber.Ctx, signer versiacrypto.Signer, body any) error

type ResponseError

type ResponseError struct {
	StatusCode int
	URL        *url.URL
}

func (*ResponseError) Error

func (e *ResponseError) Error() string

type TaskServiceImpl

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

func NewTaskServiceImpl

func NewTaskServiceImpl(client *taskqueue.Client, telemetry *unitel.Telemetry, log logr.Logger) *TaskServiceImpl

func (TaskServiceImpl) ScheduleTask

func (i TaskServiceImpl) ScheduleTask(ctx context.Context, type_ string, data any) error

type UserServiceImpl

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

func NewUserServiceImpl

func NewUserServiceImpl(repositories repository.Manager, federationService service.FederationService, telemetry *unitel.Telemetry, log logr.Logger) *UserServiceImpl

func (UserServiceImpl) GetLocalUserByID

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

func (UserServiceImpl) GetWebfingerForUser

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

func (UserServiceImpl) NewUser

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

func (UserServiceImpl) Search

func (UserServiceImpl) WithRepositories

func (i UserServiceImpl) WithRepositories(repositories repository.Manager) service.UserService

Jump to

Keyboard shortcuts

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