Help us shape the future of Go! Take the 2026 Go Developer Survey

sms

package
v1.21.2 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2026 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Overview

Package sms holds the queue handler that sends verification-code text messages through the configured provider and audits every attempt.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Dependencies

type Dependencies struct {
	Logs   repository.LogRepo
	Mobile func() config.MobileConfig
}

Dependencies are the SMS task's: the message log (the platform kernel's) and the runtime settings.

type SendSmsHandler added in v1.21.0

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

SendSmsHandler sends the verification code a task carries through the configured provider. The attempt is written to the message log before the provider call and finalized after it; once the provider was called the task is not retried, even on an error, because a failed call may still have delivered the code.

func NewSendSmsHandler added in v1.21.0

func NewSendSmsHandler(deps Dependencies) *SendSmsHandler

NewSendSmsHandler builds the handler over the message log and the runtime mobile settings.

func (*SendSmsHandler) ProcessTask added in v1.21.0

func (h *SendSmsHandler) ProcessTask(ctx context.Context, task *asynq.Task) error

Jump to

Keyboard shortcuts

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