protocol

package
v0.0.0-...-6c5a50c Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2025 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bridge

type Bridge struct {
	From struct {
		TCP         *TCP         `yaml:"tcp,omitempty"`
		TelegramBot *TelegramBot `yaml:"telegram_bot,omitempty"`
	} `yaml:"from"`
	To struct {
		TCP         *TCP         `yaml:"tcp,omitempty"`
		TelegramBot *TelegramBot `yaml:"telegram_bot,omitempty"`
	} `yaml:"to"`
}

type Config

type Config struct {
	Bridges map[string]Bridge `yaml:"bridges"`
}

type TCP

type TCP struct {
	Host string `yaml:"host"`
	Port int    `yaml:"port"`
}

func (*TCP) InitFrom

func (t *TCP) InitFrom(channel chan string)

func (*TCP) InitTo

func (t *TCP) InitTo(channel chan string)

type TelegramBot

type TelegramBot struct {
	Token  string `yaml:"token"`
	ChatID int64  `yaml:"chat_id"`
}

func (*TelegramBot) InitFrom

func (tb *TelegramBot) InitFrom(channel chan string)

func (*TelegramBot) InitTo

func (tb *TelegramBot) InitTo(channel chan string)

type TelegramItem

type TelegramItem struct {
	Message  TelegramItemMessage `json:"message"`
	UpdateID int64               `json:"update_id"`
}

type TelegramItemChat

type TelegramItemChat struct {
	ChatID int64 `json:"id"`
}

type TelegramItemMessage

type TelegramItemMessage struct {
	Text string           `json:"text"`
	Chat TelegramItemChat `json:"chat"`
}

type TelegramResult

type TelegramResult struct {
	Ok     bool           `json:"ok"`
	Result []TelegramItem `json:"result"`
}

Jump to

Keyboard shortcuts

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