package downloader
import (
"context"
"io"
"github.com/gotd/td/tg"
)
type CDN interface {
UploadGetCDNFile (ctx context .Context , request *tg .UploadGetCDNFileRequest ) (tg .UploadCDNFileClass , error )
}
type Client interface {
UploadGetFile (ctx context .Context , request *tg .UploadGetFileRequest ) (tg .UploadFileClass , error )
UploadGetFileHashes (ctx context .Context , request *tg .UploadGetFileHashesRequest ) ([]tg .FileHash , error )
UploadReuploadCDNFile (ctx context .Context , request *tg .UploadReuploadCDNFileRequest ) ([]tg .FileHash , error )
UploadGetCDNFileHashes (ctx context .Context , request *tg .UploadGetCDNFileHashesRequest ) ([]tg .FileHash , error )
UploadGetWebFile (ctx context .Context , request *tg .UploadGetWebFileRequest ) (*tg .UploadWebFile , error )
}
type CDNProvider interface {
CDN (ctx context .Context , dc int , max int64 ) (CDN , io .Closer , error )
}
type chunk struct {
data []byte
tag tg .StorageFileTypeClass
}
type schema interface {
Chunk (ctx context .Context , offset int64 , limit int ) (chunk , error )
Hashes (ctx context .Context , offset int64 ) ([]tg .FileHash , error )
}
The pages are generated with Golds v0.8.4 . (GOOS=linux GOARCH=amd64)
Golds is a Go 101 project developed by Tapir Liu .
PR and bug reports are welcome and can be submitted to the issue list .
Please follow @zigo_101 (reachable from the left QR code) to get the latest news of Golds .