selfprivacy.org.app/lib/logic/api_maps/rest_maps/dns_providers/dns_provider.dart
NaiJi 86b80156fd refactor: Generalize DKIM usage into DnsRecords
- Replace raw DKIM String object with a general DnsRecord structure
- Implement network utils for common operations with networking concepts and structures
- Implement initializing page pop up to re-try server deployment in case of a random networking error
2022-10-30 18:23:47 +04:00

32 lines
944 B
Dart

import 'package:selfprivacy/logic/api_maps/rest_maps/api_map.dart';
import 'package:selfprivacy/logic/models/hive/server_domain.dart';
import 'package:selfprivacy/logic/models/json/dns_records.dart';
class DomainNotFoundException implements Exception {
DomainNotFoundException(this.message);
final String message;
}
abstract class DnsProviderApi extends ApiMap {
Future<List<DnsRecord>> getDnsRecords({
required final ServerDomain domain,
});
Future<void> removeSimilarRecords({
required final ServerDomain domain,
final String? ip4,
});
Future<void> createMultipleDnsRecords({
required final ServerDomain domain,
final String? ip4,
});
Future<void> setDnsRecord(
final DnsRecord record,
final ServerDomain domain,
);
Future<String?> getZoneId(final String domain);
Future<List<String>> domainList();
Future<bool> isApiTokenValid(final String token);
RegExp getApiTokenValidation();
}