endpoint

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2021 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Factory

func Factory(endpointType string, config map[string]string) (app.EndpointPort, error)

Types

type Mock

type Mock struct{}

func NewMock

func NewMock() (*Mock, error)

func (*Mock) Send

func (m *Mock) Send(message *app.Message) error

type Telegram

type Telegram struct {
	Token  string
	ChatID string
	SendMu sync.Mutex
}

func NewTelegram

func NewTelegram(token string, chatID string) *Telegram

func (*Telegram) Send

func (t *Telegram) Send(msg *app.Message) error

type TelegramResponse

type TelegramResponse struct {
	OK          bool   `json:"ok"`
	Description string `json:"description"`
}

Jump to

Keyboard shortcuts

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