ThatAIguyA world of ideas

THE CONSCIOUSNESS ATLAS
Read. Experiment. Follow the evidence.

ConsciousnessLearn · Explore · Joseph Anady

Janady13/missionmatch / internal/modules/commandcenter/handler.go

Source identity, revision, and recovered contents.

GitHub sourceSource text recovered

Source identity

FieldRecorded value
Source typeGitHub source
Original recordJanady13/missionmatch / internal/modules/commandcenter/handler.go
DateNot specified in source
RepositoryJanady13/missionmatch
Revision720d47fae476b0d38477ae4401697d372b1ea2bc
Branchfeature/opportunity-to-outcome
Path or archive memberinternal/modules/commandcenter/handler.go
Original SHA-256e3640bc47e33a73b8d9d9999f805c9d9708041df61f9b0865cd6745c86e72de2
Git blob SHA47368cd56f9deb81f129197baf5895596971885d
Reading-copy SHA-256e3640bc47e33a73b8d9d9999f805c9d9708041df61f9b0865cd6745c86e72de2

Original source ↗

Every recorded occurrence

These 15 records contain identical original source bytes. Their paths and revisions remain part of the archive.

Original recordBranch or archiveRevision / identifierOriginal location
Janady13/missionmatch / internal/modules/commandcenter/handler.gofeature/opportunity-to-outcome720d47fae476b0d38477ae4401697d372b1ea2bcOpen original
Janady13/missionmatch / internal/modules/commandcenter/handler.gocollision-deconfliction4ee5a09972608ed89f8377c6665542d5f450f0a6Open original
Janady13/missionmatch / internal/modules/commandcenter/handler.gom5-price-to-win41000ad30fff4129fdaf5ec84e15ba14c27d4890Open original
Janady13/missionmatch / internal/modules/commandcenter/handler.gomaster1e9249840a4302ec82e123b9c9cb6f75badea3e4Open original
Janady13/missionmatch / internal/modules/commandcenter/handler.gows8-teaching-loopc823f0fb6bb2aba0f39001eb6de96f4000d9321fOpen original
Janady13/missionmatch / internal/modules/commandcenter/handler.gomag-substrateb82c7100a492dec67dfd1eda6b3f53def859be35Open original
Janady13/missionmatch / internal/modules/commandcenter/handler.gotime-to-fill-survivalb66e1e505863d4f17741a4b9ede73509e45bd6c6Open original
Janady13/missionmatch / internal/modules/commandcenter/handler.gographrag-foundationb0ddeb9f633fd138d09309d1a17b7d13bc3a67f7Open original
Janady13/missionmatch / internal/modules/commandcenter/handler.gows9-bench-ingestionf585a9ef32fa554663ce1fba9a414a54b6e49cf0Open original
Janady13/missionmatch / internal/modules/commandcenter/handler.gopresentation-readinesseb574acaa29d71ce4d0f852572e87c275c79fdb7Open original
Janady13/missionmatch / internal/modules/commandcenter/handler.govendor-intelligencefe9796a19c261951d3f2565206c0c1b5ac294465Open original
Janady13/missionmatch / internal/modules/commandcenter/handler.gows7-federal-signal6a9f6ce9cfb13345ffb47770d4960e7c2d9c17c2Open original
Janady13/missionmatch / internal/modules/commandcenter/handler.gophase2-connectorse038d4c687aec16f8bd9bc4d907eea14d91f8704Open original
Janady13/missionmatch / internal/modules/commandcenter/handler.gofeature/aioe-upgrade2178e7298d0e5d9af83afa12402fd587f0ba6ed8Open original
Janady13/missionmatch / internal/modules/commandcenter/handler.gocapture-readinessbae6af7cb2997e819174a9e9cfff5e16067a1975Open original

Recovered source transcript

