notify

package
v0.0.0-...-d0b798f Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2024 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 Config

type Config struct {
	PmrConfig `yaml:"pmr"`
}

type Content

type Content struct {
	Body       string   `json:"body"`
	Msgtype    string   `json:"msgtype"`
	NewContent *Content `json:"m.new_content"`
	RelatesTO  *struct {
		EventID string `json:"event_id"`
		RelType string `json:"rel_type"`
	} `json:"m.relates_to"`

	DisplayName string `json:"displayname"`
	Membership  string `json:"membership"`

	CallID       string `json:"call_id"`
	Capabilities struct {
		Dtmf       bool `json:"m.call.dtmf"`
		Transferee bool `json:"m.call.transferee"`
	} `json:"capabilities"`
	// Lifetime int
	PartyID string `json:"party_id"`
	Version string `json:"version"`
}

type Counts

type Counts struct {
	MissedCalls int `json:"missed_calls"`
	Unread      int `json:"unread"`
}

type Data

type Data struct {
}

type Devices

type Devices struct {
	AppID     string `json:"app_id"`
	Data      Data   `json:"data"`
	PushKey   string `json:"pushkey"`
	PushKeyTs int    `json:"pushkey_ts"`
	Tweaks    Tweaks `json:"tweaks"`
}

type Notification

type Notification struct {
	Content           Content   `json:"content"`
	Counts            Counts    `json:"counts"`
	Devices           []Devices `json:"devices"`
	EventID           string    `json:"event_id"`
	Prio              string    `json:"prio"`
	RoomAlias         string    `json:"room_alias"`
	RoomID            string    `json:"room_id"`
	RoomName          string    `json:"room_name"`
	Sender            string    `json:"sender"`
	SenderDisplayName string    `json:"sender_display_name"`
	Type              string    `json:"type"`
}

type Params

type Params struct {
	Notification Notification `json:"notification"`
}

type PmrConfig

type PmrConfig struct {
	DefaultTitle   string `yaml:"default_title"`
	DefaultContent string `yaml:"default_content"`
	ImageContent   string `yaml:"image_content"`
	FileContent    string `yaml:"file_content"`
}

func (*PmrConfig) Validate

func (c *PmrConfig) Validate() error

type Pusher

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

func New

func New(ctx context.Context, cfg *Config, overall *overall.OverAll, logger log.Logger) *Pusher

func (*Pusher) ServeHTTP

func (p *Pusher) ServeHTTP(w http.ResponseWriter, r *http.Request)

type TooLTT

type TooLTT struct {
	Notification Notification `json:"notification"`
}

type Tweaks

type Tweaks struct {
	Sound string `json:"sound"`
}

Jump to

Keyboard shortcuts

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