slack

package
v0.0.0-...-e991a50 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2021 License: MIT Imports: 5 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Blocks

type Blocks struct {
	Type string `json:"type"`
	// pointer required otherwise an empty text{} json will be included
	// which is not accepted by slack
	Text   *Text    `json:"text,omitempty"`
	Fields []Fields `json:"fields,omitempty"`
}

type Data

type Data struct {
	Blocks   []Blocks `json:"blocks"`
	Channel  string   `json:"channel"`
	Icon     string   `json:"icon_emoji"`
	Username string   `json:"username"`
}

func (*Data) PostMessage

func (d *Data) PostMessage(slackToken string) error

type Fields

type Fields struct {
	Type string `json:"type,omitempty"`
	Text string `json:"text,omitempty"`
}

type Text

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

Jump to

Keyboard shortcuts

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