sms

package
v0.0.0-...-4780336 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SMS_MESSAGE_TYPE_VERIFY_PHONE_NUMBER = "verify-phone-number"
	SMS_MESSAGE_TYPE_OTP                 = "otp"
)

Variables

View Source
var (
	SmsGatewayConfig *types.SMSGatewayConfig
	MessageDBService *messageDB.MessagingDBService
)

Functions

func Init

func Init(
	smsGatewayConfig *types.SMSGatewayConfig,
	mdb *messageDB.MessagingDBService,
)

func SendSMS

func SendSMS(instanceID string, to string, userID string, messageType string, lang string, payload map[string]string) error

Types

type SMSAuth

type SMSAuth struct {
	Producttoken string `json:"producttoken"`
}

type SMSBody

type SMSBody struct {
	Type    string `json:"type"`
	Content string `json:"content"`
}

type SMSSendingReq

type SMSSendingReq struct {
	Messages struct {
		Authentication SMSAuth     `json:"authentication"`
		Msg            []SingleSMS `json:"msg"`
	} `json:"messages"`
}

type SMSTo

type SMSTo struct {
	Number string `json:"number"`
}

type SingleSMS

type SingleSMS struct {
	AllowedChannels []string `json:"allowedChannels"`
	From            string   `json:"from"`
	To              []SMSTo  `json:"to"`
	Body            SMSBody  `json:"body"`
}

Jump to

Keyboard shortcuts

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