slack

package
v1.1.1-0...-dcff8be Latest Latest
Warning

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

Go to latest
Published: May 20, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ErrorInvalidConfiguration = "invalid configuration"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Token   string
	Channel string
}

Config used for Slack.

func (*Config) AddToCommand

func (c *Config) AddToCommand(cmd *cobra.Command)

AddToCommand will add Config's CLI flags to the given *cobra.Command.

func (*Config) AddToViper

func (c *Config) AddToViper(v *viper.Viper)

func (Config) IsValid

func (c Config) IsValid() bool

type FileUploadMessage

type FileUploadMessage struct {
	Title    string
	Comment  string
	FilePath string
	FileType string
}

func (FileUploadMessage) Send

func (f FileUploadMessage) Send(config Config) (err error)

type Message

type Message interface {
	Send(config Config) error
}

type TextMessage

type TextMessage struct {
	Content string
}

func (TextMessage) Send

func (t TextMessage) Send(config Config) (err error)

Jump to

Keyboard shortcuts

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