message

package
v0.0.0-...-cba5bb6 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2020 License: Zlib Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EnqueueMail

func EnqueueMail(db *gorm.DB, userID uint64, subj string, text string) error

func EnqueueVerificationMail

func EnqueueVerificationMail(db *gorm.DB, userID uint64, subj string, text string) error

func Hostname

func Hostname() string

func MustHaveInfo

func MustHaveInfo()

func MustHaveMonitoring

func MustHaveMonitoring()

func MustHavePanic

func MustHavePanic()

func SendSlack

func SendSlack(webhook string, title string, body string) error

func SendSlackDefault

func SendSlackDefault(title, body string)

func SendSlackInfo

func SendSlackInfo(title, body string)

func SendSlackMonitoring

func SendSlackMonitoring(title, body string)

func Sendmail

func Sendmail(key string, sm Message) error

func SlackPanic

func SlackPanic(topic string)

Types

type EmailQueueItem

type EmailQueueItem struct {
	ID     uint64 `gorm:"primary_key"`
	UserID uint64 `gorm:"type:bigint not null REFERENCES users(id)"`
	UUID   string `gorm:"type:varchar(255) not null unique"`

	EmailText    string `gorm:"not null;type:text"`
	EmailSubject string `gorm:"not null;type:text"`
	LastError    string `gorm:"type:text"`

	UserScore             uint64
	SentAt                time.Time
	Sent                  bool
	IsVerificationMessage bool
	AcknowledgedAt        time.Time
	CreatedAt             time.Time
	UpdatedAt             time.Time
}

type Message

type Message struct {
	From        string
	To          []string
	Subject     string
	Body        string
	ContentType string
}

type Slack

type Slack struct {
	Title    string   `json:"title"`
	Text     string   `json:"text"`
	MrkdwnIn []string `json:"mrkdwn_in"`
}

Jump to

Keyboard shortcuts

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