notification

package
v0.0.21 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AzureDevOpsNotification

type AzureDevOpsNotification struct {
	Project string
	Repo    string
	Client  git.Client
}

func NewAzureDevOpsNotification

func NewAzureDevOpsNotification(address string, token string) (*AzureDevOpsNotification, error)

func (*AzureDevOpsNotification) Send

type DiscardNotification

type DiscardNotification struct{}

func NewDiscardNotification

func NewDiscardNotification() *DiscardNotification

func (*DiscardNotification) Send

type GitHubNotification

type GitHubNotification struct {
	Owner  string
	Repo   string
	Client *github.Client
}

func NewGitHubNotification

func NewGitHubNotification(address string, token string) (*GitHubNotification, error)

func (*GitHubNotification) Send

type InMemNotification

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

func NewInMemNotification

func NewInMemNotification() *InMemNotification

func (*InMemNotification) GetNotifications

func (n *InMemNotification) GetNotifications() []NotificationEvent

func (*InMemNotification) ResetNotifications

func (n *InMemNotification) ResetNotifications()

func (*InMemNotification) Send

func (*InMemNotification) SendResponse

func (n *InMemNotification) SendResponse(err error)

type Notification

type Notification interface {
	Send(ctx context.Context, event NotificationEvent) error
}

func NewNotificationClient

func NewNotificationClient(cfg config.ReconcileConfig) (Notification, error)

type NotificationEvent

type NotificationEvent struct {
	Revision    string            `json:"revision"`
	State       NotificationState `json:"state"`
	Name        string            `json:"name"`
	Description string            `json:"description"`
}

func (*NotificationEvent) Equal

func (e *NotificationEvent) Equal(other NotificationEvent) bool

type NotificationProvider

type NotificationProvider int
const (
	NotificationProviderAzureDevOps NotificationProvider = iota
	NotificationProviderGitHub
	NotificationProviderUnknown
)

type NotificationState

type NotificationState int
const (
	NotificationStateSuccess NotificationState = iota
	NotificationStateFailure
)

Jump to

Keyboard shortcuts

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