sms

package
v0.0.0-...-736cfa7 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ProviderTwilio = "twilio"
	ProviderVonage = "vonage"
)

Provider options

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Provider  string // "twilio", "vonage", etc.
	AccountID string // SID for Twilio, API Key for Vonage
	Token     string // Auth Token for Twilio, API Secret for Vonage
	From      string // Sender ID or phone number
}

Config holds the SMS provider configuration

type Service

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

Service handles SMS operations

func NewService

func NewService(config Config) *Service

NewService creates a new SMS service

func (*Service) SendOTP

func (s *Service) SendOTP(to, otp string) error

SendOTP sends an OTP to the specified phone number

Jump to

Keyboard shortcuts

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