messager

package
v0.0.0-...-7dcfe9a Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Message

type Message struct {
	Debug bool
	// contains filtered or unexported fields
}

func (Message) Send

func (m Message) Send(request Request) (response Response, err error)

func (*Message) SendMail

func (m *Message) SendMail(url string, request Request) (response Response, err error)

type MessageSdk

type MessageSdk interface {
	Send(request Request) (response Response, err error)
}

func NewMessage

func NewMessage(host, path string, debug bool) (m MessageSdk)

type Request

type Request struct {
	Subject  string      `json:"subject,omitempty"`
	Sender   string      `json:"sender,omitempty"`
	Receiver string      `json:"receiver,omitempty"`
	Template string      `json:"template,omitempty"`
	Params   interface{} `json:"params,omitempty"`
}

type Response

type Response struct {
	Code      interface{} `json:"code,omitempty"`
	Success   interface{} `json:"success,omitempty"`
	Message   string      `json:"message,omitempty"`
	MessageId int         `json:"messageId,omitempty"`
}

func SendMail

func SendMail(message MessageSdk, sender, tpl, subject string, params interface{}, receiverMail string) (response Response, err error)

Jump to

Keyboard shortcuts

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