dataurl.go 660 B

123456789101112131415161718192021222324
  1. package dataurlfetcher
  2. import (
  3. "context"
  4. "github.com/v2fly/v2ray-core/v5/app/subscription"
  5. "github.com/v2fly/v2ray-core/v5/app/subscription/documentfetcher"
  6. "github.com/v2fly/v2ray-core/v5/common"
  7. )
  8. //go:generate go run github.com/v2fly/v2ray-core/v5/common/errors/errorgen
  9. func newDataURLFetcher() *dataURLFetcher {
  10. return &dataURLFetcher{}
  11. }
  12. func init() {
  13. common.Must(documentfetcher.RegisterFetcher("dataurl", newDataURLFetcher()))
  14. }
  15. type dataURLFetcher struct{}
  16. func (d *dataURLFetcher) DownloadDocument(ctx context.Context, source *subscription.ImportSource, opts ...documentfetcher.FetcherOptions) ([]byte, error) {
  17. panic("implement me")
  18. }