package grpcserver import ( mcdslgrpc "git.wntrmute.dev/mc/mcdsl/grpcserver" ) // methodMap builds the mcdsl grpcserver.MethodMap for MCQ. // // Adding a new RPC without adding it to the correct map is a security // defect — the mcdsl auth interceptor denies unmapped methods by default. func methodMap() mcdslgrpc.MethodMap { return mcdslgrpc.MethodMap{ Public: publicMethods(), AuthRequired: authRequiredMethods(), AdminRequired: adminRequiredMethods(), } } func publicMethods() map[string]bool { return map[string]bool{ "/mcq.v1.AdminService/Health": true, "/mcq.v1.AuthService/Login": true, } } func authRequiredMethods() map[string]bool { return map[string]bool{ "/mcq.v1.AuthService/Logout": true, "/mcq.v1.DocumentService/ListDocuments": true, "/mcq.v1.DocumentService/GetDocument": true, "/mcq.v1.DocumentService/PutDocument": true, "/mcq.v1.DocumentService/DeleteDocument": true, "/mcq.v1.DocumentService/MarkRead": true, "/mcq.v1.DocumentService/MarkUnread": true, } } func adminRequiredMethods() map[string]bool { return map[string]bool{} }