slack

package
v0.0.0-...-35c0fb1 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2021 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BugzillaToSlackEmail

func BugzillaToSlackEmail(config *config.OperatorConfig, bzEmail string) string

func NewRecorder

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

func SlackEmailToBugzilla

func SlackEmailToBugzilla(config *config.OperatorConfig, slackEmail string) string

Types

type ChannelClient

type ChannelClient interface {
	MessageChannel(message string) error
	MessageAdminChannel(message string) error
	MessageEmail(email, message string) error

	PostMessageChannel(options ...slack.MsgOption) (channelID string, ts string, err error)
	PostMessageAdminChannel(options ...slack.MsgOption) error
	PostMessageEmail(email string, options ...slack.MsgOption) error
}

func NewChannelClient

func NewChannelClient(client *slack.Client, config *config.OperatorConfig, channel, adminChannel string, debug bool) ChannelClient

type EventBus

type EventBus interface {
	SubscribeLinkShared(func(ev *slackevents.LinkSharedEvent)) 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

Jump to

Keyboard shortcuts

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