otp

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package otp provides OTP-related business logic.

Index

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

func (s *Service) GetMessagesDefault(ctx context.Context, limit int) ([]domain.Message, error)

GetMessagesDefault retrieves recent messages for the default account.

func (*Service) GetOTP

func (s *Service) GetOTP(ctx context.Context, email string) (*domain.OTPResult, error)

GetOTP retrieves the most recent OTP for an account.

func (*Service) GetOTPByGrantID

func (s *Service) GetOTPByGrantID(ctx context.Context, grantID string) (*domain.OTPResult, error)

GetOTPByGrantID retrieves the most recent OTP for a grant.

func (*Service) GetOTPDefault

func (s *Service) GetOTPDefault(ctx context.Context) (*domain.OTPResult, error)

GetOTPDefault retrieves the most recent OTP for the default account.

func (*Service) ListAccounts

func (s *Service) ListAccounts() ([]domain.GrantInfo, error)

ListAccounts returns all configured accounts.

Jump to

Keyboard shortcuts

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