matrix

package
v0.4.28 Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Notifier

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

func NewNotifier

func NewNotifier(config *NotifierConfig) (*Notifier, error)

func (*Notifier) Notify

func (n *Notifier) Notify(ctx context.Context, subject string, message string) (*notifier.NotifyResult, error)

func (*Notifier) SetLogger

func (n *Notifier) SetLogger(logger *slog.Logger)

type NotifierConfig

type NotifierConfig struct {
	// Homeserver URL (Element web URL or Matrix homeserver base URL).
	// URL homeserver (адрес Element или базовый URL Matrix).
	ServerUrl string `json:"serverUrl"`
	// User ID (MXID), e.g. @bot:example.org.
	// Идентификатор пользователя (MXID), например @bot:example.org.
	UserId string `json:"userId"`
	// Access token from the homeserver (bot or user).
	// Access token с homeserver (бот или пользователь).
	AccessToken string `json:"accessToken"`
	// Room ID (!room:server) for notifications.
	// ID комнаты (!room:server) для уведомлений.
	RoomId string `json:"roomId"`
}

Jump to

Keyboard shortcuts

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