service

package
v0.0.0-...-224a6a0 Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2022 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EMAIL_SUBJECT_MAX_LENGTH = 70
	EMAIL_SUBJECT_MIN_LENGTH = 1
)
View Source
const (
	PUSH_MAX_LENGTH = 240
	PUSH_MIN_LENGTH = 1
)
View Source
const (
	SMS_MAX_LENGTH = 160
	SMS_MIN_LENGTH = 1
)

Variables

View Source
var (
	ErrEmailGeneric        = internal.NewError("Email delivery failed")
	ErrEmailInvalid        = internal.NewError("Email receiver invalid")
	ErrEmailInvalidSubject = internal.NewError("Email subject invalid")
)
View Source
var (
	ErrPushGeneric        = internal.NewError("Push delivery failed")
	ErrPushInvalidMessage = internal.NewError("Push message invalid")
)
View Source
var (
	ErrSMSGeneric        = internal.NewError("SMS delivery failed")
	ErrSMSInvalidPhone   = internal.NewError("SMS receiver phone invalid")
	ErrSMSInvalidMessage = internal.NewError("SMS message invalid")
)

Functions

This section is empty.

Types

type EmailService

type EmailService struct {
	class.Service
	// contains filtered or unexported fields
}

func NewEmailService

func NewEmailService(configuration internal.Configuration, logger core.Logger) *EmailService

func (*EmailService) Close

func (self *EmailService) Close(ctx context.Context) error

func (*EmailService) Send

func (self *EmailService) Send(receiverEmail string, subject string, body string) error

type PushService

type PushService struct {
	class.Service
}

func NewPushService

func NewPushService(configuration internal.Configuration, logger core.Logger) *PushService

func (*PushService) Close

func (self *PushService) Close(ctx context.Context) error

func (*PushService) Send

func (self *PushService) Send(receiverSubscription string, message string) error

type SMSService

type SMSService struct {
	class.Service
	// contains filtered or unexported fields
}

func NewSMSService

func NewSMSService(configuration internal.Configuration, logger core.Logger) *SMSService

func (*SMSService) Close

func (self *SMSService) Close(ctx context.Context) error

func (*SMSService) Send

func (self *SMSService) Send(receiverPhone string, message string) error

Jump to

Keyboard shortcuts

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