slack

package
v0.0.0-...-a1efb75 Latest Latest
Warning

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

Go to latest
Published: May 18, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// NoneEmail can be put in the SetEmailMap() to not send someone a message
	NoneEmail = "NONE"
)

Variables

This section is empty.

Functions

func AddFlags

func AddFlags(cmd *cobra.Command)

func NewRecorder

func NewRecorder(client ChannelClient, component string) events.Recorder

Types

type ChannelClient

type ChannelClient interface {
	MessageChannel(channel, message string) error
	MessageDebug(message string) error
	MessageEmail(email, message string) error
	SetEmailMap(map[string]string)
}

func NewChannelClient

func NewChannelClient(cmd *cobra.Command, ctx context.Context, debugChannel string, debug bool) (ChannelClient, error)

type Recorder

type Recorder struct {
	// contains filtered or unexported fields
}

func (*Recorder) ComponentName

func (r *Recorder) ComponentName() string

func (*Recorder) Event

func (r *Recorder) Event(reason, message string)

func (*Recorder) Eventf

func (r *Recorder) Eventf(reason, messageFmt string, args ...interface{})

func (*Recorder) ForComponent

func (r *Recorder) ForComponent(componentName string) events.Recorder

func (*Recorder) Shutdown

func (r *Recorder) Shutdown()

func (*Recorder) Warning

func (r *Recorder) Warning(reason, message string)

func (*Recorder) Warningf

func (r *Recorder) Warningf(reason, messageFmt string, args ...interface{})

func (*Recorder) WithComponentSuffix

func (r *Recorder) WithComponentSuffix(componentNameSuffix string) events.Recorder

type SlackCredentials

type SlackCredentials struct {
	SlackToken             string `json:"slackToken"`
	SlackVerificationToken string `json:"slackVerificationToken"`
}

func (SlackCredentials) DecodedSlackToken

func (b SlackCredentials) DecodedSlackToken() string

func (SlackCredentials) DecodedSlackVerificationToken

func (b SlackCredentials) DecodedSlackVerificationToken() string

Jump to

Keyboard shortcuts

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