raw

package
v1.6.8 Latest Latest
Warning

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

Go to latest
Published: May 6, 2024 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

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

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

type ProgressCallable func(downloadedBytes int64, totalBytes int64)

type ResponseParameters

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