v0.2.0 49ac5fd

run.connect.go RawHistoryFolder

1// SPDX-License-Identifier: MIT
2
3// Code generated by protoc-gen-connect-go. DO NOT EDIT.
4//
5// Source: ermite/run.proto
6
7package ermiteconnect
8
9import (
10	ermite "bnema.dev/ermite-api/gen/ermite"
11	connect "connectrpc.com/connect"
12	context "context"
13	errors "errors"
14	http "net/http"
15	strings "strings"
16)
17
18// This is a compile-time assertion to ensure that this generated file and the connect package are
19// compatible. If you get a compiler error that this constant is not defined, this code was
20// generated with a version of connect newer than the one compiled into your binary. You can fix the
21// problem by either regenerating this code with an older version of connect or updating the connect
22// version compiled into your binary.
23const _ = connect.IsAtLeastVersion1_13_0
24
25const (
26	// RunServiceName is the fully-qualified name of the RunService service.
27	RunServiceName = "ermite.RunService"
28)
29
30// These constants are the fully-qualified names of the RPCs defined in this package. They're
31// exposed at runtime as Spec.Procedure and as the final two segments of the HTTP route.
32//
33// Note that these are different from the fully-qualified method names used by
34// google.golang.org/protobuf/reflect/protoreflect. To convert from these constants to
35// reflection-formatted method names, remove the leading slash and convert the remaining slash to a
36// period.
37const (
38	// RunServiceListRunsProcedure is the fully-qualified name of the RunService's ListRuns RPC.
39	RunServiceListRunsProcedure = "/ermite.RunService/ListRuns"
40	// RunServiceGetRunProcedure is the fully-qualified name of the RunService's GetRun RPC.
41	RunServiceGetRunProcedure = "/ermite.RunService/GetRun"
42	// RunServiceGetJobProcedure is the fully-qualified name of the RunService's GetJob RPC.
43	RunServiceGetJobProcedure = "/ermite.RunService/GetJob"
44	// RunServiceListAnnotationsProcedure is the fully-qualified name of the RunService's
45	// ListAnnotations RPC.
46	RunServiceListAnnotationsProcedure = "/ermite.RunService/ListAnnotations"
47	// RunServiceGetStepSummariesProcedure is the fully-qualified name of the RunService's
48	// GetStepSummaries RPC.
49	RunServiceGetStepSummariesProcedure = "/ermite.RunService/GetStepSummaries"
50	// RunServiceGetJobLogProcedure is the fully-qualified name of the RunService's GetJobLog RPC.
51	RunServiceGetJobLogProcedure = "/ermite.RunService/GetJobLog"
52	// RunServiceCancelRunProcedure is the fully-qualified name of the RunService's CancelRun RPC.
53	RunServiceCancelRunProcedure = "/ermite.RunService/CancelRun"
54	// RunServiceRerunRunProcedure is the fully-qualified name of the RunService's RerunRun RPC.
55	RunServiceRerunRunProcedure = "/ermite.RunService/RerunRun"
56	// RunServiceListChecksProcedure is the fully-qualified name of the RunService's ListChecks RPC.
57	RunServiceListChecksProcedure = "/ermite.RunService/ListChecks"
58	// RunServiceListRunnersProcedure is the fully-qualified name of the RunService's ListRunners RPC.
59	RunServiceListRunnersProcedure = "/ermite.RunService/ListRunners"
60	// RunServiceRemoveRunnerProcedure is the fully-qualified name of the RunService's RemoveRunner RPC.
61	RunServiceRemoveRunnerProcedure = "/ermite.RunService/RemoveRunner"
62)
63
64// RunServiceClient is a client for the ermite.RunService service.
65type RunServiceClient interface {
66	// ListRuns lists the runs of a repository, highest id (newest) first. Each
67	// run is described by its latest attempt. The filters narrow the result; a
68	// server without the feature "ci.runs.filters" ignores them and returns
69	// every run, so a client that needs them checks the feature. Fails with
70	// invalid_argument if a filter is malformed.
71	ListRuns(context.Context, *connect.Request[ermite.ListRunsRequest]) (*connect.Response[ermite.ListRunsResponse], error)
72	// GetRun returns a run with its jobs and their steps, for the latest attempt
73	// or for the one asked. Fails with not_found if the run or the attempt does
74	// not exist.
75	GetRun(context.Context, *connect.Request[ermite.GetRunRequest]) (*connect.Response[ermite.GetRunResponse], error)
76	// GetJob returns one job with its steps. Fails with not_found if the job
77	// or the attempt does not exist.
78	GetJob(context.Context, *connect.Request[ermite.GetJobRequest]) (*connect.Response[ermite.GetJobResponse], error)
79	// ListAnnotations lists the annotations of a run attempt, optionally of one
80	// job, ordered by job (as in GetRun), step number, then the order in which
81	// the step produced them. For each job it gives the annotations of the
82	// attempt in which that job executed (RunJob.attempt), which is lower than
83	// the attempt of the run for a job kept by a re-run of failed jobs only. Needs the same access as GetRun. Returns at most
84	// 1,000 annotations (truncated tells). A run without annotations gives an
85	// empty list. Only servers with the feature "ci.annotations" implement it
86	// (unimplemented otherwise). Fails with not_found if the run, the attempt or
87	// the job does not exist, or if the job is not a job of the run.
88	ListAnnotations(context.Context, *connect.Request[ermite.ListAnnotationsRequest]) (*connect.Response[ermite.ListAnnotationsResponse], error)
89	// GetStepSummaries returns the job summaries (the Markdown written to
90	// GITHUB_STEP_SUMMARY) of the steps of a job that have one, ordered by step
91	// number. Like GitHub, it returns at most 20 summaries per job: the first 20
92	// steps that have one, in step order; truncated says there are more. Needs
93	// the same access as GetJob. Only servers with the feature
94	// "ci.summaries" implement it (unimplemented otherwise). A job without
95	// summaries gives an empty list. Fails with not_found if the job or the
96	// attempt does not exist.
97	GetStepSummaries(context.Context, *connect.Request[ermite.GetStepSummariesRequest]) (*connect.Response[ermite.GetStepSummariesResponse], error)
98	// GetJobLog streams the lines of the log of a job, from a line number. The
99	// server sends them in order in messages of at most 1,000 lines and 64 KiB of
100	// text each.
101	//
102	// Without follow, the stream ends after the last line stored when the call
103	// was made. With follow, it goes on as lines arrive, with at most 1 second of
104	// delay after the runner's AppendLog, and ends without error once the job has
105	// completed and all its lines were sent; on a completed job follow changes
106	// nothing. A client that loses the stream calls again with the offset after
107	// the last line it received. The client may cancel at any time.
108	//
109	// Fails with not_found if the job, the attempt or its log does not exist (the
110	// log is removed by the retention sweep, and a queued job has none: with
111	// follow, the call waits for the first line instead), with out_of_range if
112	// offset is beyond the end of the log of a job without follow, and with
113	// resource_exhausted when there are too many concurrent log streams, in
114	// total or from one client. Like Watch, a stream ends with unauthenticated
115	// when the token was revoked or expired.
116	GetJobLog(context.Context, *connect.Request[ermite.GetJobLogRequest]) (*connect.ServerStreamForClient[ermite.GetJobLogResponse], error)
117	// CancelRun asks to cancel the latest attempt of a run. Needs the ci:write
118	// scope. Jobs that have not started are cancelled at once; jobs in progress
119	// get a CANCEL_REASON_USER request through WatchJob, and the run completes
120	// when they have ended, so the returned run may still be IN_PROGRESS.
121	// Cancelling a run that already has a cancellation requested succeeds and
122	// changes nothing. Fails with failed_precondition if the run has completed.
123	CancelRun(context.Context, *connect.Request[ermite.CancelRunRequest]) (*connect.Response[ermite.CancelRunResponse], error)
124	// RerunRun starts a new attempt of a completed run: same run id and number,
125	// attempt + 1, same commit and same workflow file as at the original run (the
126	// file of the repository is not read again). Needs the ci:write scope. Fails
127	// with failed_precondition if the latest attempt has not completed, or if
128	// failed_only is set and no job failed. The new attempt is returned QUEUED.
129	RerunRun(context.Context, *connect.Request[ermite.RerunRunRequest]) (*connect.Response[ermite.RerunRunResponse], error)
130	// ListChecks lists the checks of a commit: for each job of each run on that
131	// sha, the one of the latest attempt, ordered by creation time then name.
132	// A commit without a run has no check: the list is empty, which is not an
133	// error, and the server does not verify that the commit exists. Returns at
134	// most 1,000 checks (truncated tells).
135	ListChecks(context.Context, *connect.Request[ermite.ListChecksRequest]) (*connect.Response[ermite.ListChecksResponse], error)
136	// ListRunners lists the registered runners, ordered by name. Needs the
137	// runner:register scope.
138	ListRunners(context.Context, *connect.Request[ermite.ListRunnersRequest]) (*connect.Response[ermite.ListRunnersResponse], error)
139	// RemoveRunner removes a runner: its runner token stops working at once (a
140	// FetchJob in progress ends with unauthenticated) and it no longer gets
141	// jobs. A job it is running is not affected: it ends normally, or fails as
142	// a lost runner without heartbeats. Needs the runner:register scope. Fails
143	// with not_found if the id is unknown.
144	RemoveRunner(context.Context, *connect.Request[ermite.RemoveRunnerRequest]) (*connect.Response[ermite.RemoveRunnerResponse], error)
145}
146
147// NewRunServiceClient constructs a client for the ermite.RunService service. By default, it uses
148// the Connect protocol with the binary Protobuf Codec, asks for gzipped responses, and sends
149// uncompressed requests. To use the gRPC or gRPC-Web protocols, supply the connect.WithGRPC() or
150// connect.WithGRPCWeb() options.
151//
152// The URL supplied here should be the base URL for the Connect or gRPC server (for example,
153// http://api.acme.com or https://acme.com/grpc).
154func NewRunServiceClient(httpClient connect.HTTPClient, baseURL string, opts ...connect.ClientOption) RunServiceClient {
155	baseURL = strings.TrimRight(baseURL, "/")
156	runServiceMethods := ermite.File_ermite_run_proto.Services().ByName("RunService").Methods()
157	return &runServiceClient{
158		listRuns: connect.NewClient[ermite.ListRunsRequest, ermite.ListRunsResponse](
159			httpClient,
160			baseURL+RunServiceListRunsProcedure,
161			connect.WithSchema(runServiceMethods.ByName("ListRuns")),
162			connect.WithClientOptions(opts...),
163		),
164		getRun: connect.NewClient[ermite.GetRunRequest, ermite.GetRunResponse](
165			httpClient,
166			baseURL+RunServiceGetRunProcedure,
167			connect.WithSchema(runServiceMethods.ByName("GetRun")),
168			connect.WithClientOptions(opts...),
169		),
170		getJob: connect.NewClient[ermite.GetJobRequest, ermite.GetJobResponse](
171			httpClient,
172			baseURL+RunServiceGetJobProcedure,
173			connect.WithSchema(runServiceMethods.ByName("GetJob")),
174			connect.WithClientOptions(opts...),
175		),
176		listAnnotations: connect.NewClient[ermite.ListAnnotationsRequest, ermite.ListAnnotationsResponse](
177			httpClient,
178			baseURL+RunServiceListAnnotationsProcedure,
179			connect.WithSchema(runServiceMethods.ByName("ListAnnotations")),
180			connect.WithClientOptions(opts...),
181		),
182		getStepSummaries: connect.NewClient[ermite.GetStepSummariesRequest, ermite.GetStepSummariesResponse](
183			httpClient,
184			baseURL+RunServiceGetStepSummariesProcedure,
185			connect.WithSchema(runServiceMethods.ByName("GetStepSummaries")),
186			connect.WithClientOptions(opts...),
187		),
188		getJobLog: connect.NewClient[ermite.GetJobLogRequest, ermite.GetJobLogResponse](
189			httpClient,
190			baseURL+RunServiceGetJobLogProcedure,
191			connect.WithSchema(runServiceMethods.ByName("GetJobLog")),
192			connect.WithClientOptions(opts...),
193		),
194		cancelRun: connect.NewClient[ermite.CancelRunRequest, ermite.CancelRunResponse](
195			httpClient,
196			baseURL+RunServiceCancelRunProcedure,
197			connect.WithSchema(runServiceMethods.ByName("CancelRun")),
198			connect.WithClientOptions(opts...),
199		),
200		rerunRun: connect.NewClient[ermite.RerunRunRequest, ermite.RerunRunResponse](
201			httpClient,
202			baseURL+RunServiceRerunRunProcedure,
203			connect.WithSchema(runServiceMethods.ByName("RerunRun")),
204			connect.WithClientOptions(opts...),
205		),
206		listChecks: connect.NewClient[ermite.ListChecksRequest, ermite.ListChecksResponse](
207			httpClient,
208			baseURL+RunServiceListChecksProcedure,
209			connect.WithSchema(runServiceMethods.ByName("ListChecks")),
210			connect.WithClientOptions(opts...),
211		),
212		listRunners: connect.NewClient[ermite.ListRunnersRequest, ermite.ListRunnersResponse](
213			httpClient,
214			baseURL+RunServiceListRunnersProcedure,
215			connect.WithSchema(runServiceMethods.ByName("ListRunners")),
216			connect.WithClientOptions(opts...),
217		),
218		removeRunner: connect.NewClient[ermite.RemoveRunnerRequest, ermite.RemoveRunnerResponse](
219			httpClient,
220			baseURL+RunServiceRemoveRunnerProcedure,
221			connect.WithSchema(runServiceMethods.ByName("RemoveRunner")),
222			connect.WithClientOptions(opts...),
223		),
224	}
225}
226
227// runServiceClient implements RunServiceClient.
228type runServiceClient struct {
229	listRuns         *connect.Client[ermite.ListRunsRequest, ermite.ListRunsResponse]
230	getRun           *connect.Client[ermite.GetRunRequest, ermite.GetRunResponse]
231	getJob           *connect.Client[ermite.GetJobRequest, ermite.GetJobResponse]
232	listAnnotations  *connect.Client[ermite.ListAnnotationsRequest, ermite.ListAnnotationsResponse]
233	getStepSummaries *connect.Client[ermite.GetStepSummariesRequest, ermite.GetStepSummariesResponse]
234	getJobLog        *connect.Client[ermite.GetJobLogRequest, ermite.GetJobLogResponse]
235	cancelRun        *connect.Client[ermite.CancelRunRequest, ermite.CancelRunResponse]
236	rerunRun         *connect.Client[ermite.RerunRunRequest, ermite.RerunRunResponse]
237	listChecks       *connect.Client[ermite.ListChecksRequest, ermite.ListChecksResponse]
238	listRunners      *connect.Client[ermite.ListRunnersRequest, ermite.ListRunnersResponse]
239	removeRunner     *connect.Client[ermite.RemoveRunnerRequest, ermite.RemoveRunnerResponse]
240}
241
242// ListRuns calls ermite.RunService.ListRuns.
243func (c *runServiceClient) ListRuns(ctx context.Context, req *connect.Request[ermite.ListRunsRequest]) (*connect.Response[ermite.ListRunsResponse], error) {
244	return c.listRuns.CallUnary(ctx, req)
245}
246
247// GetRun calls ermite.RunService.GetRun.
248func (c *runServiceClient) GetRun(ctx context.Context, req *connect.Request[ermite.GetRunRequest]) (*connect.Response[ermite.GetRunResponse], error) {
249	return c.getRun.CallUnary(ctx, req)
250}
251
252// GetJob calls ermite.RunService.GetJob.
253func (c *runServiceClient) GetJob(ctx context.Context, req *connect.Request[ermite.GetJobRequest]) (*connect.Response[ermite.GetJobResponse], error) {
254	return c.getJob.CallUnary(ctx, req)
255}
256
257// ListAnnotations calls ermite.RunService.ListAnnotations.
258func (c *runServiceClient) ListAnnotations(ctx context.Context, req *connect.Request[ermite.ListAnnotationsRequest]) (*connect.Response[ermite.ListAnnotationsResponse], error) {
259	return c.listAnnotations.CallUnary(ctx, req)
260}
261
262// GetStepSummaries calls ermite.RunService.GetStepSummaries.
263func (c *runServiceClient) GetStepSummaries(ctx context.Context, req *connect.Request[ermite.GetStepSummariesRequest]) (*connect.Response[ermite.GetStepSummariesResponse], error) {
264	return c.getStepSummaries.CallUnary(ctx, req)
265}
266
267// GetJobLog calls ermite.RunService.GetJobLog.
268func (c *runServiceClient) GetJobLog(ctx context.Context, req *connect.Request[ermite.GetJobLogRequest]) (*connect.ServerStreamForClient[ermite.GetJobLogResponse], error) {
269	return c.getJobLog.CallServerStream(ctx, req)
270}
271
272// CancelRun calls ermite.RunService.CancelRun.
273func (c *runServiceClient) CancelRun(ctx context.Context, req *connect.Request[ermite.CancelRunRequest]) (*connect.Response[ermite.CancelRunResponse], error) {
274	return c.cancelRun.CallUnary(ctx, req)
275}
276
277// RerunRun calls ermite.RunService.RerunRun.
278func (c *runServiceClient) RerunRun(ctx context.Context, req *connect.Request[ermite.RerunRunRequest]) (*connect.Response[ermite.RerunRunResponse], error) {
279	return c.rerunRun.CallUnary(ctx, req)
280}
281
282// ListChecks calls ermite.RunService.ListChecks.
283func (c *runServiceClient) ListChecks(ctx context.Context, req *connect.Request[ermite.ListChecksRequest]) (*connect.Response[ermite.ListChecksResponse], error) {
284	return c.listChecks.CallUnary(ctx, req)
285}
286
287// ListRunners calls ermite.RunService.ListRunners.
288func (c *runServiceClient) ListRunners(ctx context.Context, req *connect.Request[ermite.ListRunnersRequest]) (*connect.Response[ermite.ListRunnersResponse], error) {
289	return c.listRunners.CallUnary(ctx, req)
290}
291
292// RemoveRunner calls ermite.RunService.RemoveRunner.
293func (c *runServiceClient) RemoveRunner(ctx context.Context, req *connect.Request[ermite.RemoveRunnerRequest]) (*connect.Response[ermite.RemoveRunnerResponse], error) {
294	return c.removeRunner.CallUnary(ctx, req)
295}
296
297// RunServiceHandler is an implementation of the ermite.RunService service.
298type RunServiceHandler interface {
299	// ListRuns lists the runs of a repository, highest id (newest) first. Each
300	// run is described by its latest attempt. The filters narrow the result; a
301	// server without the feature "ci.runs.filters" ignores them and returns
302	// every run, so a client that needs them checks the feature. Fails with
303	// invalid_argument if a filter is malformed.
304	ListRuns(context.Context, *connect.Request[ermite.ListRunsRequest]) (*connect.Response[ermite.ListRunsResponse], error)
305	// GetRun returns a run with its jobs and their steps, for the latest attempt
306	// or for the one asked. Fails with not_found if the run or the attempt does
307	// not exist.
308	GetRun(context.Context, *connect.Request[ermite.GetRunRequest]) (*connect.Response[ermite.GetRunResponse], error)
309	// GetJob returns one job with its steps. Fails with not_found if the job
310	// or the attempt does not exist.
311	GetJob(context.Context, *connect.Request[ermite.GetJobRequest]) (*connect.Response[ermite.GetJobResponse], error)
312	// ListAnnotations lists the annotations of a run attempt, optionally of one
313	// job, ordered by job (as in GetRun), step number, then the order in which
314	// the step produced them. For each job it gives the annotations of the
315	// attempt in which that job executed (RunJob.attempt), which is lower than
316	// the attempt of the run for a job kept by a re-run of failed jobs only. Needs the same access as GetRun. Returns at most
317	// 1,000 annotations (truncated tells). A run without annotations gives an
318	// empty list. Only servers with the feature "ci.annotations" implement it
319	// (unimplemented otherwise). Fails with not_found if the run, the attempt or
320	// the job does not exist, or if the job is not a job of the run.
321	ListAnnotations(context.Context, *connect.Request[ermite.ListAnnotationsRequest]) (*connect.Response[ermite.ListAnnotationsResponse], error)
322	// GetStepSummaries returns the job summaries (the Markdown written to
323	// GITHUB_STEP_SUMMARY) of the steps of a job that have one, ordered by step
324	// number. Like GitHub, it returns at most 20 summaries per job: the first 20
325	// steps that have one, in step order; truncated says there are more. Needs
326	// the same access as GetJob. Only servers with the feature
327	// "ci.summaries" implement it (unimplemented otherwise). A job without
328	// summaries gives an empty list. Fails with not_found if the job or the
329	// attempt does not exist.
330	GetStepSummaries(context.Context, *connect.Request[ermite.GetStepSummariesRequest]) (*connect.Response[ermite.GetStepSummariesResponse], error)
331	// GetJobLog streams the lines of the log of a job, from a line number. The
332	// server sends them in order in messages of at most 1,000 lines and 64 KiB of
333	// text each.
334	//
335	// Without follow, the stream ends after the last line stored when the call
336	// was made. With follow, it goes on as lines arrive, with at most 1 second of
337	// delay after the runner's AppendLog, and ends without error once the job has
338	// completed and all its lines were sent; on a completed job follow changes
339	// nothing. A client that loses the stream calls again with the offset after
340	// the last line it received. The client may cancel at any time.
341	//
342	// Fails with not_found if the job, the attempt or its log does not exist (the
343	// log is removed by the retention sweep, and a queued job has none: with
344	// follow, the call waits for the first line instead), with out_of_range if
345	// offset is beyond the end of the log of a job without follow, and with
346	// resource_exhausted when there are too many concurrent log streams, in
347	// total or from one client. Like Watch, a stream ends with unauthenticated
348	// when the token was revoked or expired.
349	GetJobLog(context.Context, *connect.Request[ermite.GetJobLogRequest], *connect.ServerStream[ermite.GetJobLogResponse]) error
350	// CancelRun asks to cancel the latest attempt of a run. Needs the ci:write
351	// scope. Jobs that have not started are cancelled at once; jobs in progress
352	// get a CANCEL_REASON_USER request through WatchJob, and the run completes
353	// when they have ended, so the returned run may still be IN_PROGRESS.
354	// Cancelling a run that already has a cancellation requested succeeds and
355	// changes nothing. Fails with failed_precondition if the run has completed.
356	CancelRun(context.Context, *connect.Request[ermite.CancelRunRequest]) (*connect.Response[ermite.CancelRunResponse], error)
357	// RerunRun starts a new attempt of a completed run: same run id and number,
358	// attempt + 1, same commit and same workflow file as at the original run (the
359	// file of the repository is not read again). Needs the ci:write scope. Fails
360	// with failed_precondition if the latest attempt has not completed, or if
361	// failed_only is set and no job failed. The new attempt is returned QUEUED.
362	RerunRun(context.Context, *connect.Request[ermite.RerunRunRequest]) (*connect.Response[ermite.RerunRunResponse], error)
363	// ListChecks lists the checks of a commit: for each job of each run on that
364	// sha, the one of the latest attempt, ordered by creation time then name.
365	// A commit without a run has no check: the list is empty, which is not an
366	// error, and the server does not verify that the commit exists. Returns at
367	// most 1,000 checks (truncated tells).
368	ListChecks(context.Context, *connect.Request[ermite.ListChecksRequest]) (*connect.Response[ermite.ListChecksResponse], error)
369	// ListRunners lists the registered runners, ordered by name. Needs the
370	// runner:register scope.
371	ListRunners(context.Context, *connect.Request[ermite.ListRunnersRequest]) (*connect.Response[ermite.ListRunnersResponse], error)
372	// RemoveRunner removes a runner: its runner token stops working at once (a
373	// FetchJob in progress ends with unauthenticated) and it no longer gets
374	// jobs. A job it is running is not affected: it ends normally, or fails as
375	// a lost runner without heartbeats. Needs the runner:register scope. Fails
376	// with not_found if the id is unknown.
377	RemoveRunner(context.Context, *connect.Request[ermite.RemoveRunnerRequest]) (*connect.Response[ermite.RemoveRunnerResponse], error)
378}
379
380// NewRunServiceHandler builds an HTTP handler from the service implementation. It returns the path
381// on which to mount the handler and the handler itself.
382//
383// By default, handlers support the Connect, gRPC, and gRPC-Web protocols with the binary Protobuf
384// and JSON codecs. They also support gzip compression.
385func NewRunServiceHandler(svc RunServiceHandler, opts ...connect.HandlerOption) (string, http.Handler) {
386	runServiceMethods := ermite.File_ermite_run_proto.Services().ByName("RunService").Methods()
387	runServiceListRunsHandler := connect.NewUnaryHandler(
388		RunServiceListRunsProcedure,
389		svc.ListRuns,
390		connect.WithSchema(runServiceMethods.ByName("ListRuns")),
391		connect.WithHandlerOptions(opts...),
392	)
393	runServiceGetRunHandler := connect.NewUnaryHandler(
394		RunServiceGetRunProcedure,
395		svc.GetRun,
396		connect.WithSchema(runServiceMethods.ByName("GetRun")),
397		connect.WithHandlerOptions(opts...),
398	)
399	runServiceGetJobHandler := connect.NewUnaryHandler(
400		RunServiceGetJobProcedure,
401		svc.GetJob,
402		connect.WithSchema(runServiceMethods.ByName("GetJob")),
403		connect.WithHandlerOptions(opts...),
404	)
405	runServiceListAnnotationsHandler := connect.NewUnaryHandler(
406		RunServiceListAnnotationsProcedure,
407		svc.ListAnnotations,
408		connect.WithSchema(runServiceMethods.ByName("ListAnnotations")),
409		connect.WithHandlerOptions(opts...),
410	)
411	runServiceGetStepSummariesHandler := connect.NewUnaryHandler(
412		RunServiceGetStepSummariesProcedure,
413		svc.GetStepSummaries,
414		connect.WithSchema(runServiceMethods.ByName("GetStepSummaries")),
415		connect.WithHandlerOptions(opts...),
416	)
417	runServiceGetJobLogHandler := connect.NewServerStreamHandler(
418		RunServiceGetJobLogProcedure,
419		svc.GetJobLog,
420		connect.WithSchema(runServiceMethods.ByName("GetJobLog")),
421		connect.WithHandlerOptions(opts...),
422	)
423	runServiceCancelRunHandler := connect.NewUnaryHandler(
424		RunServiceCancelRunProcedure,
425		svc.CancelRun,
426		connect.WithSchema(runServiceMethods.ByName("CancelRun")),
427		connect.WithHandlerOptions(opts...),
428	)
429	runServiceRerunRunHandler := connect.NewUnaryHandler(
430		RunServiceRerunRunProcedure,
431		svc.RerunRun,
432		connect.WithSchema(runServiceMethods.ByName("RerunRun")),
433		connect.WithHandlerOptions(opts...),
434	)
435	runServiceListChecksHandler := connect.NewUnaryHandler(
436		RunServiceListChecksProcedure,
437		svc.ListChecks,
438		connect.WithSchema(runServiceMethods.ByName("ListChecks")),
439		connect.WithHandlerOptions(opts...),
440	)
441	runServiceListRunnersHandler := connect.NewUnaryHandler(
442		RunServiceListRunnersProcedure,
443		svc.ListRunners,
444		connect.WithSchema(runServiceMethods.ByName("ListRunners")),
445		connect.WithHandlerOptions(opts...),
446	)
447	runServiceRemoveRunnerHandler := connect.NewUnaryHandler(
448		RunServiceRemoveRunnerProcedure,
449		svc.RemoveRunner,
450		connect.WithSchema(runServiceMethods.ByName("RemoveRunner")),
451		connect.WithHandlerOptions(opts...),
452	)
453	return "/ermite.RunService/", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
454		switch r.URL.Path {
455		case RunServiceListRunsProcedure:
456			runServiceListRunsHandler.ServeHTTP(w, r)
457		case RunServiceGetRunProcedure:
458			runServiceGetRunHandler.ServeHTTP(w, r)
459		case RunServiceGetJobProcedure:
460			runServiceGetJobHandler.ServeHTTP(w, r)
461		case RunServiceListAnnotationsProcedure:
462			runServiceListAnnotationsHandler.ServeHTTP(w, r)
463		case RunServiceGetStepSummariesProcedure:
464			runServiceGetStepSummariesHandler.ServeHTTP(w, r)
465		case RunServiceGetJobLogProcedure:
466			runServiceGetJobLogHandler.ServeHTTP(w, r)
467		case RunServiceCancelRunProcedure:
468			runServiceCancelRunHandler.ServeHTTP(w, r)
469		case RunServiceRerunRunProcedure:
470			runServiceRerunRunHandler.ServeHTTP(w, r)
471		case RunServiceListChecksProcedure:
472			runServiceListChecksHandler.ServeHTTP(w, r)
473		case RunServiceListRunnersProcedure:
474			runServiceListRunnersHandler.ServeHTTP(w, r)
475		case RunServiceRemoveRunnerProcedure:
476			runServiceRemoveRunnerHandler.ServeHTTP(w, r)
477		default:
478			http.NotFound(w, r)
479		}
480	})
481}
482
483// UnimplementedRunServiceHandler returns CodeUnimplemented from all methods.
484type UnimplementedRunServiceHandler struct{}
485
486func (UnimplementedRunServiceHandler) ListRuns(context.Context, *connect.Request[ermite.ListRunsRequest]) (*connect.Response[ermite.ListRunsResponse], error) {
487	return nil, connect.NewError(connect.CodeUnimplemented, errors.New("ermite.RunService.ListRuns is not implemented"))
488}
489
490func (UnimplementedRunServiceHandler) GetRun(context.Context, *connect.Request[ermite.GetRunRequest]) (*connect.Response[ermite.GetRunResponse], error) {
491	return nil, connect.NewError(connect.CodeUnimplemented, errors.New("ermite.RunService.GetRun is not implemented"))
492}
493
494func (UnimplementedRunServiceHandler) GetJob(context.Context, *connect.Request[ermite.GetJobRequest]) (*connect.Response[ermite.GetJobResponse], error) {
495	return nil, connect.NewError(connect.CodeUnimplemented, errors.New("ermite.RunService.GetJob is not implemented"))
496}
497
498func (UnimplementedRunServiceHandler) ListAnnotations(context.Context, *connect.Request[ermite.ListAnnotationsRequest]) (*connect.Response[ermite.ListAnnotationsResponse], error) {
499	return nil, connect.NewError(connect.CodeUnimplemented, errors.New("ermite.RunService.ListAnnotations is not implemented"))
500}
501
502func (UnimplementedRunServiceHandler) GetStepSummaries(context.Context, *connect.Request[ermite.GetStepSummariesRequest]) (*connect.Response[ermite.GetStepSummariesResponse], error) {
503	return nil, connect.NewError(connect.CodeUnimplemented, errors.New("ermite.RunService.GetStepSummaries is not implemented"))
504}
505
506func (UnimplementedRunServiceHandler) GetJobLog(context.Context, *connect.Request[ermite.GetJobLogRequest], *connect.ServerStream[ermite.GetJobLogResponse]) error {
507	return connect.NewError(connect.CodeUnimplemented, errors.New("ermite.RunService.GetJobLog is not implemented"))
508}
509
510func (UnimplementedRunServiceHandler) CancelRun(context.Context, *connect.Request[ermite.CancelRunRequest]) (*connect.Response[ermite.CancelRunResponse], error) {
511	return nil, connect.NewError(connect.CodeUnimplemented, errors.New("ermite.RunService.CancelRun is not implemented"))
512}
513
514func (UnimplementedRunServiceHandler) RerunRun(context.Context, *connect.Request[ermite.RerunRunRequest]) (*connect.Response[ermite.RerunRunResponse], error) {
515	return nil, connect.NewError(connect.CodeUnimplemented, errors.New("ermite.RunService.RerunRun is not implemented"))
516}
517
518func (UnimplementedRunServiceHandler) ListChecks(context.Context, *connect.Request[ermite.ListChecksRequest]) (*connect.Response[ermite.ListChecksResponse], error) {
519	return nil, connect.NewError(connect.CodeUnimplemented, errors.New("ermite.RunService.ListChecks is not implemented"))
520}
521
522func (UnimplementedRunServiceHandler) ListRunners(context.Context, *connect.Request[ermite.ListRunnersRequest]) (*connect.Response[ermite.ListRunnersResponse], error) {
523	return nil, connect.NewError(connect.CodeUnimplemented, errors.New("ermite.RunService.ListRunners is not implemented"))
524}
525
526func (UnimplementedRunServiceHandler) RemoveRunner(context.Context, *connect.Request[ermite.RemoveRunnerRequest]) (*connect.Response[ermite.RemoveRunnerResponse], error) {
527	return nil, connect.NewError(connect.CodeUnimplemented, errors.New("ermite.RunService.RemoveRunner is not implemented"))
528}

Keyboard shortcuts

Single-key shortcuts are on. ctrl k and esc work whatever this says.

ctrl k :
go to a section, branch, tag, file or repository
?
this list
j k
move the row cursor down / up
enter
open the row under the cursor; on Files, a directory opens or closes in place
↑ ↓ ← → home end
in the file tree (focus on a row): previous / next row, close / open a directory or go to its parent / first entry, first / last row. They never open a file
l h
on Files: open a directory or a file / close a directory or go up to its parent, then to the parent page. Elsewhere: into the side panel (on a merge request, its files) / back to the content; there j k move between its controls
g g G
first / last row
/
filter the list; on Files, find a file anywhere in the repository (esc clears, enter opens the best match)
b
switch branch or tag
g s g f g c g b g m g i g r g a
tabs: summary, files, commits, branches & tags, merge requests, issues, releases, actions (when available)
g h
home
w
wide mode: use the whole width of the screen, or not (remembered)
y
copy a permalink pinned to the commit
d u x
diff: split / unified / collapse or expand all
e E
diff: the whole file in view / every file, with the lines the hunks hide
n
merge request: next note in the diff
esc
close a dialog, leave a field

Branches 2

Tags 18

↑↓ moveenter openesc close