Files
mcns/proto/mcns/v1/zone.proto
Kyle Isom f9635578e0 Implement MCNS v1: custom Go DNS server replacing CoreDNS
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>
2026-03-26 18:37:14 -07:00

66 lines
1.3 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 ZoneService {
rpc ListZones(ListZonesRequest) returns (ListZonesResponse);
rpc CreateZone(CreateZoneRequest) returns (Zone);
rpc GetZone(GetZoneRequest) returns (Zone);
rpc UpdateZone(UpdateZoneRequest) returns (Zone);
rpc DeleteZone(DeleteZoneRequest) returns (DeleteZoneResponse);
}
message Zone {
int64 id = 1;
string name = 2;
string primary_ns = 3;
string admin_email = 4;
int32 refresh = 5;
int32 retry = 6;
int32 expire = 7;
int32 minimum_ttl = 8;
int64 serial = 9;
google.protobuf.Timestamp created_at = 10;
google.protobuf.Timestamp updated_at = 11;
}
message ListZonesRequest {}
message ListZonesResponse {
repeated Zone zones = 1;
}
message CreateZoneRequest {
string name = 1;
string primary_ns = 2;
string admin_email = 3;
int32 refresh = 4;
int32 retry = 5;
int32 expire = 6;
int32 minimum_ttl = 7;
}
message GetZoneRequest {
string name = 1;
}
message UpdateZoneRequest {
string name = 1;
string primary_ns = 2;
string admin_email = 3;
int32 refresh = 4;
int32 retry = 5;
int32 expire = 6;
int32 minimum_ttl = 7;
}
message DeleteZoneRequest {
string name = 1;
}
message DeleteZoneResponse {}