xmpp

package
v0.1.44 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const TriggerID = "xmpp"

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Jid      string            `yaml:"jid" doc:"JID бота."`
	Password string            `yaml:"password" doc:"Пароль."`
	Users    map[string]string `yaml:"users" doc:"Маппинг JID в имя пользователя."`
	Presence time.Duration     `yaml:"presence,omitempty" doc:"Интервал для отправки присутствия." default:"1m"`
	State    time.Duration     `yaml:"state,omitempty" doc:"Интервал для отправки состояния (\"печатает\")." default:"5s"`
}

type Trigger

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

func NewTrigger

func NewTrigger(params TriggerParams) (*Trigger, error)

func (*Trigger) ID

func (t *Trigger) ID() string

func (*Trigger) Run

func (t *Trigger) Run(ctx triggers.Context, jobs triggers.Jobs)

type TriggerParams

type TriggerParams struct {
	Clock  based.Clock `validate:"required"`
	Config Config      `validate:"required"`
}

Jump to

Keyboard shortcuts

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