Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BotHandler ¶
type BotHandler struct {
CustomMessage []byte
// contains filtered or unexported fields
}
func (*BotHandler) ServeHTTP ¶
func (w *BotHandler) ServeHTTP(writer http.ResponseWriter, req *http.Request)
type CIDRRange ¶ added in v1.2.0
type CIDRRange struct {
// contains filtered or unexported fields
}
this is lightweight cidr range checker just for this project it's only support ipv4 ( all telegram ip rangers are ipv4 ) after initiating first time cannot add rangers only checkings ip
type ListenOption ¶ added in v1.2.0
type RangeCheck ¶ added in v1.2.0
func NewCIDRRange ¶ added in v1.2.0
func NewCIDRRange(cidrList []string) (RangeCheck, error)
type ServerOption ¶
type ServerOption struct {
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"`
Custom_Message string `json:"req_reject_message"`
ListenOption ListenOption `json:"listen_option"`
}
type SimpleRangeCheck ¶ added in v1.2.0
type SimpleRangeCheck struct {
// contains filtered or unexported fields
}
type UnknownRemote ¶ added in v1.2.0
type UnknownRemote string
func (UnknownRemote) Error ¶ added in v1.2.0
func (e UnknownRemote) Error() string
func (UnknownRemote) Temporary ¶ added in v1.2.0
func (e UnknownRemote) Temporary() bool
func (UnknownRemote) Timeout ¶ added in v1.2.0
func (e UnknownRemote) Timeout() bool
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
Click to show internal directories.
Click to hide internal directories.