notify

package
v0.7.4 Latest Latest
Warning

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

Go to latest
Published: May 12, 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 MailSender

type MailSender interface {
	Send(*SendMailRequest) error
}

MailSender 投递消息器

type SMSSender

type SMSSender interface {
	Send(*SendSMSRequest) error
}

SMSSender 短信投递

type SendMailRequest

type SendMailRequest struct {
	To      string `json:"to,omitempty" validate:"required"`
	Cc      string `json:"cc,omitempty"`
	Subject string `json:"subject,omitempty" validate:"required"`
	Content string `json:"content,omitempty" validate:"required"`
	// contains filtered or unexported fields
}

SendMailRequest todo

func NewSendMailRequest

func NewSendMailRequest() *SendMailRequest

NewSendMailRequest todo

func (*SendMailRequest) PrepareBody

func (req *SendMailRequest) PrepareBody(from string) ([]byte, error)

PrepareBody todo

func (*SendMailRequest) Validate

func (req *SendMailRequest) Validate() error

Validate todo

type SendSMSRequest

type SendSMSRequest struct {
	TemplateID     string   `json:"template_id"`
	ParamSet       []string `json:"param_set"`
	PhoneNumberSet []string `json:"phone_number_set" validate:"required"`
}

SendSMSRequest todo

func NewSendSMSRequest

func NewSendSMSRequest() *SendSMSRequest

NewSendSMSRequest todo

func (*SendSMSRequest) AddParams

func (req *SendSMSRequest) AddParams(params ...string)

AddParams todo

func (*SendSMSRequest) AddPhone

func (req *SendSMSRequest) AddPhone(params ...string)

AddPhone todo

func (*SendSMSRequest) InjectDefaultIsoCode

func (req *SendSMSRequest) InjectDefaultIsoCode()

InjectDefaultIsoCode todo

func (*SendSMSRequest) Validate

func (req *SendSMSRequest) Validate() error

Validate todo

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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