mirror of
https://git.selfprivacy.org/kherel/selfprivacy.org.app.git
synced 2024-08-25 14:31:51 +00:00
37 lines
1.3 KiB
Dart
37 lines
1.3 KiB
Dart
import 'package:selfprivacy/logic/api_maps/generic_result.dart';
|
|
import 'package:selfprivacy/logic/api_maps/rest_maps/dns_providers/desired_dns_record.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/generic_result.dart';
|
|
|
|
abstract class DnsProvider {
|
|
Future<GenericResult<bool>> tryInitApiByToken(final String token);
|
|
Future<GenericResult<String?>> getZoneId(final String domain);
|
|
Future<GenericResult<void>> removeDomainRecords({
|
|
required final ServerDomain domain,
|
|
final String? ip4,
|
|
});
|
|
Future<GenericResult<List<DnsRecord>>> getDnsRecords({
|
|
required final ServerDomain domain,
|
|
});
|
|
Future<GenericResult<void>> createDomainRecords({
|
|
required final ServerDomain domain,
|
|
final String? ip4,
|
|
});
|
|
Future<GenericResult<void>> setDnsRecord(
|
|
final DnsRecord record,
|
|
final ServerDomain domain,
|
|
);
|
|
Future<GenericResult<List<String>>> domainList();
|
|
Future<GenericResult<List<DesiredDnsRecord>>> validateDnsRecords(
|
|
final ServerDomain domain,
|
|
final String ip4,
|
|
final String dkimPublicKey,
|
|
);
|
|
List<DesiredDnsRecord> getDesiredDnsRecords(
|
|
final String? domainName,
|
|
final String? ip4,
|
|
final String? dkimPublicKey,
|
|
);
|
|
}
|