Versions in this module Expand all Collapse all v0 v0.0.1 Aug 18, 2025 Changes in this version + const AppIDHeader + const AppSecretHeader + const AppsPath + const DemoInboxPath + const HealthCheckPath + const TokensPath + var DecodeAppIDRequestErr = io.NewAPIError(1001, http.StatusBadRequest).With("could not decode app id request") + var DecodeTokenRequestErr = io.NewAPIError(1002, http.StatusBadRequest).With("could not decode token request") + var DecodeTokenStatusRequestErr = io.NewAPIError(1003, http.StatusBadRequest).With("could not decode token status request") + var EncodeAppIDResponseErr = io.NewAPIError(1010, http.StatusInternalServerError).With("could not encode app id response") + var EncodeTokenStatusResponseErr = io.NewAPIError(1011, http.StatusInternalServerError).With("could not encode token status response") + var GenerateEmailErr = io.NewAPIError(1031, http.StatusInternalServerError).With("could not generate email") + var GenerateTokenErr = io.NewAPIError(1030, http.StatusInternalServerError).With("could not generate token") + var InternalErr = io.NewAPIError(1033, http.StatusInternalServerError).With("internal server error") + var InvalidAppHeadersErr = io.NewAPIError(1020, http.StatusBadRequest).With("invalid app headers") + var InvalidAppIDErr = io.NewAPIError(1021, http.StatusBadRequest).With("invalid app id") + var InvalidAppSecretErr = io.NewAPIError(1022, http.StatusBadRequest).With("invalid app secret") + var InvalidDemoEmailInboxErr = io.NewAPIError(1023, http.StatusBadRequest).With("invalid demo email inbox") + var SendEmailErr = io.NewAPIError(1032, http.StatusInternalServerError).With("could not send email") + type AppIDRequest struct + Duration string + Name string + RedirectURL string + Secret string + type AppIDResponse struct + ID string + type Config struct + DemoMode bool + DemoSMTPAddr string + DemoSMTPPort int + Secret string + Server string + ServerPort int + type Service struct + func New(ctx context.Context, cfg *Config, nq notification.Queue) (*Service, error) + func (s *Service) Ping() bool + func (s *Service) Start() error + func (s *Service) Stop() + func (s *Service) WaitToShutdown() error + type TokenRequest struct + Email string + type TokenStatusRequest struct + Email string + Token string + type TokenStatusResponse struct + Expiration time.Time + Valid bool