mirror of
https://git.selfprivacy.org/kherel/selfprivacy.org.app.git
synced 2024-09-12 06:47:18 +00:00
35 lines
1.1 KiB
Dart
35 lines
1.1 KiB
Dart
import 'package:selfprivacy/logic/api_maps/api_generic_result.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';
|
|
|
|
export 'package:selfprivacy/logic/api_maps/api_generic_result.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<APIGenericResult<void>> removeSimilarRecords({
|
|
required final ServerDomain domain,
|
|
final String? ip4,
|
|
});
|
|
Future<APIGenericResult<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<APIGenericResult<bool>> isApiTokenValid(final String token);
|
|
RegExp getApiTokenValidation();
|
|
}
|