api

package
v0.0.0-...-afd247e Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2020 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SendEmail

func SendEmail(email EmailRequest) error

SendEmail 发送信息

func SendTxt

func SendTxt(txt TxtRequest) error

SendTxt 发送信息

Types

type EmailRequest

type EmailRequest struct {
	Sender     string   `json:"sender" valid:"email"`
	Recipients []string `json:"recipients" valid:"required"`
	Subject    string   `json:"subject" valid:"stringlength(0|50)"`
	HTMLBody   string   `json:"htmlBody" valid:"required"`
	TextBody   string   `json:"textBody" valid:"required"`
	CharSet    string   `json:"charSet" valid:"required"`
}

EmailRequest .

type TxtRequest

type TxtRequest struct {
	Number  string `json:"number" valid:"numeric,stringlength(8|11)"`
	Message string `json:"message" valid:"stringlength(0|255)"`
}

TxtRequest .

Jump to

Keyboard shortcuts

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