flock

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2020 License: Apache-2.0 Imports: 9 Imported by: 12

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Flock

type Flock struct {
	Url string
}

Flock handler implements handler.Handler interface, Notify event to Flock channel

func (*Flock) Init

func (f *Flock) Init(c *config.Config) error

Init prepares Flock configuration

func (*Flock) ObjectCreated

func (f *Flock) ObjectCreated(obj interface{})

ObjectCreated calls notifyFlock on event creation

func (*Flock) ObjectDeleted

func (f *Flock) ObjectDeleted(obj interface{})

ObjectDeleted calls notifyFlock on event creation

func (*Flock) ObjectUpdated

func (f *Flock) ObjectUpdated(oldObj, newObj interface{})

ObjectUpdated calls notifyFlock on event creation

func (*Flock) TestHandler added in v0.1.0

func (f *Flock) TestHandler()

TestHandler tests the handler configurarion by sending test messages.

type FlockMessage

type FlockMessage struct {
	Notification string                    `json:"notification"`
	Text         string                    `json:"text"`
	Attachements []FlockMessageAttachement `json:"attachments"`
}

FlockMessage struct

type FlockMessageAttachement

type FlockMessageAttachement struct {
	Title string                       `json:"title"`
	Color string                       `json:"color"`
	Views FlockMessageAttachementViews `json:"views"`
}

FlockMessageAttachement struct

type FlockMessageAttachementViews

type FlockMessageAttachementViews struct {
	Flockml string `json:"flockml"`
}

FlockMessageAttachementViews struct

Jump to

Keyboard shortcuts

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