Documentation
¶
Overview ¶
package: rest_http / transport type: logic job: extract the request's auth credential from the wire and carry it to the handlers limits: extraction only; core resolves it and applies grants (-> internal/core)
package: rest_http / transport type: logic job: the write endpoint — POST /contribute limits: translation only; the merge runs behind core.Handle (-> internal/core)
package: rest_http / transport type: logic job: the read endpoints — POST /query and the cacheable by-id GET reads — with wire→RQL query mapping limits: translation only; the language is ranke-go's, the reads core's (-> internal/core)
package: rest_http / transport type: logic job: the operational endpoints — GET /health and GET /system/layers limits: translation only; the values come from core.Handle (-> internal/core)
package: rest_http / transport type: logic job: the verification run endpoints under /system/verification, and config mapping limits: translation only; runs are managed behind core.Handle (-> internal/core)
package: rest_http / transport type: adapter job: the HTTP envelope — content-type + status + body copy, and error → status mapping limits: framing/rendering live in core's Stream; this sets headers/status and copies (-> internal/core)
package: rest_http / transport type: adapter job: REST/HTTP endpoint backend — the Endpoints port and its server lifecycle limits: transport + translation only; all capability lives behind core.Core (-> internal/core)
Package rest_http implements the generated openapi.ServerInterface: it lifts the raw credential off the wire, builds a core.Request, and renders what core.Handle answers. Auth and access live in core; this is pure transport.
By topic: auth.go (wire credential), respond.go (writers, error → status), endpoints_read.go, endpoints_contribute.go, endpoints_system.go, endpoints_verification.go — the Server's own lifecycle here.
Index ¶
- type Server
- func (s *Server) CancelVerification(w http.ResponseWriter, r *http.Request, reportId string)
- func (s *Server) Close() error
- func (s *Server) Contribute(w http.ResponseWriter, r *http.Request)
- func (s *Server) DeleteVerification(w http.ResponseWriter, r *http.Request, reportId string)
- func (s *Server) GetBranchClaim(w http.ResponseWriter, r *http.Request, branch string, idParam string)
- func (s *Server) GetBranchClaimContent(w http.ResponseWriter, r *http.Request, branch string, idParam string)
- func (s *Server) GetBranchHead(w http.ResponseWriter, r *http.Request, branch string)
- func (s *Server) GetUniverseClaim(w http.ResponseWriter, r *http.Request, idParam string)
- func (s *Server) GetUniverseClaimContent(w http.ResponseWriter, r *http.Request, idParam string)
- func (s *Server) GetVerification(w http.ResponseWriter, r *http.Request, reportId string)
- func (s *Server) Health(w http.ResponseWriter, r *http.Request)
- func (s *Server) ListStorageLayers(w http.ResponseWriter, r *http.Request)
- func (s *Server) ListVerifications(w http.ResponseWriter, r *http.Request)
- func (s *Server) Query(w http.ResponseWriter, r *http.Request)
- func (s *Server) Serve(ctx context.Context) error
- func (s *Server) StartVerification(w http.ResponseWriter, r *http.Request)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server is a running REST/HTTP endpoint driving core.Handle.
func (*Server) CancelVerification ¶
CancelVerification serves POST /system/verification/{id}/cancel.
func (*Server) Contribute ¶
func (s *Server) Contribute(w http.ResponseWriter, r *http.Request)
Contribute serves POST /contribute. The body names the branch each claim joins, so core reads them from it and checks the C right on each.
func (*Server) DeleteVerification ¶
DeleteVerification serves DELETE /system/verification/{id}.
func (*Server) GetBranchClaim ¶
func (s *Server) GetBranchClaim(w http.ResponseWriter, r *http.Request, branch string, idParam string)
GetBranchClaim serves GET /{branch}/claim/{id}.
func (*Server) GetBranchClaimContent ¶
func (s *Server) GetBranchClaimContent(w http.ResponseWriter, r *http.Request, branch string, idParam string)
GetBranchClaimContent serves GET /{branch}/claim/{id}/content — the content of claim {id} within branch {name}'s closure (inline or blob, resolved by core).
func (*Server) GetBranchHead ¶
GetBranchHead serves GET /{branch}/head.
func (*Server) GetUniverseClaim ¶
GetUniverseClaim serves GET /$universe/claim/{id}.
func (*Server) GetUniverseClaimContent ¶
GetUniverseClaimContent serves GET /$universe/claim/{id}/content — the content of claim {id}, privileged.
func (*Server) GetVerification ¶
GetVerification serves GET /system/verification/{id}.
func (*Server) Health ¶
func (s *Server) Health(w http.ResponseWriter, r *http.Request)
Health serves GET /health.
func (*Server) ListStorageLayers ¶
func (s *Server) ListStorageLayers(w http.ResponseWriter, r *http.Request)
ListStorageLayers serves GET /system/layers.
func (*Server) ListVerifications ¶
func (s *Server) ListVerifications(w http.ResponseWriter, r *http.Request)
ListVerifications serves GET /system/verification.
func (*Server) Query ¶
func (s *Server) Query(w http.ResponseWriter, r *http.Request)
Query serves POST /query: it runs the declarative query and streams the results.
func (*Server) StartVerification ¶
func (s *Server) StartVerification(w http.ResponseWriter, r *http.Request)
StartVerification serves POST /system/verification.