server

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2025 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BotHandler

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

func (*BotHandler) ServeHTTP

func (w *BotHandler) ServeHTTP(writer http.ResponseWriter, req *http.Request)

type ServerOption

type ServerOption struct {
	Addr              string   `json:"addr"`
	Cert              string   `json:"cert"`
	Key               string   `json:"key"`
	ServerName        string   `json:"server_name"`
	HttpPath          string   `json:"http_path"`
	AllowedUpdates    []string `json:"allowed_updates,omitempty"`
	FullUrl           string   `json:"full_url"`
	Secret            string   `json:"secret"`
	DisableWebhookSet bool     `json:"disable_setwebhook"`
}

type Webhookserver

type Webhookserver struct {
	http.Server
	Handler http.Handler

	AllowdObs         []string
	FullUrl           string
	DIsableWebhookSet bool
	// contains filtered or unexported fields
}

func New

func New(ctx context.Context, srvopt *ServerOption, parser parser.Parserwrap, logger *zap.Logger) *Webhookserver

func (*Webhookserver) Close

func (w *Webhookserver) Close() error

func (*Webhookserver) Start

func (w *Webhookserver) Start(botapi botapi.BotAPI, errchan chan error) error

Jump to

Keyboard shortcuts

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