handler

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 7, 2025 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TELEGRAM_WEBHOOK_SECRET_HEADER = "X-Telegram-Bot-Api-Secret-Token"
	GenericErrorMessage            = "Error processing request."
)

Variables

This section is empty.

Functions

This section is empty.

Types

type JSONObj

type JSONObj map[string]interface{}

type NotificationRequest

type NotificationRequest struct {
	Id         string
	Hostname   string `json:"hostname"`
	Port       string `json:"port"`
	Status     string `json:"status"`
	InstanceId string `json:"instanceId"`
}

func (*NotificationRequest) ToModel

func (r *NotificationRequest) ToModel() interface{}

type PeerHandler

type PeerHandler struct {
	WebhookSecret string
	PeersTable    *aws.DynamoDB
}

func (*PeerHandler) List

func (p *PeerHandler) List(c echo.Context) error

type VPNHandler

type VPNHandler struct {
	WebhookSecret  string
	VPNSvc         *service.VPNService
	TelegramClient *telegram.Client
}

func (*VPNHandler) GetPendingId

func (h *VPNHandler) GetPendingId(c echo.Context) error

func (*VPNHandler) Notify

func (h *VPNHandler) Notify(c echo.Context) error

func (*VPNHandler) Ping

func (h *VPNHandler) Ping(c echo.Context) error

type WebhookHandler

type WebhookHandler struct {
	WebhookSecret    string
	CommandProcessor *processor.CommandProcessor
}

func (*WebhookHandler) Handle

func (h *WebhookHandler) Handle(c echo.Context) error

Jump to

Keyboard shortcuts

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