package commandcenter import ( "encoding/json" "errors" "net/http" "time" "github.com/go-chi/chi/v5" "github.com/missionworkforce/missionmatch/internal/platform/security" "github.com/missionworkforce/missionmatch/internal/platform/tenant" ) // Handler serves the Workforce Command Center endpoint. type Handler struct{ svc *Service } func NewHandler(svc *Service) *Handler { return &Handler{svc: svc} } // Routes mounts the Command Center endpoints under the tenant scoped group. The dashboard read is gated // on candidate.read since the payload exposes candidate names and clearance (the same data class as GET // /candidates). Adopting a forecast as a requirement is a write, gated on requirement.write. func (h *Handler) Routes(r chi.Router) { r.With(security.RequireCapability(security.CapCandidateRead)).Get("/command-center", h.get) // The federal signal panel reads public federal data and the global mission tag and incumbent role // catalogs. It is gated on candidate.read like the dashboard since it shares the same surface, and it // is read only. The optional mission query parameter scopes the open by mission list to one code. r.With(security.RequireCapability(security.CapCandidateRead)).Get("/command-center/federal-signal", h.federalSignal) r.With(security.RequireCapability(security.CapRequirementEdit)).Post("/command-center/upcoming/{recordID}/adopt", h.adopt) } func (h *Handler) federalSignal(w http.ResponseWriter, r *http.Request) { mission := r.URL.Query().Get("mission") v, err := h.svc.FederalSignal(r.Context(), mission) if err != nil { switch { case errors.Is(err, errUnknownMission): writeJSONErr(w, http.StatusBadRequest, "unknown mission code") case errors.Is(err, tenant.ErrNoTenant): writeJSONErr(w, http.StatusForbidden, "no validated tenant") case errors.Is(err, ErrNoDatabase): writeJSONErr(w, http.StatusServiceUnavailable, "database not configured") default: writeJSONErr(w, http.StatusInternalServerError, "internal error") } return } w.Header().Set("Content-Type", "application/json") _ = json.NewEncoder(w).Encode(v) } func (h *Handler) adopt(w http.ResponseWriter, r *http.Request) { recordID := chi.URLParam(r, "recordID") var in AdoptForecastInput dec := json.NewDecoder(http.MaxBytesReader(w, r.Body, 1<<20)) dec.DisallowUnknownFields() if err := dec.Decode(&in); err != nil { writeJSONErr(w, http.StatusBadRequest, "invalid request body") return } res, err := h.svc.AdoptForecast(r.Context(), recordID, in) if err != nil { switch { case errors.Is(err, ErrForecastNotFound): writeJSONErr(w, http.StatusNotFound, "forecast not found") case errors.Is(err, ErrNotAForecast), errors.Is(err, ErrBadRequest): writeJSONErr(w, http.StatusBadRequest, "record is not an adoptable forecast") case errors.Is(err, tenant.ErrNoTenant): writeJSONErr(w, http.StatusForbidden, "no validated tenant") case errors.Is(err, ErrNoDatabase): writeJSONErr(w, http.StatusServiceUnavailable, "database not configured") default: writeJSONErr(w, http.StatusInternalServerError, "internal error") } return } w.Header().Set("Content-Type", "application/json") w.WriteHeader(http.StatusCreated) _ = json.NewEncoder(w).Encode(res) } func writeJSONErr(w http.ResponseWriter, status int, msg string) { w.Header().Set("Content-Type", "application/json") w.WriteHeader(status) _ = json.NewEncoder(w).Encode(map[string]string{"error": msg}) } func (h *Handler) get(w http.ResponseWriter, r *http.Request) { asOf := h.svc.clock() if q := r.URL.Query().Get("as_of"); q != "" { if t, err := time.Parse("2006-01-02", q); err == nil { asOf = t } } v, err := h.svc.CommandCenter(r.Context(), asOf) if err != nil { w.Header().Set("Content-Type", "application/json") switch { case errors.Is(err, tenant.ErrNoTenant): w.WriteHeader(http.StatusForbidden) _, _ = w.Write([]byte(`{"error":"no validated tenant"}`)) case errors.Is(err, ErrNoDatabase): w.WriteHeader(http.StatusServiceUnavailable) _, _ = w.Write([]byte(`{"error":"database not configured"}`)) default: w.WriteHeader(http.StatusInternalServerError) _, _ = w.Write([]byte(`{"error":"internal error"}`)) } return } w.Header().Set("Content-Type", "application/json") _ = json.NewEncoder(w).Encode(v) }

Search equations, builds, manuscript text, and recovered sources.