Documentation
¶
Index ¶
Constants ¶
View Source
const ( TDesktopSources = "https://raw.githubusercontent.com/telegramdesktop/tdesktop/%s/Telegram/SourceFiles" TDLibSources = "https://raw.githubusercontent.com/tdlib/td/master/" TDesktopTL = TDesktopSources + "/mtproto/scheme/api.tl" TDLibTL = TDLibSources + "td/generate/scheme/telegram_api.tl" E2ETL = "https://core.telegram.org/schema/end-to-end-json" TelegraphApi = "https://api.telegra.ph" GithubURL = "https://github.com" GithubRawURL = "https://raw.githubusercontent.com" MainReleasedTL = "https://corefork.telegram.org" )
View Source
const ( UpdateMessageRate = time.Second * 3 ChannelPostWindow = 20 DownloadThreads = 2 MTProtoSessionFile = "mtproto.session" MTProtoReconnectDelay = time.Second * 15 )
View Source
const ( JavaClassQuery = `` /* 147-byte string literal not displayed */ JavaClassWithNameQuery = `` /* 202-byte string literal not displayed */ ExtractJavaVars = `` /* 409-byte string literal not displayed */ ExtractJavaFunctions = ` (method_declaration ((identifier) @function_name) ((block) @function_body) ) @function_declaration ` )
Variables ¶
View Source
var ( AndroidChannels = []string{"TAndroidBeta", "TAndroidAPK"} TempFolder = "temp" TgnetPackage = "org.telegram.tgnet" BannersFolder = "banners" TempBins = path.Join(TempFolder, "bins") TempApk = path.Join(TempBins, "telegram.apk") TempDex = path.Join(TempBins, "dex") TempDecompiled = path.Join(TempFolder, "decompiled") TempSourcesRoot = path.Join(TempDecompiled, "sources") TempSources = path.Join(TempSourcesRoot, "org", "telegram", "tgnet") )
View Source
var ( TLSchemeLineRgx = regexp.MustCompile(`(\S+)#(\w+) *({\S+})? *#* *\[* *([^}=\]]*) *]* = ([^;]+)`) TDeskVersionRgx = regexp.MustCompile(`AppVersion *?= *?([0-9]+);`) TDLibVersionRgx = regexp.MustCompile(`project\(TDLib\s+VERSION\s+([0-9.]+)`) TDLibLayerRgx = regexp.MustCompile(`constexpr int32 MTPROTO_LAYER = ([0-9]+);`) TDeskVersionNameRgx = regexp.MustCompile(`AppVersionStr *?= *?"([0-9.]+)";`) DigitVersionRgx = regexp.MustCompile(`^\S+[^0-9p][0-9]+$`) JadxFieldAliasRgx = regexp.MustCompile(`^f[0-9]+([a-zA-Z_].*)$`) BetaPostVersionRgx = regexp.MustCompile(`([0-9]+(?:\.[0-9]+)+)\s*\(([0-9]+)\)`) OldLayers = []*regexp.Regexp{ regexp.MustCompile(`Old[0-9]*$`), regexp.MustCompile(`ToBeDeprecated$`), regexp.MustCompile(`(?i)ToDelete$`), regexp.MustCompile(`Layer[0-9]+$`), regexp.MustCompile(`(?i)_legacy$`), regexp.MustCompile(`(?i)^TL_contactLink`), } BrokenNames = map[*regexp.Regexp]string{ regexp.MustCompile(`^((?P<first>is_admin)|is_(?P<second>.*))$`): "$first$second", regexp.MustCompile(`^web_`): "", regexp.MustCompile(`__b`): "_B", regexp.MustCompile(`^hash2$`): "hash", regexp.MustCompile(`^via_invite$`): "via_request", regexp.MustCompile(`^_`): "", regexp.MustCompile(`^doc$`): "id", } UnusedTypes = []string{ "ipPortSecret", "ipPort", "accessPointRule", "help.configSimple", } )
View Source
var SpecialChars = map[string]string{
"amp": "&",
"lt": "<",
"gt": ">",
"quot": "\"",
"apos": "'",
}
View Source
var SupportedBotAliases = []string{
".",
"/",
"!",
}
View Source
var SupportedHtmlTags = []string{
"a",
"aside",
"b",
"blockquote",
"br",
"code",
"em",
"figcaption",
"figure",
"h3",
"h4",
"hr",
"i",
"iframe",
"img",
"li",
"ol",
"p",
"pre",
"s",
"strong",
"u",
"ul",
"video",
}
View Source
var TagRequiredAttrs = map[string][]string{
"a": {"href"},
"iframe": {"src"},
"img": {"src"},
"video": {"src"},
}
View Source
var TagUnsupportedChildren = []string{
"img",
"iframe",
"video",
"br",
"hr",
}
View Source
var UnclosedTags = []string{
"br",
"hr",
"img",
}
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.