Documentation
¶
Overview ¶
Package server is the Connect translation layer over the transport-neutral service implementations (CONSTRAINTS C13), with one adapter per service and each method a pure unwrap/call/wrap plus the sentinel-to-code mapping in toConnectErr. No business logic lives here, so another transport (grpc-gateway, a real gRPC server) would be a sibling package wrapping the same service/ implementations.
Index ¶
- Constants
- func ConnectError(err error) *connect.Error
- func SlowLine(procedure string, over time.Duration, s timing.Snapshot) string
- type API
- type Budget
- type Check
- func (a *Check) CheckDesign(ctx context.Context, req *connect.Request[webapi.CheckDesignRequest]) (*connect.Response[webapi.CheckDesignResponse], error)
- func (a *Check) GetCheckReport(ctx context.Context, req *connect.Request[webapi.GetCheckReportRequest]) (*connect.Response[webapi.GetCheckReportResponse], error)
- func (a *Check) GetComponentParams(ctx context.Context, req *connect.Request[webapi.GetComponentParamsRequest]) (*connect.Response[webapi.GetComponentParamsResponse], error)
- func (a *Check) GetExpectations(ctx context.Context, req *connect.Request[webapi.GetExpectationsRequest]) (*connect.Response[webapi.GetExpectationsResponse], error)
- func (a *Check) GetInterfaceCoverage(ctx context.Context, req *connect.Request[webapi.GetInterfaceCoverageRequest]) (*connect.Response[webapi.GetInterfaceCoverageResponse], error)
- func (a *Check) GetNamingConvention(ctx context.Context, req *connect.Request[webapi.GetNamingConventionRequest]) (*connect.Response[webapi.GetNamingConventionResponse], error)
- func (a *Check) ListRules(ctx context.Context, req *connect.Request[webapi.ListRulesRequest]) (*connect.Response[webapi.ListRulesResponse], error)
- func (a *Check) RenderCheckReport(ctx context.Context, req *connect.Request[webapi.RenderCheckReportRequest]) (*connect.Response[webapi.RenderCheckReportResponse], error)
- type Connection
- func (a *Connection) CreateConnection(ctx context.Context, req *connect.Request[webapi.CreateConnectionRequest]) (*connect.Response[webapi.Connection], error)
- func (a *Connection) DeleteConnection(ctx context.Context, req *connect.Request[webapi.DeleteConnectionRequest]) (*connect.Response[emptypb.Empty], error)
- func (a *Connection) GetConnection(ctx context.Context, req *connect.Request[webapi.GetConnectionRequest]) (*connect.Response[webapi.Connection], error)
- func (a *Connection) ListConnections(ctx context.Context, req *connect.Request[webapi.ListConnectionsRequest]) (*connect.Response[webapi.ListConnectionsResponse], error)
- func (a *Connection) RotateConnection(ctx context.Context, req *connect.Request[webapi.RotateConnectionRequest]) (*connect.Response[webapi.Connection], error)
- type Design
- func (a *Design) AddDesigns(ctx context.Context, req *connect.Request[webapi.AddDesignsRequest]) (*connect.Response[webapi.AddDesignsResponse], error)
- func (a *Design) BatchUpdateArtifacts(ctx context.Context, req *connect.Request[webapi.BatchUpdateArtifactsRequest]) (*connect.Response[webapi.BatchUpdateArtifactsResponse], error)
- func (a *Design) CreateDesign(ctx context.Context, req *connect.Request[webapi.CreateDesignRequest]) (*connect.Response[webapi.Design], error)
- func (a *Design) CreateReport(ctx context.Context, req *connect.Request[webapi.CreateReportRequest]) (*connect.Response[webapi.Report], error)
- func (a *Design) DeleteArtifact(ctx context.Context, req *connect.Request[webapi.DeleteArtifactRequest]) (*connect.Response[emptypb.Empty], error)
- func (a *Design) DeleteDesign(ctx context.Context, req *connect.Request[webapi.DeleteDesignRequest]) (*connect.Response[emptypb.Empty], error)
- func (a *Design) DeleteReport(ctx context.Context, req *connect.Request[webapi.DeleteReportRequest]) (*connect.Response[emptypb.Empty], error)
- func (a *Design) GetArtifact(ctx context.Context, req *connect.Request[webapi.GetArtifactRequest]) (*connect.Response[webapi.Artifact], error)
- func (a *Design) GetDesign(ctx context.Context, req *connect.Request[webapi.GetDesignRequest]) (*connect.Response[webapi.Design], error)
- func (a *Design) GetReport(ctx context.Context, req *connect.Request[webapi.GetReportRequest]) (*connect.Response[webapi.Report], error)
- func (a *Design) ImportDesignFiles(ctx context.Context, req *connect.Request[webapi.ImportDesignFilesRequest]) (*connect.Response[webapi.ImportDesignFilesResponse], error)
- func (a *Design) LinkArtifact(ctx context.Context, req *connect.Request[webapi.LinkArtifactRequest]) (*connect.Response[webapi.Artifact], error)
- func (a *Design) ListArtifacts(ctx context.Context, req *connect.Request[webapi.ListArtifactsRequest]) (*connect.Response[webapi.ListArtifactsResponse], error)
- func (a *Design) ListDesignRevisions(ctx context.Context, req *connect.Request[webapi.ListDesignRevisionsRequest]) (*connect.Response[webapi.ListDesignRevisionsResponse], error)
- func (a *Design) ListDesigns(ctx context.Context, req *connect.Request[webapi.ListDesignsRequest]) (*connect.Response[webapi.ListDesignsResponse], error)
- func (a *Design) ListReports(ctx context.Context, req *connect.Request[webapi.ListReportsRequest]) (*connect.Response[webapi.ListReportsResponse], error)
- func (a *Design) SyncDesign(ctx context.Context, req *connect.Request[webapi.SyncDesignRequest]) (*connect.Response[webapi.SyncDesignResponse], error)
- func (a *Design) UnlinkArtifact(ctx context.Context, req *connect.Request[webapi.UnlinkArtifactRequest]) (*connect.Response[webapi.Artifact], error)
- func (a *Design) UpdateArtifact(ctx context.Context, req *connect.Request[webapi.UpdateArtifactRequest]) (*connect.Response[webapi.Artifact], error)
- func (a *Design) UpdateDesign(ctx context.Context, req *connect.Request[webapi.UpdateDesignRequest]) (*connect.Response[webapi.Design], error)
- type DesignView
- func (a *DesignView) GetBoardGeometry(ctx context.Context, req *connect.Request[webapi.GetBoardGeometryRequest]) (*connect.Response[webapi.GetBoardGeometryResponse], error)
- func (a *DesignView) GetBoardMeshes(ctx context.Context, req *connect.Request[webapi.GetBoardMeshesRequest]) (*connect.Response[webapi.GetBoardMeshesResponse], error)
- func (a *DesignView) GetLayoutReport(ctx context.Context, req *connect.Request[webapi.GetLayoutReportRequest]) (*connect.Response[webapi.GetLayoutReportResponse], error)
- func (a *DesignView) GetSheet(ctx context.Context, req *connect.Request[webapi.GetSheetRequest]) (*connect.Response[webapi.GetSheetResponse], error)
- func (a *DesignView) GetSummary(ctx context.Context, req *connect.Request[webapi.GetSummaryRequest]) (*connect.Response[webapi.GetSummaryResponse], error)
- func (a *DesignView) HighlightSheet(ctx context.Context, req *connect.Request[webapi.HighlightSheetRequest]) (*connect.Response[webapi.HighlightSheetResponse], error)
- func (a *DesignView) ListWalkKinds(ctx context.Context, req *connect.Request[webapi.ListWalkKindsRequest]) (*connect.Response[webapi.ListWalkKindsResponse], error)
- func (a *DesignView) LocateSubjects(ctx context.Context, req *connect.Request[webapi.LocateSubjectsRequest]) (*connect.Response[webapi.LocateSubjectsResponse], error)
- func (a *DesignView) ReachablePins(ctx context.Context, req *connect.Request[webapi.ReachablePinsRequest]) (*connect.Response[webapi.ReachablePinsResponse], error)
- func (a *DesignView) TraceDesign(ctx context.Context, req *connect.Request[webapi.TraceDesignRequest]) (*connect.Response[webapi.TraceDesignResponse], error)
- func (a *DesignView) WalkDesign(ctx context.Context, req *connect.Request[webapi.WalkDesignRequest]) (*connect.Response[webapi.WalkDesignResponse], error)
- type Diff
- type Lexicon
- func (a *Lexicon) CompareLexicons(ctx context.Context, req *connect.Request[webapi.CompareLexiconsRequest]) (*connect.Response[webapi.CompareLexiconsResponse], error)
- func (a *Lexicon) ExplainNet(ctx context.Context, req *connect.Request[webapi.ExplainNetRequest]) (*connect.Response[webapi.ExplainNetResponse], error)
- func (a *Lexicon) GetLexicon(ctx context.Context, req *connect.Request[webapi.GetLexiconRequest]) (*connect.Response[webapi.GetLexiconResponse], error)
- func (a *Lexicon) RenderConvention(ctx context.Context, req *connect.Request[webapi.RenderConventionRequest]) (*connect.Response[webapi.RenderConventionResponse], error)
- type Pack
- func (a *Pack) CreatePack(ctx context.Context, req *connect.Request[webapi.CreatePackRequest]) (*connect.Response[webapi.Pack], error)
- func (a *Pack) DeletePack(ctx context.Context, req *connect.Request[webapi.DeletePackRequest]) (*connect.Response[emptypb.Empty], error)
- func (a *Pack) GetPack(ctx context.Context, req *connect.Request[webapi.GetPackRequest]) (*connect.Response[webapi.Pack], error)
- func (a *Pack) ImportPackFiles(ctx context.Context, req *connect.Request[webapi.ImportPackFilesRequest]) (*connect.Response[webapi.Pack], error)
- func (a *Pack) LinkPack(ctx context.Context, req *connect.Request[webapi.LinkPackRequest]) (*connect.Response[webapi.Pack], error)
- func (a *Pack) ListPacks(ctx context.Context, req *connect.Request[webapi.ListPacksRequest]) (*connect.Response[webapi.ListPacksResponse], error)
- func (a *Pack) SyncPack(ctx context.Context, req *connect.Request[webapi.SyncPackRequest]) (*connect.Response[webapi.SyncPackResponse], error)
- func (a *Pack) UnlinkPack(ctx context.Context, req *connect.Request[webapi.UnlinkPackRequest]) (*connect.Response[webapi.Pack], error)
- func (a *Pack) UpdatePack(ctx context.Context, req *connect.Request[webapi.UpdatePackRequest]) (*connect.Response[webapi.Pack], error)
- type Project
- func (a *Project) CreateProject(ctx context.Context, req *connect.Request[webapi.CreateProjectRequest]) (*connect.Response[webapi.Project], error)
- func (a *Project) DeleteProject(ctx context.Context, req *connect.Request[webapi.DeleteProjectRequest]) (*connect.Response[emptypb.Empty], error)
- func (a *Project) GetProject(ctx context.Context, req *connect.Request[webapi.GetProjectRequest]) (*connect.Response[webapi.Project], error)
- func (a *Project) ListProjects(ctx context.Context, req *connect.Request[webapi.ListProjectsRequest]) (*connect.Response[webapi.ListProjectsResponse], error)
- func (a *Project) ResolveDesign(ctx context.Context, req *connect.Request[webapi.ResolveDesignRequest]) (*connect.Response[webapi.ResolveDesignResponse], error)
- func (a *Project) UpdateProject(ctx context.Context, req *connect.Request[webapi.UpdateProjectRequest]) (*connect.Response[webapi.Project], error)
- type Query
- func (a *Query) ListQuerySets(ctx context.Context, req *connect.Request[webapi.ListQuerySetsRequest]) (*connect.Response[webapi.ListQuerySetsResponse], error)
- func (a *Query) ListRelations(ctx context.Context, req *connect.Request[webapi.ListRelationsRequest]) (*connect.Response[webapi.ListRelationsResponse], error)
- func (a *Query) ParseQuerySet(ctx context.Context, req *connect.Request[webapi.ParseQuerySetRequest]) (*connect.Response[webapi.ParseQuerySetResponse], error)
- func (a *Query) RunQueries(ctx context.Context, req *connect.Request[webapi.RunQueriesRequest]) (*connect.Response[webapi.RunQueriesResponse], error)
- func (a *Query) RunQuery(ctx context.Context, req *connect.Request[webapi.RunQueryRequest]) (*connect.Response[webapi.RunQueryResponse], error)
- type Review
- func (a *Review) CreateReview(ctx context.Context, req *connect.Request[webapi.CreateReviewRequest]) (*connect.Response[webapi.Review], error)
- func (a *Review) DeleteReview(ctx context.Context, req *connect.Request[webapi.DeleteReviewRequest]) (*connect.Response[emptypb.Empty], error)
- func (a *Review) GetReview(ctx context.Context, req *connect.Request[webapi.GetReviewRequest]) (*connect.Response[webapi.Review], error)
- func (a *Review) GetReviewManifest(ctx context.Context, req *connect.Request[webapi.GetReviewManifestRequest]) (*connect.Response[webapi.GetReviewManifestResponse], error)
- func (a *Review) ListChecklists(ctx context.Context, req *connect.Request[webapi.ListChecklistsRequest]) (*connect.Response[webapi.ListChecklistsResponse], error)
- func (a *Review) ListReviews(ctx context.Context, req *connect.Request[webapi.ListReviewsRequest]) (*connect.Response[webapi.ListReviewsResponse], error)
- func (a *Review) RenderReviewReport(ctx context.Context, req *connect.Request[webapi.RenderReviewReportRequest]) (*connect.Response[webapi.RenderReviewReportResponse], error)
- type ServerInfo
- type Snapshot
- func (a *Snapshot) DeleteSnapshot(ctx context.Context, req *connect.Request[webapi.DeleteSnapshotRequest]) (*connect.Response[emptypb.Empty], error)
- func (a *Snapshot) GetSnapshot(ctx context.Context, req *connect.Request[webapi.GetSnapshotRequest]) (*connect.Response[webapi.Snapshot], error)
- func (a *Snapshot) Ingest(ctx context.Context, req *connect.Request[webapi.IngestRequest]) (*connect.Response[webapi.Snapshot], error)
- func (a *Snapshot) ListSnapshots(ctx context.Context, req *connect.Request[webapi.ListSnapshotsRequest]) (*connect.Response[webapi.ListSnapshotsResponse], error)
- func (a *Snapshot) UpdateSnapshot(ctx context.Context, req *connect.Request[webapi.UpdateSnapshotRequest]) (*connect.Response[webapi.Snapshot], error)
- func (a *Snapshot) UploadBlobs(ctx context.Context, req *connect.Request[webapi.UploadBlobsRequest]) (*connect.Response[webapi.UploadBlobsResponse], error)
- type Table
- type Timing
- type ViewerRoom
- type Workspace
- func (a *Workspace) CreateMount(ctx context.Context, req *connect.Request[webapi.CreateMountRequest]) (*connect.Response[webapi.Mount], error)
- func (a *Workspace) CreateMountWebhook(ctx context.Context, req *connect.Request[webapi.CreateMountWebhookRequest]) (*connect.Response[webapi.MountWebhook], error)
- func (a *Workspace) DeclareCompanion(ctx context.Context, req *connect.Request[webapi.DeclareCompanionRequest]) (*connect.Response[webapi.DeclareCompanionResponse], error)
- func (a *Workspace) DeleteMount(ctx context.Context, req *connect.Request[webapi.DeleteMountRequest]) (*connect.Response[webapi.DeleteMountResponse], error)
- func (a *Workspace) GetMount(ctx context.Context, req *connect.Request[webapi.GetMountRequest]) (*connect.Response[webapi.Mount], error)
- func (a *Workspace) ListDesignFiles(ctx context.Context, req *connect.Request[webapi.ListDesignFilesRequest]) (*connect.Response[webapi.ListDesignFilesResponse], error)
- func (a *Workspace) ListDir(ctx context.Context, req *connect.Request[webapi.ListDirRequest]) (*connect.Response[webapi.ListDirResponse], error)
- func (a *Workspace) ListMounts(ctx context.Context, req *connect.Request[webapi.ListMountsRequest]) (*connect.Response[webapi.ListMountsResponse], error)
- func (a *Workspace) ProposeDesigns(ctx context.Context, req *connect.Request[webapi.ProposeDesignsRequest]) (*connect.Response[webapi.ProposeDesignsResponse], error)
Constants ¶
const SnapshotRefreshedHeader = "Agni-Snapshot-Refreshed"
SnapshotRefreshedHeader is the response header naming the tiers a refreshed snapshot found changed, comma-separated, when a question read a snapshot again rather than refusing it as stale (agni issue 1639). A snapshot refreshes only when its definition sets refresh.
const TimingHeader = "Agni-Timing"
TimingHeader is the request header that asks for a request's timing, and the response header that carries it back as a RequestTiming in protojson. A value containing "explain" also asks each query evaluation for its plan, and one containing "memory" asks each stage for the memory as it ended.
Variables ¶
This section is empty.
Functions ¶
func ConnectError ¶ added in v0.2.4
ConnectError converts a service error to its wire form. It maps the service tier's error sentinels to Connect codes and adds a query's syntax-error position as a detail. An unclassified error is treated as an invalid argument, the service tier's documented default (load/parse failures). The CLI writes a failed request through it under --format json, so a script reading the CLI and a client reading the API see one error shape.
Types ¶
type API ¶ added in v0.2.2
type API struct {
Workspace *service.WorkspaceService
Project *service.ProjectService
// Snapshot ingests designs, and every other service answers questions about them (agni issue
// 1061). It must hold the same ProjectResolver as they do, or a question names a snapshot that
// none of them holds.
Snapshot *service.SnapshotService
DesignView *service.DesignViewService
// Design serves the stored designs, "designs/{design}" (agni issue 1694). Nil serves an empty
// catalog that refuses every write.
Design *service.DesignService
// Pack serves the stored packs, "packs/{pack}" (agni issue 1704). Nil serves none and refuses
// every write.
Pack *service.PackService
// Connection serves the sign-ins private sources are read through, "connections/{connection}"
// (agni issue 1724). Nil serves none and refuses a write.
Connection *service.ConnectionService
Check *service.CheckService
Diff *service.DiffService
Query *service.QueryService
Review *service.ReviewService
// Info answers ServerService.GetServerInfo (agni issue 1629). Nil answers this build's version and
// the snapshot features alone, as the browser engine does.
Info *service.ServerInfoService
// Timing times the requests that ask, and logs the slow ones (agni issue 914). Its zero value
// still answers a request that asks with the Agni-Timing header.
Timing Timing
// Hooks run inside Timing around every service's requests, so a host can act on what a request
// names. `agni serve` warms a design's browser-engine seed this way (agni issue 1572).
Hooks []connect.Interceptor
}
API is the set of services one host serves over Connect. `agni serve` and the wasm engine both register through it, so the two cannot serve different lists of handlers. TableService holds no state, so it has no field here and every host serves it.
type Budget ¶ added in v0.2.2
type Budget struct {
// Enforce caps each evaluation's work. Zero enforces nothing, so a deployment can watch what its
// queries cost (Warn) before it chooses a cap.
Enforce int64
// Warn is the work above which a query is logged with its cost and a suggested cap. Zero logs
// nothing.
Warn int64
// Log receives each line. Nil discards them.
Log func(format string, args ...any)
}
Budget is the work budget a server applies to every query it evaluates, and how it reports the queries that cost the most (agni issue 792). Work is what a fact base counts. It counts candidate comparisons, each row a generator emits, and the connections a circuit walk examines.
func (Budget) Interceptor ¶ added in v0.2.2
func (b Budget) Interceptor() connect.UnaryInterceptorFunc
Interceptor sets the budget on every request's context. The request's queries and query-backed rules read it there. A request may narrow the budget but never raise it. Interceptor also logs each query whose reported work passes Warn, and each one the budget stopped.
type Check ¶
type Check struct {
webapiconnect.UnimplementedCheckServiceHandler
// contains filtered or unexported fields
}
Check adapts service.CheckService to the generated Connect handler interface.
func (*Check) CheckDesign ¶
func (*Check) GetCheckReport ¶
func (*Check) GetComponentParams ¶
func (*Check) GetExpectations ¶
func (*Check) GetInterfaceCoverage ¶
func (*Check) GetNamingConvention ¶ added in v0.2.0
func (*Check) RenderCheckReport ¶ added in v0.2.2
type Connection ¶ added in v0.9.0
type Connection struct {
webapiconnect.UnimplementedConnectionServiceHandler
// contains filtered or unexported fields
}
Connection adapts service.ConnectionService to the generated Connect handler interface (agni issue 1724).
func NewConnection ¶ added in v0.9.0
func NewConnection(svc *service.ConnectionService) *Connection
NewConnection wraps svc for Connect.
func (*Connection) CreateConnection ¶ added in v0.9.0
func (a *Connection) CreateConnection(ctx context.Context, req *connect.Request[webapi.CreateConnectionRequest]) (*connect.Response[webapi.Connection], error)
func (*Connection) DeleteConnection ¶ added in v0.9.0
func (*Connection) GetConnection ¶ added in v0.9.0
func (a *Connection) GetConnection(ctx context.Context, req *connect.Request[webapi.GetConnectionRequest]) (*connect.Response[webapi.Connection], error)
func (*Connection) ListConnections ¶ added in v0.9.0
func (a *Connection) ListConnections(ctx context.Context, req *connect.Request[webapi.ListConnectionsRequest]) (*connect.Response[webapi.ListConnectionsResponse], error)
func (*Connection) RotateConnection ¶ added in v0.11.0
func (a *Connection) RotateConnection(ctx context.Context, req *connect.Request[webapi.RotateConnectionRequest]) (*connect.Response[webapi.Connection], error)
RotateConnection replaces a sealed server connection's secret (agni issue 1802).
type Design ¶
type Design struct {
webapiconnect.UnimplementedDesignServiceHandler
// contains filtered or unexported fields
}
Design adapts service.DesignService to the generated Connect handler interface.
func NewDesign ¶
func NewDesign(svc *service.DesignService) *Design
NewDesign wraps svc for Connect.
func (*Design) AddDesigns ¶ added in v0.9.0
func (*Design) BatchUpdateArtifacts ¶ added in v0.9.0
func (*Design) CreateDesign ¶ added in v0.9.0
func (*Design) CreateReport ¶ added in v0.9.0
func (*Design) DeleteArtifact ¶ added in v0.9.0
func (*Design) DeleteDesign ¶ added in v0.9.0
func (*Design) DeleteReport ¶ added in v0.9.0
func (*Design) GetArtifact ¶ added in v0.9.0
func (*Design) ImportDesignFiles ¶ added in v0.9.0
func (*Design) LinkArtifact ¶ added in v0.9.0
func (*Design) ListArtifacts ¶ added in v0.9.0
func (*Design) ListDesignRevisions ¶ added in v0.10.0
func (a *Design) ListDesignRevisions(ctx context.Context, req *connect.Request[webapi.ListDesignRevisionsRequest]) (*connect.Response[webapi.ListDesignRevisionsResponse], error)
ListDesignRevisions lists the revisions of a design the server has read (agni issue 1725).
func (*Design) ListDesigns ¶ added in v0.9.0
func (*Design) ListReports ¶ added in v0.9.0
func (*Design) SyncDesign ¶ added in v0.9.0
func (*Design) UnlinkArtifact ¶ added in v0.9.0
func (*Design) UpdateArtifact ¶ added in v0.9.0
type DesignView ¶ added in v0.9.0
type DesignView struct {
webapiconnect.UnimplementedDesignViewServiceHandler
// contains filtered or unexported fields
}
DesignView adapts service.DesignViewService to the generated Connect handler interface.
func NewDesignView ¶ added in v0.9.0
func NewDesignView(svc *service.DesignViewService) *DesignView
NewDesignView wraps svc for Connect.
func (*DesignView) GetBoardGeometry ¶ added in v0.9.0
func (a *DesignView) GetBoardGeometry(ctx context.Context, req *connect.Request[webapi.GetBoardGeometryRequest]) (*connect.Response[webapi.GetBoardGeometryResponse], error)
func (*DesignView) GetBoardMeshes ¶ added in v0.9.0
func (a *DesignView) GetBoardMeshes(ctx context.Context, req *connect.Request[webapi.GetBoardMeshesRequest]) (*connect.Response[webapi.GetBoardMeshesResponse], error)
func (*DesignView) GetLayoutReport ¶ added in v0.9.0
func (a *DesignView) GetLayoutReport(ctx context.Context, req *connect.Request[webapi.GetLayoutReportRequest]) (*connect.Response[webapi.GetLayoutReportResponse], error)
func (*DesignView) GetSheet ¶ added in v0.9.0
func (a *DesignView) GetSheet(ctx context.Context, req *connect.Request[webapi.GetSheetRequest]) (*connect.Response[webapi.GetSheetResponse], error)
func (*DesignView) GetSummary ¶ added in v0.9.0
func (a *DesignView) GetSummary(ctx context.Context, req *connect.Request[webapi.GetSummaryRequest]) (*connect.Response[webapi.GetSummaryResponse], error)
func (*DesignView) HighlightSheet ¶ added in v0.9.0
func (a *DesignView) HighlightSheet(ctx context.Context, req *connect.Request[webapi.HighlightSheetRequest]) (*connect.Response[webapi.HighlightSheetResponse], error)
func (*DesignView) ListWalkKinds ¶ added in v0.9.0
func (a *DesignView) ListWalkKinds(ctx context.Context, req *connect.Request[webapi.ListWalkKindsRequest]) (*connect.Response[webapi.ListWalkKindsResponse], error)
func (*DesignView) LocateSubjects ¶ added in v0.9.0
func (a *DesignView) LocateSubjects(ctx context.Context, req *connect.Request[webapi.LocateSubjectsRequest]) (*connect.Response[webapi.LocateSubjectsResponse], error)
func (*DesignView) ReachablePins ¶ added in v0.9.0
func (a *DesignView) ReachablePins(ctx context.Context, req *connect.Request[webapi.ReachablePinsRequest]) (*connect.Response[webapi.ReachablePinsResponse], error)
func (*DesignView) TraceDesign ¶ added in v0.9.0
func (a *DesignView) TraceDesign(ctx context.Context, req *connect.Request[webapi.TraceDesignRequest]) (*connect.Response[webapi.TraceDesignResponse], error)
func (*DesignView) WalkDesign ¶ added in v0.9.0
func (a *DesignView) WalkDesign(ctx context.Context, req *connect.Request[webapi.WalkDesignRequest]) (*connect.Response[webapi.WalkDesignResponse], error)
type Diff ¶
type Diff struct {
webapiconnect.UnimplementedDiffServiceHandler
// contains filtered or unexported fields
}
Diff adapts service.DiffService to the generated Connect handler interface.
func (*Diff) DiffDesigns ¶
type Lexicon ¶ added in v0.4.0
type Lexicon struct {
webapiconnect.UnimplementedLexiconServiceHandler
// contains filtered or unexported fields
}
Lexicon adapts service.LexiconService to the generated Connect handler interface.
func NewLexicon ¶ added in v0.4.0
func NewLexicon(svc *service.LexiconService) *Lexicon
NewLexicon wraps svc for Connect.
func (*Lexicon) CompareLexicons ¶ added in v0.4.0
func (*Lexicon) ExplainNet ¶ added in v0.4.0
func (*Lexicon) GetLexicon ¶ added in v0.4.0
func (*Lexicon) RenderConvention ¶ added in v0.4.0
type Pack ¶ added in v0.9.0
type Pack struct {
webapiconnect.UnimplementedPackServiceHandler
// contains filtered or unexported fields
}
Pack adapts service.PackService to the generated Connect handler interface (agni issue 1704).
func NewPack ¶ added in v0.9.0
func NewPack(svc *service.PackService) *Pack
NewPack wraps svc for Connect.
func (*Pack) CreatePack ¶ added in v0.9.0
func (*Pack) DeletePack ¶ added in v0.9.0
func (*Pack) ImportPackFiles ¶ added in v0.9.0
func (*Pack) UnlinkPack ¶ added in v0.11.0
type Project ¶ added in v0.2.0
type Project struct {
webapiconnect.UnimplementedProjectServiceHandler
// contains filtered or unexported fields
}
Project adapts service.ProjectService to the generated Connect handler interface.
func NewProject ¶ added in v0.2.0
func NewProject(svc *service.ProjectService) *Project
NewProject wraps svc for Connect.
func (*Project) CreateProject ¶ added in v0.9.0
func (*Project) DeleteProject ¶ added in v0.9.0
func (*Project) GetProject ¶ added in v0.2.0
func (*Project) ListProjects ¶ added in v0.2.0
func (*Project) ResolveDesign ¶ added in v0.2.0
type Query ¶
type Query struct {
webapiconnect.UnimplementedQueryServiceHandler
// contains filtered or unexported fields
}
Query adapts service.QueryService to the generated Connect handler interface.
func (*Query) ListQuerySets ¶ added in v0.2.2
func (*Query) ListRelations ¶
func (*Query) ParseQuerySet ¶ added in v0.2.2
func (*Query) RunQueries ¶ added in v0.2.2
type Review ¶
type Review struct {
webapiconnect.UnimplementedReviewServiceHandler
// contains filtered or unexported fields
}
Review adapts service.ReviewService to the generated Connect handler interface.
func NewReview ¶
func NewReview(svc *service.ReviewService) *Review
NewReview wraps svc for Connect.
func (*Review) CreateReview ¶ added in v0.2.0
func (*Review) DeleteReview ¶ added in v0.2.0
func (*Review) GetReviewManifest ¶ added in v0.2.0
func (*Review) ListChecklists ¶ added in v0.2.2
func (*Review) ListReviews ¶ added in v0.2.0
func (*Review) RenderReviewReport ¶ added in v0.2.2
type ServerInfo ¶ added in v0.8.0
type ServerInfo struct {
webapiconnect.UnimplementedServerServiceHandler
// contains filtered or unexported fields
}
ServerInfo adapts service.ServerInfoService to the generated Connect handler interface.
func NewServerInfo ¶ added in v0.8.0
func NewServerInfo(svc *service.ServerInfoService) *ServerInfo
NewServerInfo wraps a ServerInfoService.
func (*ServerInfo) GetServerInfo ¶ added in v0.8.0
func (a *ServerInfo) GetServerInfo(ctx context.Context, req *connect.Request[webapi.GetServerInfoRequest]) (*connect.Response[webapi.ServerInfo], error)
type Snapshot ¶ added in v0.3.0
type Snapshot struct {
webapiconnect.UnimplementedSnapshotServiceHandler
// contains filtered or unexported fields
}
Snapshot adapts service.SnapshotService to the generated Connect handler interface.
func NewSnapshot ¶ added in v0.3.0
func NewSnapshot(svc *service.SnapshotService) *Snapshot
NewSnapshot wraps svc for Connect.
func (*Snapshot) DeleteSnapshot ¶ added in v0.3.0
func (*Snapshot) GetSnapshot ¶ added in v0.3.0
func (*Snapshot) ListSnapshots ¶ added in v0.3.0
func (*Snapshot) UpdateSnapshot ¶ added in v0.3.0
func (*Snapshot) UploadBlobs ¶ added in v0.3.0
type Table ¶ added in v0.2.2
type Table struct {
webapiconnect.UnimplementedTableServiceHandler
// contains filtered or unexported fields
}
Table adapts service.TableService to the generated Connect handler interface.
func NewTable ¶ added in v0.2.2
func NewTable() *Table
NewTable wraps the projection service for Connect. It holds no state, so it takes none.
type Timing ¶ added in v0.2.2
type Timing struct {
// Slow logs every request that takes longer, with the stage that took the most, the tier that
// answered each cached read, the slowest rules, and the plan when evaluation was the slowest
// stage. Zero logs nothing.
Slow time.Duration
// Log receives each line. Nil discards them.
Log func(format string, args ...any)
}
Timing times requests and reports where their time went (agni issue 914). A request is timed when it asks (the Agni-Timing header) or when Slow is set, and a request that asked gets its breakdown in the Agni-Timing and Server-Timing response headers.
func (Timing) Interceptor ¶ added in v0.2.2
func (t Timing) Interceptor() connect.UnaryInterceptorFunc
Interceptor returns the timing interceptor. A request that neither asks nor could be slow-logged passes straight through.
type ViewerRoom ¶ added in v0.3.9
type ViewerRoom struct {
webapiconnect.UnimplementedViewerRoomServiceHandler
// contains filtered or unexported fields
}
ViewerRoom adapts service.ViewerRoomService to the generated Connect handler interface. `agni serve` registers it only under --viewer-rooms (agni issue 1154), so it is not part of API.
func NewViewerRoom ¶ added in v0.3.9
func NewViewerRoom(svc *service.ViewerRoomService) *ViewerRoom
NewViewerRoom wraps svc for Connect.
func (*ViewerRoom) JoinViewerRoom ¶ added in v0.3.9
func (a *ViewerRoom) JoinViewerRoom(ctx context.Context, req *connect.Request[webapi.JoinViewerRoomRequest]) (*connect.Response[webapi.JoinViewerRoomResponse], error)
type Workspace ¶
type Workspace struct {
webapiconnect.UnimplementedWorkspaceServiceHandler
// contains filtered or unexported fields
}
Workspace adapts service.WorkspaceService to the generated Connect handler interface. The embedded Unimplemented handler keeps newly generated RPCs returning CodeUnimplemented until wired, so adding a proto method never breaks the build.
func NewWorkspace ¶
func NewWorkspace(svc *service.WorkspaceService) *Workspace
NewWorkspace wraps svc for Connect.