service

package
v0.0.0-...-14361d2 Latest Latest
Warning

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

Go to latest
Published: May 5, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Chat

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

func NewChatService

func NewChatService(userManager manager.User, channelManager manager.Channel, messageManager manager.Message) Chat

func (Chat) AcceptInvitation

func (s Chat) AcceptInvitation(invitationCode, userUUID string) error

func (Chat) GetChannel

func (s Chat) GetChannel(channelUUID string, user model.User) (model.Channel, error)

func (Chat) GetChannelList

func (s Chat) GetChannelList(user model.User) ([]model.Channel, error)

func (Chat) IsMemberOfChannel

func (s Chat) IsMemberOfChannel(channelUUID, userUUID string) (bool, error)

type CredentialManager

type CredentialManager interface {
	SetPasswordForUser(userUUID, plainPassword string) error
}

type Register

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

func NewRegisterService

func NewRegisterService(userManager UserManager, verificationManager VerificationManager, credentialManager CredentialManager) Register

func (Register) Fulfill

func (s Register) Fulfill(registerRequest model.RegisterRequest) (user model.User, err error)

func (Register) Start

func (s Register) Start(email string) (verification model.FieldVerification, err error)

type UserManager

type UserManager interface {
	Create(user model.User) error
	FindByEmail(email string) (model.User, error)
}

type VerificationManager

type VerificationManager interface {
	CreateAndSendCode(userUUID *string, fieldName string, fieldValue string) (model.FieldVerification, error)
	FindByUUID(uuid string) (model.FieldVerification, error)
}

Jump to

Keyboard shortcuts

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