event

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2022 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrDataIsNil = errors.New("data is nil")
)

Functions

This section is empty.

Types

type Attachment added in v0.0.2

type Attachment struct {
	Name string `json:"name,omitempty"`
	Path string `json:"path,omitempty"`
}

type DaprEvent

type DaprEvent struct {
	Topic           string `json:"topic"`
	Pubsubname      string `json:"pubsubname"`
	Traceid         string `json:"traceid"`
	ID              string `json:"id"`
	Datacontenttype string `json:"datacontenttype"`
	Data            Data   `json:"data"`
	Type            string `json:"type"`
	Specversion     string `json:"specversion"`
	Source          string `json:"source"`
}

type Data

type Data struct {
	*LetterSpec `json:"letter,omitempty"`
	*EmailSpec  `json:"email,omitempty"`
}

type EmailSpec

type EmailSpec struct {
	To          []string     `json:"to,omitempty"`
	Title       string       `json:"title,omitempty"`
	ContentType string       `json:"content_type,omitempty"`
	Content     string       `json:"content,omitempty"`
	Attachments []Attachment `json:"attachments,omitempty"`
}

type LetterSpec

type LetterSpec struct {
	ID      string   `json:"id,omitempty"`
	UUID    []string `json:"uuid,omitempty"`
	Content []byte   `json:"content,omitempty"`
}

Jump to

Keyboard shortcuts

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