Documentation ¶
Index ¶
- Variables
- func NewFollowRepositoryImpl(db *ent.Client, log logr.Logger, telemetry *unitel.Telemetry) repository.FollowRepository
- func NewInstanceMetadataRepositoryImpl(federationService service.FederationService, db *ent.Client, log logr.Logger, ...) repository.InstanceMetadataRepository
- func NewNoteRepositoryImpl(db *ent.Client, log logr.Logger, telemetry *unitel.Telemetry) repository.NoteRepository
- func NewUserRepositoryImpl(federationService service.FederationService, db *ent.Client, log logr.Logger, ...) repository.UserRepository
- type Factory
- type FollowRepositoryImpl
- func (i FollowRepositoryImpl) AcceptFollow(ctx context.Context, follower, followee *entity.User) error
- func (i FollowRepositoryImpl) Follow(ctx context.Context, follower, followee *entity.User) (*entity.Follow, error)
- func (i FollowRepositoryImpl) GetByID(ctx context.Context, id uuid.UUID) (*entity.Follow, error)
- func (i FollowRepositoryImpl) RejectFollow(ctx context.Context, follower, followee *entity.User) error
- func (i FollowRepositoryImpl) Unfollow(ctx context.Context, follower, followee *entity.User) error
- type InstanceMetadataRepositoryImpl
- type ManagerImpl
- func (i *ManagerImpl) Atomic(ctx context.Context, fn func(ctx context.Context, tx repository.Manager) error) error
- func (i *ManagerImpl) Follows() repository.FollowRepository
- func (i *ManagerImpl) InstanceMetadata() repository.InstanceMetadataRepository
- func (i *ManagerImpl) Notes() repository.NoteRepository
- func (i *ManagerImpl) Users() repository.UserRepository
- type NoteRepositoryImpl
- func (i *NoteRepositoryImpl) GetByID(ctx context.Context, id uuid.UUID) (*entity.Note, error)
- func (i *NoteRepositoryImpl) ImportVersiaNote(ctx context.Context, lNote *versia.Note) (*entity.Note, error)
- func (i *NoteRepositoryImpl) NewNote(ctx context.Context, author *entity.User, content string, ...) (*entity.Note, error)
- type UserRepositoryImpl
- func (i *UserRepositoryImpl) Discover(ctx context.Context, domain, username string) (*entity.User, error)
- func (i *UserRepositoryImpl) GetByID(ctx context.Context, uid uuid.UUID) (*entity.User, error)
- func (i *UserRepositoryImpl) GetLocalByID(ctx context.Context, uid uuid.UUID) (*entity.User, error)
- func (i *UserRepositoryImpl) GetLocalByUsername(ctx context.Context, username string) (*entity.User, error)
- func (i *UserRepositoryImpl) ImportVersiaUserByURI(ctx context.Context, uri *versiautils.URL) (*entity.User, error)
- func (i *UserRepositoryImpl) LookupByURI(ctx context.Context, uri *versiautils.URL) (*entity.User, error)
- func (i *UserRepositoryImpl) LookupByURIs(ctx context.Context, uris []versiautils.URL) ([]*entity.User, error)
- func (i *UserRepositoryImpl) LookupLocalByIDOrUsername(ctx context.Context, idOrUsername string) (*entity.User, error)
- func (i *UserRepositoryImpl) NewUser(ctx context.Context, username, password string, priv ed25519.PrivateKey, ...) (*entity.User, error)
- func (i *UserRepositoryImpl) Resolve(ctx context.Context, uri *versiautils.URL) (*entity.User, error)
- func (i *UserRepositoryImpl) ResolveMultiple(ctx context.Context, uris []versiautils.URL) ([]*entity.User, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrFollowAlreadyExists = errors.New("follow already exists")
View Source
var (
ErrUsernameTaken = errors.New("username taken")
)
Functions ¶
func NewFollowRepositoryImpl ¶
func NewFollowRepositoryImpl(db *ent.Client, log logr.Logger, telemetry *unitel.Telemetry) repository.FollowRepository
func NewInstanceMetadataRepositoryImpl ¶
func NewInstanceMetadataRepositoryImpl(federationService service.FederationService, db *ent.Client, log logr.Logger, telemetry *unitel.Telemetry) repository.InstanceMetadataRepository
func NewNoteRepositoryImpl ¶
func NewNoteRepositoryImpl(db *ent.Client, log logr.Logger, telemetry *unitel.Telemetry) repository.NoteRepository
func NewUserRepositoryImpl ¶
func NewUserRepositoryImpl(federationService service.FederationService, db *ent.Client, log logr.Logger, telemetry *unitel.Telemetry) repository.UserRepository
Types ¶
type FollowRepositoryImpl ¶
type FollowRepositoryImpl struct {
// contains filtered or unexported fields
}
func (FollowRepositoryImpl) AcceptFollow ¶
func (FollowRepositoryImpl) RejectFollow ¶
type InstanceMetadataRepositoryImpl ¶
type InstanceMetadataRepositoryImpl struct {
// contains filtered or unexported fields
}
func (*InstanceMetadataRepositoryImpl) GetByHost ¶
func (i *InstanceMetadataRepositoryImpl) GetByHost(ctx context.Context, host string) (*entity.InstanceMetadata, error)
func (*InstanceMetadataRepositoryImpl) ImportFromVersiaByURI ¶
func (i *InstanceMetadataRepositoryImpl) ImportFromVersiaByURI(ctx context.Context, uri *versiautils.URL) (*entity.InstanceMetadata, error)
type ManagerImpl ¶
type ManagerImpl struct {
// contains filtered or unexported fields
}
func NewManagerImpl ¶
func NewManagerImpl( db *ent.Client, telemetry *unitel.Telemetry, log logr.Logger, userRepositoryFunc Factory[repository.UserRepository], noteRepositoryFunc Factory[repository.NoteRepository], followRepositoryFunc Factory[repository.FollowRepository], instanceMetadataRepositoryFunc Factory[repository.InstanceMetadataRepository], ) *ManagerImpl
func (*ManagerImpl) Atomic ¶
func (i *ManagerImpl) Atomic(ctx context.Context, fn func(ctx context.Context, tx repository.Manager) error) error
func (*ManagerImpl) Follows ¶
func (i *ManagerImpl) Follows() repository.FollowRepository
func (*ManagerImpl) InstanceMetadata ¶
func (i *ManagerImpl) InstanceMetadata() repository.InstanceMetadataRepository
func (*ManagerImpl) Notes ¶
func (i *ManagerImpl) Notes() repository.NoteRepository
func (*ManagerImpl) Users ¶
func (i *ManagerImpl) Users() repository.UserRepository
type NoteRepositoryImpl ¶
type NoteRepositoryImpl struct {
// contains filtered or unexported fields
}
func (*NoteRepositoryImpl) ImportVersiaNote ¶
type UserRepositoryImpl ¶
type UserRepositoryImpl struct {
// contains filtered or unexported fields
}
func (*UserRepositoryImpl) GetLocalByID ¶
func (*UserRepositoryImpl) GetLocalByUsername ¶
func (*UserRepositoryImpl) ImportVersiaUserByURI ¶
func (i *UserRepositoryImpl) ImportVersiaUserByURI(ctx context.Context, uri *versiautils.URL) (*entity.User, error)
func (*UserRepositoryImpl) LookupByURI ¶
func (i *UserRepositoryImpl) LookupByURI(ctx context.Context, uri *versiautils.URL) (*entity.User, error)
func (*UserRepositoryImpl) LookupByURIs ¶
func (i *UserRepositoryImpl) LookupByURIs(ctx context.Context, uris []versiautils.URL) ([]*entity.User, error)
func (*UserRepositoryImpl) LookupLocalByIDOrUsername ¶
func (*UserRepositoryImpl) Resolve ¶
func (i *UserRepositoryImpl) Resolve(ctx context.Context, uri *versiautils.URL) (*entity.User, error)
func (*UserRepositoryImpl) ResolveMultiple ¶
func (i *UserRepositoryImpl) ResolveMultiple(ctx context.Context, uris []versiautils.URL) ([]*entity.User, error)
Click to show internal directories.
Click to hide internal directories.