raw

package
v1.4.6 Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2023 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AntiFloodData added in v1.4.0

type AntiFloodData struct {
	LastEvent int64
	NumEvents int
}

type CancelableContext

type CancelableContext struct {
	Id     int64
	Cancel context.CancelFunc
}

func (*CancelableContext) GenerateId

func (ctx *CancelableContext) GenerateId()

type ErrorMessage added in v1.2.9

type ErrorMessage struct {
	Ok          bool                `json:"ok"`
	Description string              `json:"description"`
	Code        int                 `json:"error_code"`
	Parameters  *ResponseParameters `json:"parameters,omitempty"`
}

type InputFile

type InputFile interface {
	FileName() string
	Content() []byte
}

type InputMediaFiles

type InputMediaFiles interface {
	Files() map[string]InputFile
}

type Method

type Method interface {
	MethodName() string
	Files() map[string]InputFile
	ParseResult(response []byte) (*Result, error)
	ProgressCallable() ProgressCallable
}

type ProgressCallable added in v1.1.12

type ProgressCallable func(downloadedBytes int64, totalBytes int64)

type ResponseParameters added in v1.2.9

type ResponseParameters struct {
	MigrateToChatID int64 `json:"migrate_to_chat_id,omitempty"`
	RetryAfter      int   `json:"retry_after,omitempty"`
}

ResponseParameters Describes why a request was unsuccessful.

type Result

type Result struct {
	Kind   int
	Result any
	Error  ErrorMessage
}

Jump to

Keyboard shortcuts

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