whatsapp

package
v0.0.13 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2023 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 Component

type Component struct {
	Type       string      `json:"type"`
	Parameters []Parameter `json:"parameters"`
}

type Language

type Language struct {
	Code string `json:"code"`
}

type MessagePayload

type MessagePayload struct {
	MessagingProduct string   `json:"messaging_product"`
	To               string   `json:"to"`
	Type             string   `json:"type"`
	Template         Template `json:"template"`
}

type Parameter

type Parameter struct {
	Type string `json:"type"`
	Text string `json:"text"`
}

type Template

type Template struct {
	Name       string      `json:"name"`
	Language   Language    `json:"language"`
	Components []Component `json:"components"`
}

type WhatsApp

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

func NewWhatsApp

func NewWhatsApp(configuration config.WhatsAppConfiguration) *WhatsApp

func (*WhatsApp) Name added in v0.0.5

func (w *WhatsApp) Name() string

func (*WhatsApp) NotifyAlarm

func (w *WhatsApp) NotifyAlarm(person config.Person, systemName string, a alarm.Type, device device.Spec, zone zone.Zone) bool

func (*WhatsApp) NotifyAutoArm

func (w *WhatsApp) NotifyAutoArm(person config.Person, systemName string) bool

func (*WhatsApp) NotifyAutoDisarm

func (w *WhatsApp) NotifyAutoDisarm(person config.Person, systemName string) bool

func (*WhatsApp) NotifyLowBattery

func (w *WhatsApp) NotifyLowBattery(person config.Person, systemName string, device device.Spec, zone zone.Zone, batteryLevel float32) bool

func (*WhatsApp) NotifyLowLinkQuality

func (w *WhatsApp) NotifyLowLinkQuality(person config.Person, systemName string, device device.Spec, zone zone.Zone, quality float32) bool

func (*WhatsApp) NotifyRecovery

func (w *WhatsApp) NotifyRecovery(person config.Person, systemName string, device device.Spec, zone zone.Zone) bool

Jump to

Keyboard shortcuts

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