models

package
v0.0.0-...-59bc5ca Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2020 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MattermostMessage

type MattermostMessage struct {
	mmModels.IncomingWebhookRequest
}

type MessageEnvelope

type MessageEnvelope struct {
	From    string
	To      []string
	Message string
	Subject string
}

func (*MessageEnvelope) SetDefaults

func (m *MessageEnvelope) SetDefaults(defaults Options)

type Options

type Options struct {
	DefaultDestinations []string
	DefaultSender       string
	DefaultSubject      string
}

type SlackAccessory

type SlackAccessory struct {
	Type     string `json:"type"`
	ImageURL string `json:"image_url"`
	AltText  string `json:"alt_text"`
}

type SlackBlock

type SlackBlock struct {
	Type      string          `json:"type"`
	Text      *SlackText      `json:"text,omitempty"`
	BlockID   *string         `json:"block_id,omitempty"`
	Accessory *SlackAccessory `json:"accessory,omitempty"`
	Fields    []SlackText     `json:"fields"`
}

type SlackMessage

type SlackMessage struct {
	SlackText   string                      `json:"text"`
	Blocks      []SlackBlock                `json:"blocks"`
	Attachments []*mmModels.SlackAttachment `json:"attachments"`
}

func (*SlackMessage) ToJson

func (s *SlackMessage) ToJson() string

type SlackText

type SlackText struct {
	Type string `json:"type"`
	Text string `json:"text"`
}

Jump to

Keyboard shortcuts

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