sms

package
v0.0.40 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2024 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 AuthServerImpl added in v0.0.40

type AuthServerImpl interface {
	LoginUser(ctx context.Context, input *authutils.LoginUserPayload) (*authutils.OAUTHResponse, error)
	RefreshToken(ctx context.Context, refreshToken string) (*authutils.OAUTHResponse, error)
}

AuthServerImpl defines the methods provided by the auth server library

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,
	authService AuthServerImpl,
) *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