sms

package
v0.0.39 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ServiceSMS

type ServiceSMS interface {
	SendToMany(
		ctx context.Context,
		to []string,
		message string,
	) (*silcomms.BulkSMSResponse, error)
	Send(
		ctx context.Context,
		to, message string,
	) (*silcomms.BulkSMSResponse, error)
}

ServiceSMS defines the interactions with sms service

type ServiceSMSImpl

type ServiceSMSImpl struct {
	SILComms silcomms.CommsLib
}

ServiceSMSImpl defines a sms service struct

func NewService

func NewService(
	repository database.Repository,
	pubsub messaging.NotificationService,
) *ServiceSMSImpl

NewService returns a new service

func (ServiceSMSImpl) Send

func (s ServiceSMSImpl) Send(
	ctx context.Context,
	to, message string,
) (*silcomms.BulkSMSResponse, error)

Send is a method used to send to a single recipient

func (ServiceSMSImpl) SendSMS

func (s ServiceSMSImpl) SendSMS(
	ctx context.Context,
	to []string, message string,
) (*silcomms.BulkSMSResponse, error)

SendSMS is a method used to send SMS

func (ServiceSMSImpl) SendToMany

func (s ServiceSMSImpl) SendToMany(
	ctx context.Context,
	to []string,
	message string,
) (*silcomms.BulkSMSResponse, error)

SendToMany is a utility method to send to many recipients at the same time

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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