Replace the CoreDNS precursor with a purpose-built authoritative DNS server. Zones and records (A, AAAA, CNAME) are stored in SQLite and managed via synchronized gRPC + REST APIs authenticated through MCIAS. Non-authoritative queries are forwarded to upstream resolvers with in-memory caching. Key components: - DNS server (miekg/dns) with authoritative zone handling and forwarding - gRPC + REST management APIs with MCIAS auth (mcdsl integration) - SQLite storage with CNAME exclusivity enforcement and auto SOA serials - 30 tests covering database CRUD, DNS resolution, and caching Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
63 lines
1.2 KiB
Protocol Buffer
63 lines
1.2 KiB
Protocol Buffer
syntax = "proto3";
|
|
|
|
package mcns.v1;
|
|
|
|
option go_package = "git.wntrmute.dev/kyle/mcns/gen/mcns/v1";
|
|
|
|
import "google/protobuf/timestamp.proto";
|
|
|
|
service RecordService {
|
|
rpc ListRecords(ListRecordsRequest) returns (ListRecordsResponse);
|
|
rpc CreateRecord(CreateRecordRequest) returns (Record);
|
|
rpc GetRecord(GetRecordRequest) returns (Record);
|
|
rpc UpdateRecord(UpdateRecordRequest) returns (Record);
|
|
rpc DeleteRecord(DeleteRecordRequest) returns (DeleteRecordResponse);
|
|
}
|
|
|
|
message Record {
|
|
int64 id = 1;
|
|
string zone = 2;
|
|
string name = 3;
|
|
string type = 4;
|
|
string value = 5;
|
|
int32 ttl = 6;
|
|
google.protobuf.Timestamp created_at = 7;
|
|
google.protobuf.Timestamp updated_at = 8;
|
|
}
|
|
|
|
message ListRecordsRequest {
|
|
string zone = 1;
|
|
string name = 2;
|
|
string type = 3;
|
|
}
|
|
|
|
message ListRecordsResponse {
|
|
repeated Record records = 1;
|
|
}
|
|
|
|
message CreateRecordRequest {
|
|
string zone = 1;
|
|
string name = 2;
|
|
string type = 3;
|
|
string value = 4;
|
|
int32 ttl = 5;
|
|
}
|
|
|
|
message GetRecordRequest {
|
|
int64 id = 1;
|
|
}
|
|
|
|
message UpdateRecordRequest {
|
|
int64 id = 1;
|
|
string name = 2;
|
|
string type = 3;
|
|
string value = 4;
|
|
int32 ttl = 5;
|
|
}
|
|
|
|
message DeleteRecordRequest {
|
|
int64 id = 1;
|
|
}
|
|
|
|
message DeleteRecordResponse {}
|