Documentation
¶
Overview ¶
Package otp provides OTP-related business logic.
Index ¶
- type Service
- func (s *Service) GetMessages(ctx context.Context, email string, limit int) ([]domain.Message, error)
- func (s *Service) GetMessagesDefault(ctx context.Context, limit int) ([]domain.Message, error)
- func (s *Service) GetOTP(ctx context.Context, email string) (*domain.OTPResult, error)
- func (s *Service) GetOTPByGrantID(ctx context.Context, grantID string) (*domain.OTPResult, error)
- func (s *Service) GetOTPDefault(ctx context.Context) (*domain.OTPResult, error)
- func (s *Service) ListAccounts() ([]domain.GrantInfo, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service handles OTP operations.
func NewService ¶
func NewService(client ports.NylasClient, grantStore ports.GrantStore, config ports.ConfigStore) *Service
NewService creates a new OTP service.
func (*Service) GetMessages ¶
func (s *Service) GetMessages(ctx context.Context, email string, limit int) ([]domain.Message, error)
GetMessages retrieves recent messages for an account.
func (*Service) GetMessagesDefault ¶
GetMessagesDefault retrieves recent messages for the default account.
func (*Service) GetOTPByGrantID ¶
GetOTPByGrantID retrieves the most recent OTP for a grant.
func (*Service) GetOTPDefault ¶
GetOTPDefault retrieves the most recent OTP for the default account.
Click to show internal directories.
Click to hide internal directories.