notification

package
v0.0.0-...-ef83997 Latest Latest
Warning

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

Go to latest
Published: May 2, 2018 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Channel

type Channel interface {
	Send(context.Context, Message)
}

Channel is a simple interface between the notifying component and the notificaiton impl

func NewServiceChannel

func NewServiceChannel(config ServiceConfiguration) (Channel, error)

NewServiceChannel sends notification messages to the fabric8-notification service

type DevNullChannel

type DevNullChannel struct{}

DevNullChannel is the default configured channel. It does nothing.

func (*DevNullChannel) Send

Send NO-OP

type Message

type Message struct {
	MessageID   uuid.UUID // unique ID per event
	UserID      *string
	TargetID    string
	MessageType string
}

Message represents a new event of a Type for a Target performed by a User See helper constructors like NewWorkItemCreated, NewCommentUpdated

func NewCommentCreated

func NewCommentCreated(commentID string) Message

NewCommentCreated creates a new message instance for the newly created CommentID

func NewCommentUpdated

func NewCommentUpdated(commentID string) Message

NewCommentUpdated creates a new message instance for the updated CommentID

func NewWorkItemCreated

func NewWorkItemCreated(workitemID string) Message

NewWorkItemCreated creates a new message instance for the newly created WorkItemID

func NewWorkItemUpdated

func NewWorkItemUpdated(workitemID string) Message

NewWorkItemUpdated creates a new message instance for the updated WorkItemID

func (Message) String

func (m Message) String() string

type Service

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

Service is a simple client Channel to the fabric8-notification service

func (*Service) Send

func (s *Service) Send(ctx context.Context, msg Message)

Send invokes the fabric8-notification API

type ServiceConfiguration

type ServiceConfiguration interface {
	GetNotificationServiceURL() string
}

ServiceConfiguration holds configuration options required to interact with the fabric8-notification API

Jump to

Keyboard shortcuts

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