models

package
v0.0.0-...-d18ee5a Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type App

type App struct {
	ID        int    `json:"id"`
	Name      string `json:"name"`
	Providers []int  `json:"providers"`
	APIKey    string `json:"api_key"`
}

type Attachment

type Attachment struct {
	Name string `json:"name"`
	Type string `json:"type"`
	Data string `json:"data"`
}

type Email

type Email struct {
	Name string `json:"name"`
	Addr string `json:"addr"`
}

type Mail

type Mail struct {
	ID          string       `json:"id"`
	From        Email        `json:"from"`
	To          []Email      `json:"to"`
	Subject     string       `json:"subject"`
	Text        string       `json:"text"`
	HTML        string       `json:"html"`
	Attachments []Attachment `json:"attachments"`
}

func NewMail

func NewMail(from Email, subject, text string) *Mail

func (*Mail) AddAttachment

func (m *Mail) AddAttachment(name, mimeType string, data string)

func (*Mail) AddTo

func (m *Mail) AddTo(to ...Email)

func (*Mail) Validate

func (m *Mail) Validate() (bool, error)

type Provider

type Provider struct {
	ID     int             `json:"id"`
	Name   string          `json:"name"`
	Config json.RawMessage `json:"config"`
}

Jump to

Keyboard shortcuts

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