messaging

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: May 8, 2023 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MESSAGING_TIMEOUT = 30
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Channels

type Channels struct {
	// Channel for sending messages to the messaging adapter
	SMS chan map[string]string
	// Channel for sending messages to the messaging adapter
	Email chan map[string]interface{}
	// Channel for sending messages to the messaging adapter
	Whatsapp chan map[string]interface{}
}

func NewChannels

func NewChannels() *Channels

type Mailer

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

func NewMailer

func NewMailer() *Mailer

func (*Mailer) GetBody

func (m *Mailer) GetBody() string

func (*Mailer) GetMimeHeaders

func (m *Mailer) GetMimeHeaders() string

func (*Mailer) GetSubject

func (m *Mailer) GetSubject() string

func (*Mailer) GetTo

func (m *Mailer) GetTo() string

func (*Mailer) Send

func (m *Mailer) Send() error

func (*Mailer) SetBody

func (m *Mailer) SetBody(body string)

func (*Mailer) SetConfig

func (m *Mailer) SetConfig(config map[string]string)

func (*Mailer) SetMimeHeaders

func (m *Mailer) SetMimeHeaders(mimeHeaders string)

func (*Mailer) SetSubject

func (m *Mailer) SetSubject(subject string)

func (*Mailer) SetTo

func (m *Mailer) SetTo(to string)

type Rabbit added in v0.10.0

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

func NewRabbit added in v0.10.0

func NewRabbit(file string) *Rabbit

func (*Rabbit) Consume added in v0.10.0

func (r *Rabbit) Consume(queue string, callback func(amqp.Delivery)) error

func (*Rabbit) DeclareExchange added in v0.10.0

func (r *Rabbit) DeclareExchange(exchange string) error

func (*Rabbit) DeclareQueue added in v0.10.0

func (r *Rabbit) DeclareQueue(queue, exchange, routingKey string) error

func (*Rabbit) Disconnect added in v0.10.0

func (r *Rabbit) Disconnect() error

func (*Rabbit) IsConnected added in v0.10.0

func (r *Rabbit) IsConnected() bool

func (*Rabbit) Publish added in v0.10.0

func (r *Rabbit) Publish(exchange, routingKey string, body []byte) error

func (*Rabbit) PublishFromCache added in v0.10.0

func (r *Rabbit) PublishFromCache(messageService *migration.MessageService) error

type RabbitConfig added in v0.10.0

type RabbitConfig struct {
	DSN string `json:"dsn"`
	// contains filtered or unexported fields
}

func (*RabbitConfig) LoadRabbitConfig added in v0.10.0

func (r *RabbitConfig) LoadRabbitConfig(file string) error

Jump to

Keyboard shortcuts

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