Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterRefRoutes ¶ added in v0.3.4
func RegisterRefRoutes(mux *http.ServeMux, svcs RefResolverServices)
RegisterRefRoutes mounts the cross-chain ref resolver. Mounted at /api/v1/projects/{id}/refs/{ref}.
func RegisterRoutes ¶
func RegisterRoutes(mux *http.ServeMux, svc *projectworkplan.Service)
RegisterRoutes exposes project-scoped Work Plan and Work Task metadata routes.
Types ¶
type AttachmentIndex ¶ added in v0.3.4
type AttachmentIndex interface {
ListAttachmentsByRef(ctx context.Context, projectID, ref string) ([]projectworkplan.Attachment, error)
}
AttachmentIndex is the minimal subset of *SQLiteAttachmentStore the resolver needs. Declared locally so the handler depends on a narrow interface, not the concrete store (and so tests can stub it).
type RefResolverServices ¶ added in v0.3.4
type RefResolverServices struct {
WorkPlan *projectworkplan.Service
Index AttachmentIndex
Evidence *projectevidence.Service // optional
Confidence *projectconfidence.Service // optional
Knowledge *projectknowledge.Service // optional
}
RefResolverServices bundles the services the resolver handler closes over. Any nil service disables that enrichment branch (the handler still returns producers if attachments resolve).
Click to show internal directories.
Click to hide internal directories.