Single-binary service: push raw markdown via REST/gRPC API, read rendered HTML through mobile-friendly web UI. MCIAS auth on all endpoints, SQLite storage, goldmark rendering with GFM and syntax highlighting. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
21 lines
443 B
Go
21 lines
443 B
Go
package grpcserver
|
|
|
|
import (
|
|
"context"
|
|
|
|
pb "git.wntrmute.dev/mc/mcq/gen/mcq/v1"
|
|
"git.wntrmute.dev/mc/mcq/internal/db"
|
|
)
|
|
|
|
type adminService struct {
|
|
pb.UnimplementedAdminServiceServer
|
|
db *db.DB
|
|
}
|
|
|
|
func (s *adminService) Health(_ context.Context, _ *pb.HealthRequest) (*pb.HealthResponse, error) {
|
|
if err := s.db.Ping(); err != nil {
|
|
return &pb.HealthResponse{Status: "unhealthy"}, nil
|
|
}
|
|
return &pb.HealthResponse{Status: "ok"}, nil
|
|
}
|