plugins

package
v0.0.0-...-af2ae2a Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2023 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Initialize

func Initialize(configuration structs.Config)

Initialize all plugins from configuration

func InitializeData

func InitializeData(person *structs.PersonMetrics)

InitializeData will send signal to all plugins that the data was initialized

func ParseData

func ParseData(person *structs.PersonMetrics)

ParseData will parse new data for a given person and send it to every configured plugin

Types

type CSV

type CSV struct {
	Dir string
}

CSV contains configuration for the CSV plugin

func (CSV) Initialize

func (plugin CSV) Initialize(c structs.Config) structs.Plugin

Initialize the Csv plugin

func (CSV) InitializeData

func (plugin CSV) InitializeData(_ *structs.PersonMetrics) bool

func (CSV) Logger

func (plugin CSV) Logger() log.FieldLogger

func (CSV) Name

func (plugin CSV) Name() string

func (CSV) ParseData

func (plugin CSV) ParseData(person *structs.PersonMetrics) bool

ParseData will parse new data for a given person

type MQTT

type MQTT struct {
	Host     string
	Username string
	Password string
	// contains filtered or unexported fields
}

func (MQTT) Initialize

func (plugin MQTT) Initialize(c structs.Config) structs.Plugin

Initialize the Csv plugin

func (MQTT) InitializeData

func (plugin MQTT) InitializeData(person *structs.PersonMetrics) bool

func (MQTT) Logger

func (plugin MQTT) Logger() log.FieldLogger

func (MQTT) Name

func (plugin MQTT) Name() string

func (MQTT) ParseData

func (plugin MQTT) ParseData(person *structs.PersonMetrics) bool

type Mail

type Mail struct {
	Server        string
	SenderName    string
	SenderAddress string
	Recipients    map[string]structs.MailRecipient
	StartTLS      bool
	TemplateFile  string
	Subject       string
	Metrics       int
}

Mail contains configuration for the Mail plugin

func (Mail) Initialize

func (plugin Mail) Initialize(c structs.Config) structs.Plugin

Initialize the Mail plugin

func (Mail) InitializeData

func (plugin Mail) InitializeData(_ *structs.PersonMetrics) bool

func (Mail) Logger

func (plugin Mail) Logger() log.FieldLogger

func (Mail) Name

func (plugin Mail) Name() string

func (Mail) ParseData

func (plugin Mail) ParseData(person *structs.PersonMetrics) bool

ParseData will parse new data for a given person

type MailRecipient

type MailRecipient struct {
	Address []string
}

MailRecipient contains a person name, and a list of addresses to send updates to

Jump to

Keyboard shortcuts

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