out

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 8, 2021 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Execute

func Execute(sourceRoot, version string, input []byte) (string, error)

Execute - provides out capability

func LoginAuth added in v1.0.13

func LoginAuth(username, password string) smtp.Auth

Types

type Input

type Input struct {
	Source Source `json:"source"`
	Params Params `json:"params"`
}

Input - Struct that represents the input to out

type Mail added in v1.0.16

type Mail interface {
	From(string)
	To(...string)
	Cc(...string)
	Bcc(...string)
	Subject(string)
	AddHeader(name, value string)
	Attach(name string, r io.Reader)
	Plain() *mailyak.BodyPart
	HTML() *mailyak.BodyPart
	MimeBuf() (*bytes.Buffer, error)
}

type MailCreator added in v1.0.16

type MailCreator struct {
	Mail                Mail
	From, Subject, Body string
	To, CC, BCC         []string
	// contains filtered or unexported fields
}

func NewMailCreator added in v1.0.16

func NewMailCreator() *MailCreator

func (*MailCreator) AddAttachment added in v1.0.16

func (m *MailCreator) AddAttachment(filePath string) error

func (*MailCreator) AddHeader added in v1.0.16

func (m *MailCreator) AddHeader(key, value string)

func (*MailCreator) Compose added in v1.0.16

func (m *MailCreator) Compose() ([]byte, error)

type MetadataItem

type MetadataItem struct {
	Name  string
	Value string
}

MetadataItem - metadata within output

type Output

type Output struct {
	Version struct {
		Time time.Time
	} `json:"version"`
	Metadata []MetadataItem
}

Output - represents output from out

type Params added in v1.0.13

type Params struct {
	Subject         string
	SubjectText     string `json:"subject_text"`
	Body            string
	BodyText        string `json:"body_text"`
	SendEmptyBody   bool   `json:"send_empty_body"`
	Headers         string
	HeadersText     string   `json:"headers_text"`
	To              string   `json:"to"`
	ToText          string   `json:"to_text"`
	Cc              string   `json:"cc"`
	CcText          string   `json:"cc_text"`
	Bcc             string   `json:"bcc"`
	BccText         string   `json:"bcc_text"`
	Debug           string   `json:"debug"`
	AttachmentGlobs []string `json:"attachment_globs"`
}

type SMTP added in v1.0.13

type SMTP struct {
	Host              string
	Port              string
	Username          string
	Password          string
	Anonymous         bool   `json:"anonymous"`
	SkipSSLValidation bool   `json:"skip_ssl_validation"`
	CaCert            string `json:"ca_cert"`
	HostOrigin        string `json:"host_origin"`
	LoginAuth         bool   `json:"login_auth"`
}

type Sender added in v1.0.15

type Sender struct {
	HostOrigin                              string
	CaCert                                  string
	Anonymous, LoginAuth, SkipSSLValidation bool

	From string
	To   []string
	// contains filtered or unexported fields
}

func NewSender added in v1.0.15

func NewSender(host, port, username, password string, debug bool, logger *log.Logger) *Sender

func (*Sender) AddAttachment added in v1.0.15

func (s *Sender) AddAttachment(filePath string) error

func (*Sender) Send added in v1.0.15

func (s *Sender) Send(msg []byte) error

type Source added in v1.0.13

type Source struct {
	SMTP SMTP `json:"smtp"`
	From string
	To   []string
	Cc   []string
	Bcc  []string
}

Directories

Path Synopsis
Code generated by counterfeiter.
Code generated by counterfeiter.

Jump to

Keyboard shortcuts

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