test local tdlib compile passed
This commit is contained in:
parent
ba602eb00b
commit
0978807a9a
@ -3,6 +3,7 @@ package telegram
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/zelenin/go-tdlib/client"
|
||||
"path/filepath"
|
||||
)
|
||||
|
||||
type TelegramClient struct {
|
||||
@ -14,13 +15,13 @@ func NewTelegramClient(apiID int32, apiHash string) (*TelegramClient, error) {
|
||||
go client.CliInteractor(authorizer)
|
||||
|
||||
authorizer.TdlibParameters <- &client.SetTdlibParametersRequest{
|
||||
UseTestDc: false,
|
||||
//DatabaseDirectory: filepath.Join(".tdlib", "database"),
|
||||
//FilesDirectory: filepath.Join(".tdlib", "files"),
|
||||
UseTestDc: false,
|
||||
DatabaseDirectory: filepath.Join(".tdlib", "database"),
|
||||
FilesDirectory: filepath.Join(".tdlib", "files"),
|
||||
UseFileDatabase: false,
|
||||
UseChatInfoDatabase: false,
|
||||
UseMessageDatabase: false,
|
||||
UseSecretChats: true,
|
||||
UseSecretChats: false,
|
||||
ApiId: apiID,
|
||||
ApiHash: apiHash,
|
||||
SystemLanguageCode: "en",
|
||||
@ -29,6 +30,13 @@ func NewTelegramClient(apiID int32, apiHash string) (*TelegramClient, error) {
|
||||
ApplicationVersion: "1.0.0",
|
||||
}
|
||||
|
||||
_, err := client.SetLogVerbosityLevel(&client.SetLogVerbosityLevelRequest{
|
||||
NewVerbosityLevel: 1,
|
||||
})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
tdlibClient, err := client.NewClient(authorizer)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
||||
6
go.mod
6
go.mod
@ -14,13 +14,14 @@ require (
|
||||
github.com/themakers/hlog v0.0.0-20191205140925-235e0e4baddf
|
||||
github.com/twmb/franz-go v1.16.1
|
||||
github.com/xuri/excelize/v2 v2.8.1
|
||||
github.com/zelenin/go-tdlib v0.7.2
|
||||
github.com/zelenin/go-tdlib v0.7.0
|
||||
go.uber.org/zap v1.27.0
|
||||
google.golang.org/grpc v1.64.0
|
||||
google.golang.org/protobuf v1.34.2
|
||||
penahub.gitlab.yandexcloud.net/backend/penahub_common v0.0.0-20240607202348-efe5f2bf3e8c
|
||||
penahub.gitlab.yandexcloud.net/backend/quiz/common.git v0.0.0-20240624105135-6982631f2a4b
|
||||
penahub.gitlab.yandexcloud.net/backend/quiz/worker.git v0.0.0-20240421230341-0e086fcbb990
|
||||
penahub.gitlab.yandexcloud.net/external/trashlog.git v0.1.2-0.20240615192328-b2f5dffe92ae
|
||||
)
|
||||
|
||||
require (
|
||||
@ -45,7 +46,6 @@ require (
|
||||
github.com/minio/minio-go/v7 v7.0.70 // indirect
|
||||
github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826 // indirect
|
||||
github.com/pierrec/lz4/v4 v4.1.21 // indirect
|
||||
github.com/pkg/errors v0.9.1 // indirect
|
||||
github.com/pmezard/go-difflib v1.0.0 // indirect
|
||||
github.com/richardlehane/mscfb v1.0.4 // indirect
|
||||
github.com/richardlehane/msoleps v1.0.3 // indirect
|
||||
@ -67,7 +67,5 @@ require (
|
||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20240610135401-a8a62080eff3 // indirect
|
||||
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect
|
||||
gopkg.in/ini.v1 v1.67.0 // indirect
|
||||
gopkg.in/tucnak/telebot.v2 v2.5.0 // indirect
|
||||
gopkg.in/yaml.v3 v3.0.1 // indirect
|
||||
penahub.gitlab.yandexcloud.net/external/trashlog.git v0.1.2-0.20240615192328-b2f5dffe92ae // indirect
|
||||
)
|
||||
|
||||
11
go.sum
11
go.sum
@ -26,6 +26,8 @@ github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymF
|
||||
github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
|
||||
github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98=
|
||||
github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c=
|
||||
github.com/fatih/color v1.10.0 h1:s36xzo75JdqLaaWoiEHk767eHiwo0598uUxyfiPkDsg=
|
||||
github.com/fatih/color v1.10.0/go.mod h1:ELkj/draVOlAH/xkhN6mQ50Qd0MPOk5AAr3maGEBuJM=
|
||||
github.com/fsnotify/fsnotify v1.4.9 h1:hsms1Qyu0jgnwNXIxa+/V/PDsU6CfLf6CNO8H7IWoS4=
|
||||
github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ=
|
||||
github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY=
|
||||
@ -134,13 +136,14 @@ github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+
|
||||
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
|
||||
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
|
||||
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
|
||||
github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA=
|
||||
github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
|
||||
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
|
||||
github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg=
|
||||
github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
|
||||
github.com/tealeg/xlsx v1.0.5 h1:+f8oFmvY8Gw1iUXzPk+kz+4GpbDZPK1FhPiQRd+ypgE=
|
||||
github.com/tealeg/xlsx v1.0.5/go.mod h1:btRS8dz54TDnvKNosuAqxrM1QgN1udgk9O34bDCnORM=
|
||||
github.com/themakers/bdd v0.0.0-20210316111417-6b1dfe326f33 h1:N9f/Q+2Ssa+yDcbfaoLTYvXmdeyUUxsJKdPUVsjSmiA=
|
||||
github.com/themakers/bdd v0.0.0-20210316111417-6b1dfe326f33/go.mod h1:rpcH99JknBh8seZmlOlUg51gasZH6QH34oXNsIwYT6E=
|
||||
github.com/themakers/hlog v0.0.0-20191205140925-235e0e4baddf h1:TJJm6KcBssmbWzplF5lzixXl1RBAi/ViPs1GaSOkhwo=
|
||||
github.com/themakers/hlog v0.0.0-20191205140925-235e0e4baddf/go.mod h1:1FsorU3vnXO9xS9SrhUp8fRb/6H/Zfll0rPt1i4GWaA=
|
||||
github.com/twmb/franz-go v1.16.1 h1:rpWc7fB9jd7TgmCyfxzenBI+QbgS8ZfJOUQE+tzPtbE=
|
||||
@ -161,8 +164,8 @@ github.com/xuri/nfp v0.0.0-20240318013403-ab9948c2c4a7 h1:hPVCafDV85blFTabnqKgNh
|
||||
github.com/xuri/nfp v0.0.0-20240318013403-ab9948c2c4a7/go.mod h1:WwHg+CVyzlv/TX9xqBFXEZAuxOPxn2k1GNHwG41IIUQ=
|
||||
github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
|
||||
github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
|
||||
github.com/zelenin/go-tdlib v0.7.2 h1:XpD77+t3bix62TsEZbuQeDls6QQJbcovpb8SVVfyNAA=
|
||||
github.com/zelenin/go-tdlib v0.7.2/go.mod h1:yqNbNZenZtXPKgf9hDuyZbsRz7qlxOxdfKOc+sAxxIE=
|
||||
github.com/zelenin/go-tdlib v0.7.0 h1:6rTf+kzDUdowUJy7Nd5/RHZAHtLjDjti3qm77JYvSNw=
|
||||
github.com/zelenin/go-tdlib v0.7.0/go.mod h1:Xs8fXbk5n7VaPyrSs9DP7QYoBScWYsjX+lUcWmx1DIU=
|
||||
go.etcd.io/bbolt v1.3.6 h1:/ecaJf0sk1l4l6V4awd65v2C3ILy7MSj+s/x1ADCIMU=
|
||||
go.etcd.io/bbolt v1.3.6/go.mod h1:qXsaaIqmgQH0T+OPdb99Bf+PKfBBQVAdyD6TY9G8XM4=
|
||||
go.uber.org/atomic v1.6.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ=
|
||||
@ -288,7 +291,5 @@ penahub.gitlab.yandexcloud.net/backend/quiz/common.git v0.0.0-20240624105135-698
|
||||
penahub.gitlab.yandexcloud.net/backend/quiz/common.git v0.0.0-20240624105135-6982631f2a4b/go.mod h1:uOuosXduBzd2WbLH6TDZO7ME7ZextulA662oZ6OsoB0=
|
||||
penahub.gitlab.yandexcloud.net/backend/quiz/worker.git v0.0.0-20240421230341-0e086fcbb990 h1:jiO8GWO+3sCnDAV8/NAV8tQIUwae/I6/xiDilW7zf0o=
|
||||
penahub.gitlab.yandexcloud.net/backend/quiz/worker.git v0.0.0-20240421230341-0e086fcbb990/go.mod h1:zswBuTwmEsFHBVRu1nkG3/Fwylk5Vcm8OUm9iWxccSE=
|
||||
penahub.gitlab.yandexcloud.net/external/trashlog.git v0.1.2-0.20240615191139-35b268acbfed h1:/1hG64JeCaRTj6bQf3hzriuXzzGwOR0NAT72EaeEaVk=
|
||||
penahub.gitlab.yandexcloud.net/external/trashlog.git v0.1.2-0.20240615191139-35b268acbfed/go.mod h1:3ml0dAGT8U8RhpevKBfRgG6yKZum8EI2uJxAb2WCIy4=
|
||||
penahub.gitlab.yandexcloud.net/external/trashlog.git v0.1.2-0.20240615192328-b2f5dffe92ae h1:vlGInCsQSDA464q7OMv3EWGUviQWQdEcpLc8HIRo+rE=
|
||||
penahub.gitlab.yandexcloud.net/external/trashlog.git v0.1.2-0.20240615192328-b2f5dffe92ae/go.mod h1:3ml0dAGT8U8RhpevKBfRgG6yKZum8EI2uJxAb2WCIy4=
|
||||
|
||||
Loading…
Reference in New Issue
Block a user