Versions in this module Expand all Collapse all v1 v1.0.0 Jan 30, 2026 Changes in this version + type ConfigService struct + func NewConfigService(config ports.ConfigStore, secrets ports.SecretStore) *ConfigService + func (s *ConfigService) EnsureConfig() (*domain.Config, bool, error) + func (s *ConfigService) GetAPIKey() (string, error) + func (s *ConfigService) GetClientID() (string, error) + func (s *ConfigService) GetClientSecret() (string, error) + func (s *ConfigService) GetOrgID() (string, error) + func (s *ConfigService) GetStatus() (*domain.ConfigStatus, error) + func (s *ConfigService) HasKeystoreCredentials() bool + func (s *ConfigService) IsConfigured() bool + func (s *ConfigService) ResetConfig() error + func (s *ConfigService) SetupConfig(region, clientID, clientSecret, apiKey, orgID string) error + func (s *ConfigService) UpdateCallbackPort(port int) error + type GrantService struct + func NewGrantService(client ports.NylasClient, grantStore ports.GrantStore, ...) *GrantService + func (s *GrantService) AddGrant(grantID, email string, provider domain.Provider, setDefault bool) error + func (s *GrantService) FetchGrantFromNylas(ctx context.Context, grantID string) (*domain.Grant, error) + func (s *GrantService) GetCurrentGrant(ctx context.Context) (*domain.GrantStatus, error) + func (s *GrantService) GetDefaultGrantID() (string, error) + func (s *GrantService) ListGrants(ctx context.Context) ([]domain.GrantStatus, error) + func (s *GrantService) SwitchGrant(grantID string) error + func (s *GrantService) SwitchGrantByEmail(email string) error + func (s *GrantService) ValidateGrant(ctx context.Context, grantID string) (bool, error) + type Service struct + func NewService(client ports.NylasClient, grantStore ports.GrantStore, ...) *Service + func (s *Service) Login(ctx context.Context, provider domain.Provider) (*domain.Grant, error) + func (s *Service) Logout(ctx context.Context) error + func (s *Service) LogoutGrant(ctx context.Context, grantID string) error