processor

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: 8 Imported by: 0

Documentation

Index

Constants

View Source
const DELETE_ALL_INSTANCES = "all"
View Source
const (
	UnknowCommand = "unknown"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Command

type Command string

type CommandProcessor

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

func NewCommandProcessor

func NewCommandProcessor() *CommandProcessor

func (*CommandProcessor) Process

func (p *CommandProcessor) Process(update *telegram.Update)

func (*CommandProcessor) Register

func (p *CommandProcessor) Register(command Command, processor Processor)

func (*CommandProcessor) RegisterFallback

func (p *CommandProcessor) RegisterFallback(processor Processor)

type CreateProcessor

type CreateProcessor struct {
	ProcessorShared
	// contains filtered or unexported fields
}

func NewCreateProcessor

func NewCreateProcessor(client *telegram.Client, vpnSvc *service.VPNService, peerSvc *service.PeerService) CreateProcessor

func (CreateProcessor) CreatePeer

func (p CreateProcessor) CreatePeer(ipAddress, publicKey, username string, update *telegram.Update) error

func (CreateProcessor) CreateVPN

func (p CreateProcessor) CreateVPN(update *telegram.Update) error

func (CreateProcessor) Process

func (p CreateProcessor) Process(args []string, update *telegram.Update) error

type DeleteProcessor

type DeleteProcessor struct {
	ProcessorShared
	// contains filtered or unexported fields
}

func NewDeleteProcessor

func NewDeleteProcessor(client *telegram.Client, vpnSvc *service.VPNService, peerSvc *service.PeerService) DeleteProcessor

func (DeleteProcessor) Process

func (p DeleteProcessor) Process(args []string, update *telegram.Update) error

type DocsProcessor

type DocsProcessor struct {
	ProcessorShared
}

func NewDocsProcessor

func NewDocsProcessor(client *telegram.Client) *DocsProcessor

func (*DocsProcessor) Process

func (p *DocsProcessor) Process(args []string, update *telegram.Update) error

type ListProcessor

type ListProcessor struct {
	ProcessorShared
	// contains filtered or unexported fields
}

func NewListProcessor

func NewListProcessor(client *telegram.Client, vpnService *service.VPNService, peerService *service.PeerService) ListProcessor

func (ListProcessor) ListPeers

func (p ListProcessor) ListPeers(update *telegram.Update) error

func (ListProcessor) ListVPNs

func (p ListProcessor) ListVPNs(update *telegram.Update) error

func (ListProcessor) Process

func (p ListProcessor) Process(args []string, update *telegram.Update) error

type Processor

type Processor interface {
	Process(args []string, update *telegram.Update) error
}

type ProcessorShared

type ProcessorShared struct {
	Client *telegram.Client
}

func (ProcessorShared) SendMessage

func (p ProcessorShared) SendMessage(msg string, update *telegram.Update)

type SettingsProcessor

type SettingsProcessor struct {
	ProcessorShared
	// contains filtered or unexported fields
}

func NewSettingsProcessor

func NewSettingsProcessor(client *telegram.Client, ssm *aws.SSM, cfg *config.DonkeyVPNConfig) *SettingsProcessor

func (*SettingsProcessor) Process

func (p *SettingsProcessor) Process(args []string, update *telegram.Update) error

type UnknowCommandProcessor

type UnknowCommandProcessor struct {
	ProcessorShared
}

func NewUnknowCommandProcessor

func NewUnknowCommandProcessor(client *telegram.Client) UnknowCommandProcessor

func (UnknowCommandProcessor) Process

func (p UnknowCommandProcessor) Process(args []string, update *telegram.Update) error

Jump to

Keyboard shortcuts

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