notifications

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2021 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Block

type Block struct {
	Type     string `json:"type"`
	Text     *Text  `json:"text,omitempty"`
	Elements []Text `json:"elements,omitempty"`
}

type Manager

type Manager interface {
	Broadcast(msg Message)
	AddProvider(provider string, token string, defaultChannel string, channelMapping string)
}

type ManagerImpl

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

func NewManager

func NewManager() *ManagerImpl

func (*ManagerImpl) AddProvider

func (m *ManagerImpl) AddProvider(providerType string, token string, defaultChannel string, channelMapping string)

func (*ManagerImpl) Broadcast

func (m *ManagerImpl) Broadcast(msg Message)

func (*ManagerImpl) Run

func (m *ManagerImpl) Run()

type Message

type Message interface {
	AsSlackMessage() (*slackMessage, error)
	AsGithubStatus() (*githubLib.RepoStatus, error)
	Env() string
	RepositoryName() string
	SHA() string
}

func MessageFromGitOpsEvent

func MessageFromGitOpsEvent(event *dx.GitopsEvent) Message

func NewMessage added in v0.4.0

func NewMessage(gitopsRepo string, gitopsCommit *model.GitopsCommit) Message

type Text

type Text 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