From 8310a2ec15d04a63926dae1dfe1683ee1d265948 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 18 May 2025 17:04:57 +0200 Subject: [PATCH] Adding upstream version 0.4.1. Signed-off-by: Daniel Baumann --- .gitignore | 23 + LICENSE | 9 + README.md | 2 + go.mod | 8 + go.sum | 7 + ping/v1/messages.pb.go | 212 ++ ping/v1/pingv1connect/services.connect.go | 112 ++ ping/v1/services.pb.go | 81 + runner/v1/messages.pb.go | 1706 +++++++++++++++++ runner/v1/runnerv1connect/services.connect.go | 239 +++ runner/v1/services.pb.go | 118 ++ 11 files changed, 2517 insertions(+) create mode 100644 .gitignore create mode 100644 LICENSE create mode 100644 README.md create mode 100644 go.mod create mode 100644 go.sum create mode 100644 ping/v1/messages.pb.go create mode 100644 ping/v1/pingv1connect/services.connect.go create mode 100644 ping/v1/services.pb.go create mode 100644 runner/v1/messages.pb.go create mode 100644 runner/v1/runnerv1connect/services.connect.go create mode 100644 runner/v1/services.pb.go diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..adf8f72 --- /dev/null +++ b/.gitignore @@ -0,0 +1,23 @@ +# ---> Go +# If you prefer the allow list template instead of the deny list, see community template: +# https://github.com/github/gitignore/blob/main/community/Golang/Go.AllowList.gitignore +# +# Binaries for programs and plugins +*.exe +*.exe~ +*.dll +*.so +*.dylib + +# Test binary, built with `go test -c` +*.test + +# Output of the go coverage tool, specifically when used with LiteIDE +*.out + +# Dependency directories (remove the comment below to include it) +# vendor/ + +# Go workspace file +go.work + diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..8286dc0 --- /dev/null +++ b/LICENSE @@ -0,0 +1,9 @@ +MIT License + +Copyright (c) 2022 The Gitea Authors + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/README.md b/README.md new file mode 100644 index 0000000..d7de7bd --- /dev/null +++ b/README.md @@ -0,0 +1,2 @@ +# proto-go + diff --git a/go.mod b/go.mod new file mode 100644 index 0000000..50e43ab --- /dev/null +++ b/go.mod @@ -0,0 +1,8 @@ +module code.gitea.io/actions-proto-go + +go 1.19 + +require ( + connectrpc.com/connect v1.15.0 + google.golang.org/protobuf v1.32.0 +) diff --git a/go.sum b/go.sum new file mode 100644 index 0000000..fb297f9 --- /dev/null +++ b/go.sum @@ -0,0 +1,7 @@ +connectrpc.com/connect v1.15.0 h1:lFdeCbZrVVDydAqwr4xGV2y+ULn+0Z73s5JBj2LikWo= +connectrpc.com/connect v1.15.0/go.mod h1:bQmjpDY8xItMnttnurVgOkHUBMRT9cpsNi2O4AjKhmA= +github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= +golang.org/x/net v0.21.0 h1:AQyQV4dYCvJ7vGmJyKki9+PBdyvhkSd8EIx/qb0AYv4= +golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= +google.golang.org/protobuf v1.32.0 h1:pPC6BG5ex8PDFnkbrGU3EixyhKcQ2aDuBS36lqK/C7I= +google.golang.org/protobuf v1.32.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= diff --git a/ping/v1/messages.pb.go b/ping/v1/messages.pb.go new file mode 100644 index 0000000..83ff2cb --- /dev/null +++ b/ping/v1/messages.pb.go @@ -0,0 +1,212 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.28.1 +// protoc (unknown) +// source: ping/v1/messages.proto + +package pingv1 + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type PingRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Data string `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` +} + +func (x *PingRequest) Reset() { + *x = PingRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_ping_v1_messages_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PingRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PingRequest) ProtoMessage() {} + +func (x *PingRequest) ProtoReflect() protoreflect.Message { + mi := &file_ping_v1_messages_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PingRequest.ProtoReflect.Descriptor instead. +func (*PingRequest) Descriptor() ([]byte, []int) { + return file_ping_v1_messages_proto_rawDescGZIP(), []int{0} +} + +func (x *PingRequest) GetData() string { + if x != nil { + return x.Data + } + return "" +} + +type PingResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Data string `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` +} + +func (x *PingResponse) Reset() { + *x = PingResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_ping_v1_messages_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PingResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PingResponse) ProtoMessage() {} + +func (x *PingResponse) ProtoReflect() protoreflect.Message { + mi := &file_ping_v1_messages_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PingResponse.ProtoReflect.Descriptor instead. +func (*PingResponse) Descriptor() ([]byte, []int) { + return file_ping_v1_messages_proto_rawDescGZIP(), []int{1} +} + +func (x *PingResponse) GetData() string { + if x != nil { + return x.Data + } + return "" +} + +var File_ping_v1_messages_proto protoreflect.FileDescriptor + +var file_ping_v1_messages_proto_rawDesc = []byte{ + 0x0a, 0x16, 0x70, 0x69, 0x6e, 0x67, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, + 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x07, 0x70, 0x69, 0x6e, 0x67, 0x2e, 0x76, + 0x31, 0x22, 0x21, 0x0a, 0x0b, 0x50, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, + 0x64, 0x61, 0x74, 0x61, 0x22, 0x22, 0x0a, 0x0c, 0x50, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x42, 0x88, 0x01, 0x0a, 0x0b, 0x63, 0x6f, 0x6d, + 0x2e, 0x70, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x42, 0x0d, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, + 0x65, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2d, 0x63, 0x6f, 0x64, 0x65, 0x2e, + 0x67, 0x69, 0x74, 0x65, 0x61, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x2d, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2d, 0x67, 0x6f, 0x2f, 0x70, 0x69, 0x6e, 0x67, 0x2f, 0x76, + 0x31, 0x3b, 0x70, 0x69, 0x6e, 0x67, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x50, 0x58, 0x58, 0xaa, 0x02, + 0x07, 0x50, 0x69, 0x6e, 0x67, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x07, 0x50, 0x69, 0x6e, 0x67, 0x5c, + 0x56, 0x31, 0xe2, 0x02, 0x13, 0x50, 0x69, 0x6e, 0x67, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, + 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x08, 0x50, 0x69, 0x6e, 0x67, 0x3a, + 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_ping_v1_messages_proto_rawDescOnce sync.Once + file_ping_v1_messages_proto_rawDescData = file_ping_v1_messages_proto_rawDesc +) + +func file_ping_v1_messages_proto_rawDescGZIP() []byte { + file_ping_v1_messages_proto_rawDescOnce.Do(func() { + file_ping_v1_messages_proto_rawDescData = protoimpl.X.CompressGZIP(file_ping_v1_messages_proto_rawDescData) + }) + return file_ping_v1_messages_proto_rawDescData +} + +var file_ping_v1_messages_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_ping_v1_messages_proto_goTypes = []interface{}{ + (*PingRequest)(nil), // 0: ping.v1.PingRequest + (*PingResponse)(nil), // 1: ping.v1.PingResponse +} +var file_ping_v1_messages_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_ping_v1_messages_proto_init() } +func file_ping_v1_messages_proto_init() { + if File_ping_v1_messages_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_ping_v1_messages_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PingRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ping_v1_messages_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PingResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_ping_v1_messages_proto_rawDesc, + NumEnums: 0, + NumMessages: 2, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_ping_v1_messages_proto_goTypes, + DependencyIndexes: file_ping_v1_messages_proto_depIdxs, + MessageInfos: file_ping_v1_messages_proto_msgTypes, + }.Build() + File_ping_v1_messages_proto = out.File + file_ping_v1_messages_proto_rawDesc = nil + file_ping_v1_messages_proto_goTypes = nil + file_ping_v1_messages_proto_depIdxs = nil +} diff --git a/ping/v1/pingv1connect/services.connect.go b/ping/v1/pingv1connect/services.connect.go new file mode 100644 index 0000000..84816b8 --- /dev/null +++ b/ping/v1/pingv1connect/services.connect.go @@ -0,0 +1,112 @@ +// Code generated by protoc-gen-connect-go. DO NOT EDIT. +// +// Source: ping/v1/services.proto + +package pingv1connect + +import ( + v1 "code.gitea.io/actions-proto-go/ping/v1" + connect "connectrpc.com/connect" + context "context" + errors "errors" + http "net/http" + strings "strings" +) + +// This is a compile-time assertion to ensure that this generated file and the connect package are +// compatible. If you get a compiler error that this constant is not defined, this code was +// generated with a version of connect newer than the one compiled into your binary. You can fix the +// problem by either regenerating this code with an older version of connect or updating the connect +// version compiled into your binary. +const _ = connect.IsAtLeastVersion1_13_0 + +const ( + // PingServiceName is the fully-qualified name of the PingService service. + PingServiceName = "ping.v1.PingService" +) + +// These constants are the fully-qualified names of the RPCs defined in this package. They're +// exposed at runtime as Spec.Procedure and as the final two segments of the HTTP route. +// +// Note that these are different from the fully-qualified method names used by +// google.golang.org/protobuf/reflect/protoreflect. To convert from these constants to +// reflection-formatted method names, remove the leading slash and convert the remaining slash to a +// period. +const ( + // PingServicePingProcedure is the fully-qualified name of the PingService's Ping RPC. + PingServicePingProcedure = "/ping.v1.PingService/Ping" +) + +// These variables are the protoreflect.Descriptor objects for the RPCs defined in this package. +var ( + pingServiceServiceDescriptor = v1.File_ping_v1_services_proto.Services().ByName("PingService") + pingServicePingMethodDescriptor = pingServiceServiceDescriptor.Methods().ByName("Ping") +) + +// PingServiceClient is a client for the ping.v1.PingService service. +type PingServiceClient interface { + Ping(context.Context, *connect.Request[v1.PingRequest]) (*connect.Response[v1.PingResponse], error) +} + +// NewPingServiceClient constructs a client for the ping.v1.PingService service. By default, it uses +// the Connect protocol with the binary Protobuf Codec, asks for gzipped responses, and sends +// uncompressed requests. To use the gRPC or gRPC-Web protocols, supply the connect.WithGRPC() or +// connect.WithGRPCWeb() options. +// +// The URL supplied here should be the base URL for the Connect or gRPC server (for example, +// http://api.acme.com or https://acme.com/grpc). +func NewPingServiceClient(httpClient connect.HTTPClient, baseURL string, opts ...connect.ClientOption) PingServiceClient { + baseURL = strings.TrimRight(baseURL, "/") + return &pingServiceClient{ + ping: connect.NewClient[v1.PingRequest, v1.PingResponse]( + httpClient, + baseURL+PingServicePingProcedure, + connect.WithSchema(pingServicePingMethodDescriptor), + connect.WithClientOptions(opts...), + ), + } +} + +// pingServiceClient implements PingServiceClient. +type pingServiceClient struct { + ping *connect.Client[v1.PingRequest, v1.PingResponse] +} + +// Ping calls ping.v1.PingService.Ping. +func (c *pingServiceClient) Ping(ctx context.Context, req *connect.Request[v1.PingRequest]) (*connect.Response[v1.PingResponse], error) { + return c.ping.CallUnary(ctx, req) +} + +// PingServiceHandler is an implementation of the ping.v1.PingService service. +type PingServiceHandler interface { + Ping(context.Context, *connect.Request[v1.PingRequest]) (*connect.Response[v1.PingResponse], error) +} + +// NewPingServiceHandler builds an HTTP handler from the service implementation. It returns the path +// on which to mount the handler and the handler itself. +// +// By default, handlers support the Connect, gRPC, and gRPC-Web protocols with the binary Protobuf +// and JSON codecs. They also support gzip compression. +func NewPingServiceHandler(svc PingServiceHandler, opts ...connect.HandlerOption) (string, http.Handler) { + pingServicePingHandler := connect.NewUnaryHandler( + PingServicePingProcedure, + svc.Ping, + connect.WithSchema(pingServicePingMethodDescriptor), + connect.WithHandlerOptions(opts...), + ) + return "/ping.v1.PingService/", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + switch r.URL.Path { + case PingServicePingProcedure: + pingServicePingHandler.ServeHTTP(w, r) + default: + http.NotFound(w, r) + } + }) +} + +// UnimplementedPingServiceHandler returns CodeUnimplemented from all methods. +type UnimplementedPingServiceHandler struct{} + +func (UnimplementedPingServiceHandler) Ping(context.Context, *connect.Request[v1.PingRequest]) (*connect.Response[v1.PingResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("ping.v1.PingService.Ping is not implemented")) +} diff --git a/ping/v1/services.pb.go b/ping/v1/services.pb.go new file mode 100644 index 0000000..770a3a6 --- /dev/null +++ b/ping/v1/services.pb.go @@ -0,0 +1,81 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.28.1 +// protoc (unknown) +// source: ping/v1/services.proto + +package pingv1 + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +var File_ping_v1_services_proto protoreflect.FileDescriptor + +var file_ping_v1_services_proto_rawDesc = []byte{ + 0x0a, 0x16, 0x70, 0x69, 0x6e, 0x67, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x07, 0x70, 0x69, 0x6e, 0x67, 0x2e, 0x76, + 0x31, 0x1a, 0x16, 0x70, 0x69, 0x6e, 0x67, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x65, 0x73, 0x73, 0x61, + 0x67, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0x42, 0x0a, 0x0b, 0x50, 0x69, 0x6e, + 0x67, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x33, 0x0a, 0x04, 0x50, 0x69, 0x6e, 0x67, + 0x12, 0x14, 0x2e, 0x70, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x69, 0x6e, 0x67, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x70, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, + 0x2e, 0x50, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x88, 0x01, + 0x0a, 0x0b, 0x63, 0x6f, 0x6d, 0x2e, 0x70, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x42, 0x0d, 0x53, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2d, + 0x63, 0x6f, 0x64, 0x65, 0x2e, 0x67, 0x69, 0x74, 0x65, 0x61, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2d, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2d, 0x67, 0x6f, 0x2f, 0x70, + 0x69, 0x6e, 0x67, 0x2f, 0x76, 0x31, 0x3b, 0x70, 0x69, 0x6e, 0x67, 0x76, 0x31, 0xa2, 0x02, 0x03, + 0x50, 0x58, 0x58, 0xaa, 0x02, 0x07, 0x50, 0x69, 0x6e, 0x67, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x07, + 0x50, 0x69, 0x6e, 0x67, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x13, 0x50, 0x69, 0x6e, 0x67, 0x5c, 0x56, + 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x08, + 0x50, 0x69, 0x6e, 0x67, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var file_ping_v1_services_proto_goTypes = []interface{}{ + (*PingRequest)(nil), // 0: ping.v1.PingRequest + (*PingResponse)(nil), // 1: ping.v1.PingResponse +} +var file_ping_v1_services_proto_depIdxs = []int32{ + 0, // 0: ping.v1.PingService.Ping:input_type -> ping.v1.PingRequest + 1, // 1: ping.v1.PingService.Ping:output_type -> ping.v1.PingResponse + 1, // [1:2] is the sub-list for method output_type + 0, // [0:1] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_ping_v1_services_proto_init() } +func file_ping_v1_services_proto_init() { + if File_ping_v1_services_proto != nil { + return + } + file_ping_v1_messages_proto_init() + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_ping_v1_services_proto_rawDesc, + NumEnums: 0, + NumMessages: 0, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_ping_v1_services_proto_goTypes, + DependencyIndexes: file_ping_v1_services_proto_depIdxs, + }.Build() + File_ping_v1_services_proto = out.File + file_ping_v1_services_proto_rawDesc = nil + file_ping_v1_services_proto_goTypes = nil + file_ping_v1_services_proto_depIdxs = nil +} diff --git a/runner/v1/messages.pb.go b/runner/v1/messages.pb.go new file mode 100644 index 0000000..6f293da --- /dev/null +++ b/runner/v1/messages.pb.go @@ -0,0 +1,1706 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.28.1 +// protoc (unknown) +// source: runner/v1/messages.proto + +package runnerv1 + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + structpb "google.golang.org/protobuf/types/known/structpb" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// RunnerStatus runner all status +type RunnerStatus int32 + +const ( + RunnerStatus_RUNNER_STATUS_UNSPECIFIED RunnerStatus = 0 + RunnerStatus_RUNNER_STATUS_IDLE RunnerStatus = 1 + RunnerStatus_RUNNER_STATUS_ACTIVE RunnerStatus = 2 + RunnerStatus_RUNNER_STATUS_OFFLINE RunnerStatus = 3 +) + +// Enum value maps for RunnerStatus. +var ( + RunnerStatus_name = map[int32]string{ + 0: "RUNNER_STATUS_UNSPECIFIED", + 1: "RUNNER_STATUS_IDLE", + 2: "RUNNER_STATUS_ACTIVE", + 3: "RUNNER_STATUS_OFFLINE", + } + RunnerStatus_value = map[string]int32{ + "RUNNER_STATUS_UNSPECIFIED": 0, + "RUNNER_STATUS_IDLE": 1, + "RUNNER_STATUS_ACTIVE": 2, + "RUNNER_STATUS_OFFLINE": 3, + } +) + +func (x RunnerStatus) Enum() *RunnerStatus { + p := new(RunnerStatus) + *p = x + return p +} + +func (x RunnerStatus) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (RunnerStatus) Descriptor() protoreflect.EnumDescriptor { + return file_runner_v1_messages_proto_enumTypes[0].Descriptor() +} + +func (RunnerStatus) Type() protoreflect.EnumType { + return &file_runner_v1_messages_proto_enumTypes[0] +} + +func (x RunnerStatus) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use RunnerStatus.Descriptor instead. +func (RunnerStatus) EnumDescriptor() ([]byte, []int) { + return file_runner_v1_messages_proto_rawDescGZIP(), []int{0} +} + +// The result of a task or a step, see https://docs.github.com/en/actions/learn-github-actions/contexts#jobs-context . +type Result int32 + +const ( + Result_RESULT_UNSPECIFIED Result = 0 + Result_RESULT_SUCCESS Result = 1 + Result_RESULT_FAILURE Result = 2 + Result_RESULT_CANCELLED Result = 3 + Result_RESULT_SKIPPED Result = 4 +) + +// Enum value maps for Result. +var ( + Result_name = map[int32]string{ + 0: "RESULT_UNSPECIFIED", + 1: "RESULT_SUCCESS", + 2: "RESULT_FAILURE", + 3: "RESULT_CANCELLED", + 4: "RESULT_SKIPPED", + } + Result_value = map[string]int32{ + "RESULT_UNSPECIFIED": 0, + "RESULT_SUCCESS": 1, + "RESULT_FAILURE": 2, + "RESULT_CANCELLED": 3, + "RESULT_SKIPPED": 4, + } +) + +func (x Result) Enum() *Result { + p := new(Result) + *p = x + return p +} + +func (x Result) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (Result) Descriptor() protoreflect.EnumDescriptor { + return file_runner_v1_messages_proto_enumTypes[1].Descriptor() +} + +func (Result) Type() protoreflect.EnumType { + return &file_runner_v1_messages_proto_enumTypes[1] +} + +func (x Result) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use Result.Descriptor instead. +func (Result) EnumDescriptor() ([]byte, []int) { + return file_runner_v1_messages_proto_rawDescGZIP(), []int{1} +} + +type RegisterRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Token string `protobuf:"bytes,2,opt,name=token,proto3" json:"token,omitempty"` + // Deprecated: Do not use. + AgentLabels []string `protobuf:"bytes,3,rep,name=agent_labels,json=agentLabels,proto3" json:"agent_labels,omitempty"` + // Deprecated: Do not use. + CustomLabels []string `protobuf:"bytes,4,rep,name=custom_labels,json=customLabels,proto3" json:"custom_labels,omitempty"` + Version string `protobuf:"bytes,5,opt,name=version,proto3" json:"version,omitempty"` + Labels []string `protobuf:"bytes,6,rep,name=labels,proto3" json:"labels,omitempty"` + Ephemeral bool `protobuf:"varint,7,opt,name=ephemeral,proto3" json:"ephemeral,omitempty"` +} + +func (x *RegisterRequest) Reset() { + *x = RegisterRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_runner_v1_messages_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RegisterRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RegisterRequest) ProtoMessage() {} + +func (x *RegisterRequest) ProtoReflect() protoreflect.Message { + mi := &file_runner_v1_messages_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RegisterRequest.ProtoReflect.Descriptor instead. +func (*RegisterRequest) Descriptor() ([]byte, []int) { + return file_runner_v1_messages_proto_rawDescGZIP(), []int{0} +} + +func (x *RegisterRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *RegisterRequest) GetToken() string { + if x != nil { + return x.Token + } + return "" +} + +// Deprecated: Do not use. +func (x *RegisterRequest) GetAgentLabels() []string { + if x != nil { + return x.AgentLabels + } + return nil +} + +// Deprecated: Do not use. +func (x *RegisterRequest) GetCustomLabels() []string { + if x != nil { + return x.CustomLabels + } + return nil +} + +func (x *RegisterRequest) GetVersion() string { + if x != nil { + return x.Version + } + return "" +} + +func (x *RegisterRequest) GetLabels() []string { + if x != nil { + return x.Labels + } + return nil +} + +func (x *RegisterRequest) GetEphemeral() bool { + if x != nil { + return x.Ephemeral + } + return false +} + +type RegisterResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Runner *Runner `protobuf:"bytes,1,opt,name=runner,proto3" json:"runner,omitempty"` +} + +func (x *RegisterResponse) Reset() { + *x = RegisterResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_runner_v1_messages_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RegisterResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RegisterResponse) ProtoMessage() {} + +func (x *RegisterResponse) ProtoReflect() protoreflect.Message { + mi := &file_runner_v1_messages_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RegisterResponse.ProtoReflect.Descriptor instead. +func (*RegisterResponse) Descriptor() ([]byte, []int) { + return file_runner_v1_messages_proto_rawDescGZIP(), []int{1} +} + +func (x *RegisterResponse) GetRunner() *Runner { + if x != nil { + return x.Runner + } + return nil +} + +type DeclareRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Version string `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"` + Labels []string `protobuf:"bytes,2,rep,name=labels,proto3" json:"labels,omitempty"` +} + +func (x *DeclareRequest) Reset() { + *x = DeclareRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_runner_v1_messages_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeclareRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeclareRequest) ProtoMessage() {} + +func (x *DeclareRequest) ProtoReflect() protoreflect.Message { + mi := &file_runner_v1_messages_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeclareRequest.ProtoReflect.Descriptor instead. +func (*DeclareRequest) Descriptor() ([]byte, []int) { + return file_runner_v1_messages_proto_rawDescGZIP(), []int{2} +} + +func (x *DeclareRequest) GetVersion() string { + if x != nil { + return x.Version + } + return "" +} + +func (x *DeclareRequest) GetLabels() []string { + if x != nil { + return x.Labels + } + return nil +} + +type DeclareResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Runner *Runner `protobuf:"bytes,1,opt,name=runner,proto3" json:"runner,omitempty"` +} + +func (x *DeclareResponse) Reset() { + *x = DeclareResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_runner_v1_messages_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeclareResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeclareResponse) ProtoMessage() {} + +func (x *DeclareResponse) ProtoReflect() protoreflect.Message { + mi := &file_runner_v1_messages_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeclareResponse.ProtoReflect.Descriptor instead. +func (*DeclareResponse) Descriptor() ([]byte, []int) { + return file_runner_v1_messages_proto_rawDescGZIP(), []int{3} +} + +func (x *DeclareResponse) GetRunner() *Runner { + if x != nil { + return x.Runner + } + return nil +} + +type FetchTaskRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + TasksVersion int64 `protobuf:"varint,1,opt,name=tasks_version,json=tasksVersion,proto3" json:"tasks_version,omitempty"` // Runner use `tasks_version` to compare with Gitea and detemine whether new tasks may exist. +} + +func (x *FetchTaskRequest) Reset() { + *x = FetchTaskRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_runner_v1_messages_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FetchTaskRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FetchTaskRequest) ProtoMessage() {} + +func (x *FetchTaskRequest) ProtoReflect() protoreflect.Message { + mi := &file_runner_v1_messages_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FetchTaskRequest.ProtoReflect.Descriptor instead. +func (*FetchTaskRequest) Descriptor() ([]byte, []int) { + return file_runner_v1_messages_proto_rawDescGZIP(), []int{4} +} + +func (x *FetchTaskRequest) GetTasksVersion() int64 { + if x != nil { + return x.TasksVersion + } + return 0 +} + +type FetchTaskResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Task *Task `protobuf:"bytes,1,opt,name=task,proto3" json:"task,omitempty"` + TasksVersion int64 `protobuf:"varint,2,opt,name=tasks_version,json=tasksVersion,proto3" json:"tasks_version,omitempty"` // Gitea informs the Runner of the latest version of tasks through `tasks_version`. +} + +func (x *FetchTaskResponse) Reset() { + *x = FetchTaskResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_runner_v1_messages_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FetchTaskResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FetchTaskResponse) ProtoMessage() {} + +func (x *FetchTaskResponse) ProtoReflect() protoreflect.Message { + mi := &file_runner_v1_messages_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FetchTaskResponse.ProtoReflect.Descriptor instead. +func (*FetchTaskResponse) Descriptor() ([]byte, []int) { + return file_runner_v1_messages_proto_rawDescGZIP(), []int{5} +} + +func (x *FetchTaskResponse) GetTask() *Task { + if x != nil { + return x.Task + } + return nil +} + +func (x *FetchTaskResponse) GetTasksVersion() int64 { + if x != nil { + return x.TasksVersion + } + return 0 +} + +type UpdateTaskRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + State *TaskState `protobuf:"bytes,1,opt,name=state,proto3" json:"state,omitempty"` + Outputs map[string]string `protobuf:"bytes,2,rep,name=outputs,proto3" json:"outputs,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` // The outputs of the task. Since the outputs may be large, the client does not need to send all outputs every time, only the unsent outputs. +} + +func (x *UpdateTaskRequest) Reset() { + *x = UpdateTaskRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_runner_v1_messages_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateTaskRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateTaskRequest) ProtoMessage() {} + +func (x *UpdateTaskRequest) ProtoReflect() protoreflect.Message { + mi := &file_runner_v1_messages_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdateTaskRequest.ProtoReflect.Descriptor instead. +func (*UpdateTaskRequest) Descriptor() ([]byte, []int) { + return file_runner_v1_messages_proto_rawDescGZIP(), []int{6} +} + +func (x *UpdateTaskRequest) GetState() *TaskState { + if x != nil { + return x.State + } + return nil +} + +func (x *UpdateTaskRequest) GetOutputs() map[string]string { + if x != nil { + return x.Outputs + } + return nil +} + +type UpdateTaskResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + State *TaskState `protobuf:"bytes,1,opt,name=state,proto3" json:"state,omitempty"` + SentOutputs []string `protobuf:"bytes,2,rep,name=sent_outputs,json=sentOutputs,proto3" json:"sent_outputs,omitempty"` // The keys of the outputs that have been sent, not only the ones that have been sent this time, but also those that have been sent before. +} + +func (x *UpdateTaskResponse) Reset() { + *x = UpdateTaskResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_runner_v1_messages_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateTaskResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateTaskResponse) ProtoMessage() {} + +func (x *UpdateTaskResponse) ProtoReflect() protoreflect.Message { + mi := &file_runner_v1_messages_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdateTaskResponse.ProtoReflect.Descriptor instead. +func (*UpdateTaskResponse) Descriptor() ([]byte, []int) { + return file_runner_v1_messages_proto_rawDescGZIP(), []int{7} +} + +func (x *UpdateTaskResponse) GetState() *TaskState { + if x != nil { + return x.State + } + return nil +} + +func (x *UpdateTaskResponse) GetSentOutputs() []string { + if x != nil { + return x.SentOutputs + } + return nil +} + +type UpdateLogRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + TaskId int64 `protobuf:"varint,1,opt,name=task_id,json=taskId,proto3" json:"task_id,omitempty"` + Index int64 `protobuf:"varint,2,opt,name=index,proto3" json:"index,omitempty"` // The actual index of the first line. + Rows []*LogRow `protobuf:"bytes,3,rep,name=rows,proto3" json:"rows,omitempty"` + NoMore bool `protobuf:"varint,4,opt,name=no_more,json=noMore,proto3" json:"no_more,omitempty"` // No more logs. +} + +func (x *UpdateLogRequest) Reset() { + *x = UpdateLogRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_runner_v1_messages_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateLogRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateLogRequest) ProtoMessage() {} + +func (x *UpdateLogRequest) ProtoReflect() protoreflect.Message { + mi := &file_runner_v1_messages_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdateLogRequest.ProtoReflect.Descriptor instead. +func (*UpdateLogRequest) Descriptor() ([]byte, []int) { + return file_runner_v1_messages_proto_rawDescGZIP(), []int{8} +} + +func (x *UpdateLogRequest) GetTaskId() int64 { + if x != nil { + return x.TaskId + } + return 0 +} + +func (x *UpdateLogRequest) GetIndex() int64 { + if x != nil { + return x.Index + } + return 0 +} + +func (x *UpdateLogRequest) GetRows() []*LogRow { + if x != nil { + return x.Rows + } + return nil +} + +func (x *UpdateLogRequest) GetNoMore() bool { + if x != nil { + return x.NoMore + } + return false +} + +type UpdateLogResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + AckIndex int64 `protobuf:"varint,1,opt,name=ack_index,json=ackIndex,proto3" json:"ack_index,omitempty"` // If all lines are received, should be index + length(lines). +} + +func (x *UpdateLogResponse) Reset() { + *x = UpdateLogResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_runner_v1_messages_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateLogResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateLogResponse) ProtoMessage() {} + +func (x *UpdateLogResponse) ProtoReflect() protoreflect.Message { + mi := &file_runner_v1_messages_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdateLogResponse.ProtoReflect.Descriptor instead. +func (*UpdateLogResponse) Descriptor() ([]byte, []int) { + return file_runner_v1_messages_proto_rawDescGZIP(), []int{9} +} + +func (x *UpdateLogResponse) GetAckIndex() int64 { + if x != nil { + return x.AckIndex + } + return 0 +} + +// Runner Payload +type Runner struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + Uuid string `protobuf:"bytes,2,opt,name=uuid,proto3" json:"uuid,omitempty"` + Token string `protobuf:"bytes,3,opt,name=token,proto3" json:"token,omitempty"` + Name string `protobuf:"bytes,4,opt,name=name,proto3" json:"name,omitempty"` + Status RunnerStatus `protobuf:"varint,5,opt,name=status,proto3,enum=runner.v1.RunnerStatus" json:"status,omitempty"` + // Deprecated: Do not use. + AgentLabels []string `protobuf:"bytes,6,rep,name=agent_labels,json=agentLabels,proto3" json:"agent_labels,omitempty"` + // Deprecated: Do not use. + CustomLabels []string `protobuf:"bytes,7,rep,name=custom_labels,json=customLabels,proto3" json:"custom_labels,omitempty"` + Version string `protobuf:"bytes,8,opt,name=version,proto3" json:"version,omitempty"` + Labels []string `protobuf:"bytes,9,rep,name=labels,proto3" json:"labels,omitempty"` + Ephemeral bool `protobuf:"varint,10,opt,name=ephemeral,proto3" json:"ephemeral,omitempty"` +} + +func (x *Runner) Reset() { + *x = Runner{} + if protoimpl.UnsafeEnabled { + mi := &file_runner_v1_messages_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Runner) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Runner) ProtoMessage() {} + +func (x *Runner) ProtoReflect() protoreflect.Message { + mi := &file_runner_v1_messages_proto_msgTypes[10] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Runner.ProtoReflect.Descriptor instead. +func (*Runner) Descriptor() ([]byte, []int) { + return file_runner_v1_messages_proto_rawDescGZIP(), []int{10} +} + +func (x *Runner) GetId() int64 { + if x != nil { + return x.Id + } + return 0 +} + +func (x *Runner) GetUuid() string { + if x != nil { + return x.Uuid + } + return "" +} + +func (x *Runner) GetToken() string { + if x != nil { + return x.Token + } + return "" +} + +func (x *Runner) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *Runner) GetStatus() RunnerStatus { + if x != nil { + return x.Status + } + return RunnerStatus_RUNNER_STATUS_UNSPECIFIED +} + +// Deprecated: Do not use. +func (x *Runner) GetAgentLabels() []string { + if x != nil { + return x.AgentLabels + } + return nil +} + +// Deprecated: Do not use. +func (x *Runner) GetCustomLabels() []string { + if x != nil { + return x.CustomLabels + } + return nil +} + +func (x *Runner) GetVersion() string { + if x != nil { + return x.Version + } + return "" +} + +func (x *Runner) GetLabels() []string { + if x != nil { + return x.Labels + } + return nil +} + +func (x *Runner) GetEphemeral() bool { + if x != nil { + return x.Ephemeral + } + return false +} + +// Task represents a task. +type Task struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // A unique number for each workflow run, unlike run_id or job_id, task_id never be reused. + WorkflowPayload []byte `protobuf:"bytes,2,opt,name=workflow_payload,json=workflowPayload,proto3,oneof" json:"workflow_payload,omitempty"` // The content of the expanded workflow yaml file. + Context *structpb.Struct `protobuf:"bytes,3,opt,name=context,proto3,oneof" json:"context,omitempty"` // See https://docs.github.com/en/actions/learn-github-actions/contexts#github-context . + Secrets map[string]string `protobuf:"bytes,4,rep,name=secrets,proto3" json:"secrets,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` // See https://docs.github.com/en/actions/learn-github-actions/contexts#secrets-context . + // Deprecated: Do not use. + Machine string `protobuf:"bytes,5,opt,name=machine,proto3" json:"machine,omitempty"` // Unused. + Needs map[string]*TaskNeed `protobuf:"bytes,6,rep,name=needs,proto3" json:"needs,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` // See https://docs.github.com/en/actions/learn-github-actions/contexts#needs-context . + Vars map[string]string `protobuf:"bytes,7,rep,name=vars,proto3" json:"vars,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` // See https://docs.github.com/en/actions/learn-github-actions/contexts#vars-context . +} + +func (x *Task) Reset() { + *x = Task{} + if protoimpl.UnsafeEnabled { + mi := &file_runner_v1_messages_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Task) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Task) ProtoMessage() {} + +func (x *Task) ProtoReflect() protoreflect.Message { + mi := &file_runner_v1_messages_proto_msgTypes[11] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Task.ProtoReflect.Descriptor instead. +func (*Task) Descriptor() ([]byte, []int) { + return file_runner_v1_messages_proto_rawDescGZIP(), []int{11} +} + +func (x *Task) GetId() int64 { + if x != nil { + return x.Id + } + return 0 +} + +func (x *Task) GetWorkflowPayload() []byte { + if x != nil { + return x.WorkflowPayload + } + return nil +} + +func (x *Task) GetContext() *structpb.Struct { + if x != nil { + return x.Context + } + return nil +} + +func (x *Task) GetSecrets() map[string]string { + if x != nil { + return x.Secrets + } + return nil +} + +// Deprecated: Do not use. +func (x *Task) GetMachine() string { + if x != nil { + return x.Machine + } + return "" +} + +func (x *Task) GetNeeds() map[string]*TaskNeed { + if x != nil { + return x.Needs + } + return nil +} + +func (x *Task) GetVars() map[string]string { + if x != nil { + return x.Vars + } + return nil +} + +// TaskNeed represents a task need. +type TaskNeed struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Outputs map[string]string `protobuf:"bytes,1,rep,name=outputs,proto3" json:"outputs,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` // The set of outputs of a job that the current job depends on. + Result Result `protobuf:"varint,2,opt,name=result,proto3,enum=runner.v1.Result" json:"result,omitempty"` // The result of a job that the current job depends on. Possible values are success, failure, cancelled, or skipped. +} + +func (x *TaskNeed) Reset() { + *x = TaskNeed{} + if protoimpl.UnsafeEnabled { + mi := &file_runner_v1_messages_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TaskNeed) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TaskNeed) ProtoMessage() {} + +func (x *TaskNeed) ProtoReflect() protoreflect.Message { + mi := &file_runner_v1_messages_proto_msgTypes[12] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TaskNeed.ProtoReflect.Descriptor instead. +func (*TaskNeed) Descriptor() ([]byte, []int) { + return file_runner_v1_messages_proto_rawDescGZIP(), []int{12} +} + +func (x *TaskNeed) GetOutputs() map[string]string { + if x != nil { + return x.Outputs + } + return nil +} + +func (x *TaskNeed) GetResult() Result { + if x != nil { + return x.Result + } + return Result_RESULT_UNSPECIFIED +} + +// TaskState represents the state of a task. +type TaskState struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + Result Result `protobuf:"varint,2,opt,name=result,proto3,enum=runner.v1.Result" json:"result,omitempty"` + StartedAt *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=started_at,json=startedAt,proto3" json:"started_at,omitempty"` + StoppedAt *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=stopped_at,json=stoppedAt,proto3" json:"stopped_at,omitempty"` + Steps []*StepState `protobuf:"bytes,5,rep,name=steps,proto3" json:"steps,omitempty"` +} + +func (x *TaskState) Reset() { + *x = TaskState{} + if protoimpl.UnsafeEnabled { + mi := &file_runner_v1_messages_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TaskState) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TaskState) ProtoMessage() {} + +func (x *TaskState) ProtoReflect() protoreflect.Message { + mi := &file_runner_v1_messages_proto_msgTypes[13] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TaskState.ProtoReflect.Descriptor instead. +func (*TaskState) Descriptor() ([]byte, []int) { + return file_runner_v1_messages_proto_rawDescGZIP(), []int{13} +} + +func (x *TaskState) GetId() int64 { + if x != nil { + return x.Id + } + return 0 +} + +func (x *TaskState) GetResult() Result { + if x != nil { + return x.Result + } + return Result_RESULT_UNSPECIFIED +} + +func (x *TaskState) GetStartedAt() *timestamppb.Timestamp { + if x != nil { + return x.StartedAt + } + return nil +} + +func (x *TaskState) GetStoppedAt() *timestamppb.Timestamp { + if x != nil { + return x.StoppedAt + } + return nil +} + +func (x *TaskState) GetSteps() []*StepState { + if x != nil { + return x.Steps + } + return nil +} + +// TaskState represents the state of a step. +type StepState struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + Result Result `protobuf:"varint,2,opt,name=result,proto3,enum=runner.v1.Result" json:"result,omitempty"` + StartedAt *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=started_at,json=startedAt,proto3" json:"started_at,omitempty"` + StoppedAt *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=stopped_at,json=stoppedAt,proto3" json:"stopped_at,omitempty"` + LogIndex int64 `protobuf:"varint,5,opt,name=log_index,json=logIndex,proto3" json:"log_index,omitempty"` // Where the first line log of the step. + LogLength int64 `protobuf:"varint,6,opt,name=log_length,json=logLength,proto3" json:"log_length,omitempty"` // How many logs the step has. +} + +func (x *StepState) Reset() { + *x = StepState{} + if protoimpl.UnsafeEnabled { + mi := &file_runner_v1_messages_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *StepState) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StepState) ProtoMessage() {} + +func (x *StepState) ProtoReflect() protoreflect.Message { + mi := &file_runner_v1_messages_proto_msgTypes[14] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StepState.ProtoReflect.Descriptor instead. +func (*StepState) Descriptor() ([]byte, []int) { + return file_runner_v1_messages_proto_rawDescGZIP(), []int{14} +} + +func (x *StepState) GetId() int64 { + if x != nil { + return x.Id + } + return 0 +} + +func (x *StepState) GetResult() Result { + if x != nil { + return x.Result + } + return Result_RESULT_UNSPECIFIED +} + +func (x *StepState) GetStartedAt() *timestamppb.Timestamp { + if x != nil { + return x.StartedAt + } + return nil +} + +func (x *StepState) GetStoppedAt() *timestamppb.Timestamp { + if x != nil { + return x.StoppedAt + } + return nil +} + +func (x *StepState) GetLogIndex() int64 { + if x != nil { + return x.LogIndex + } + return 0 +} + +func (x *StepState) GetLogLength() int64 { + if x != nil { + return x.LogLength + } + return 0 +} + +// LogRow represents a row of logs. +type LogRow struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Time *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=time,proto3" json:"time,omitempty"` + Content string `protobuf:"bytes,2,opt,name=content,proto3" json:"content,omitempty"` +} + +func (x *LogRow) Reset() { + *x = LogRow{} + if protoimpl.UnsafeEnabled { + mi := &file_runner_v1_messages_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *LogRow) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LogRow) ProtoMessage() {} + +func (x *LogRow) ProtoReflect() protoreflect.Message { + mi := &file_runner_v1_messages_proto_msgTypes[15] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use LogRow.ProtoReflect.Descriptor instead. +func (*LogRow) Descriptor() ([]byte, []int) { + return file_runner_v1_messages_proto_rawDescGZIP(), []int{15} +} + +func (x *LogRow) GetTime() *timestamppb.Timestamp { + if x != nil { + return x.Time + } + return nil +} + +func (x *LogRow) GetContent() string { + if x != nil { + return x.Content + } + return "" +} + +var File_runner_v1_messages_proto protoreflect.FileDescriptor + +var file_runner_v1_messages_proto_rawDesc = []byte{ + 0x0a, 0x18, 0x72, 0x75, 0x6e, 0x6e, 0x65, 0x72, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x65, 0x73, 0x73, + 0x61, 0x67, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x09, 0x72, 0x75, 0x6e, 0x6e, + 0x65, 0x72, 0x2e, 0x76, 0x31, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xdb, 0x01, 0x0a, 0x0f, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, + 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, + 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x6f, 0x6b, + 0x65, 0x6e, 0x12, 0x25, 0x0a, 0x0c, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x5f, 0x6c, 0x61, 0x62, 0x65, + 0x6c, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x42, 0x02, 0x18, 0x01, 0x52, 0x0b, 0x61, 0x67, + 0x65, 0x6e, 0x74, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x12, 0x27, 0x0a, 0x0d, 0x63, 0x75, 0x73, + 0x74, 0x6f, 0x6d, 0x5f, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, + 0x42, 0x02, 0x18, 0x01, 0x52, 0x0c, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x4c, 0x61, 0x62, 0x65, + 0x6c, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06, + 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x6c, 0x61, + 0x62, 0x65, 0x6c, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x65, 0x70, 0x68, 0x65, 0x6d, 0x65, 0x72, 0x61, + 0x6c, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x65, 0x70, 0x68, 0x65, 0x6d, 0x65, 0x72, + 0x61, 0x6c, 0x22, 0x3d, 0x0a, 0x10, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x29, 0x0a, 0x06, 0x72, 0x75, 0x6e, 0x6e, 0x65, 0x72, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x72, 0x75, 0x6e, 0x6e, 0x65, 0x72, 0x2e, + 0x76, 0x31, 0x2e, 0x52, 0x75, 0x6e, 0x6e, 0x65, 0x72, 0x52, 0x06, 0x72, 0x75, 0x6e, 0x6e, 0x65, + 0x72, 0x22, 0x42, 0x0a, 0x0e, 0x44, 0x65, 0x63, 0x6c, 0x61, 0x72, 0x65, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, + 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x6c, + 0x61, 0x62, 0x65, 0x6c, 0x73, 0x22, 0x3c, 0x0a, 0x0f, 0x44, 0x65, 0x63, 0x6c, 0x61, 0x72, 0x65, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x29, 0x0a, 0x06, 0x72, 0x75, 0x6e, 0x6e, + 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x72, 0x75, 0x6e, 0x6e, 0x65, + 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x75, 0x6e, 0x6e, 0x65, 0x72, 0x52, 0x06, 0x72, 0x75, 0x6e, + 0x6e, 0x65, 0x72, 0x22, 0x37, 0x0a, 0x10, 0x46, 0x65, 0x74, 0x63, 0x68, 0x54, 0x61, 0x73, 0x6b, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x74, 0x61, 0x73, 0x6b, 0x73, + 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, + 0x74, 0x61, 0x73, 0x6b, 0x73, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x5d, 0x0a, 0x11, + 0x46, 0x65, 0x74, 0x63, 0x68, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x23, 0x0a, 0x04, 0x74, 0x61, 0x73, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x0f, 0x2e, 0x72, 0x75, 0x6e, 0x6e, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x61, 0x73, 0x6b, + 0x52, 0x04, 0x74, 0x61, 0x73, 0x6b, 0x12, 0x23, 0x0a, 0x0d, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x5f, + 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x74, + 0x61, 0x73, 0x6b, 0x73, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0xc0, 0x01, 0x0a, 0x11, + 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x2a, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x14, 0x2e, 0x72, 0x75, 0x6e, 0x6e, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x61, 0x73, + 0x6b, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x43, 0x0a, + 0x07, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x29, + 0x2e, 0x72, 0x75, 0x6e, 0x6e, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x4f, 0x75, 0x74, + 0x70, 0x75, 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x07, 0x6f, 0x75, 0x74, 0x70, 0x75, + 0x74, 0x73, 0x1a, 0x3a, 0x0a, 0x0c, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x73, 0x45, 0x6e, 0x74, + 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x63, + 0x0a, 0x12, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2a, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x72, 0x75, 0x6e, 0x6e, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, + 0x54, 0x61, 0x73, 0x6b, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, + 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x65, 0x6e, 0x74, 0x5f, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x73, + 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0b, 0x73, 0x65, 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x70, + 0x75, 0x74, 0x73, 0x22, 0x81, 0x01, 0x0a, 0x10, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4c, 0x6f, + 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x17, 0x0a, 0x07, 0x74, 0x61, 0x73, 0x6b, + 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x74, 0x61, 0x73, 0x6b, 0x49, + 0x64, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, + 0x52, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x25, 0x0a, 0x04, 0x72, 0x6f, 0x77, 0x73, 0x18, + 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x72, 0x75, 0x6e, 0x6e, 0x65, 0x72, 0x2e, 0x76, + 0x31, 0x2e, 0x4c, 0x6f, 0x67, 0x52, 0x6f, 0x77, 0x52, 0x04, 0x72, 0x6f, 0x77, 0x73, 0x12, 0x17, + 0x0a, 0x07, 0x6e, 0x6f, 0x5f, 0x6d, 0x6f, 0x72, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x06, 0x6e, 0x6f, 0x4d, 0x6f, 0x72, 0x65, 0x22, 0x30, 0x0a, 0x11, 0x55, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x4c, 0x6f, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1b, 0x0a, 0x09, + 0x61, 0x63, 0x6b, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, + 0x08, 0x61, 0x63, 0x6b, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x22, 0xa7, 0x02, 0x0a, 0x06, 0x52, 0x75, + 0x6e, 0x6e, 0x65, 0x72, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, + 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x04, 0x75, 0x75, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x6b, 0x65, + 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x12, + 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x12, 0x2f, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x0e, 0x32, 0x17, 0x2e, 0x72, 0x75, 0x6e, 0x6e, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x52, + 0x75, 0x6e, 0x6e, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x12, 0x25, 0x0a, 0x0c, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x5f, 0x6c, 0x61, 0x62, + 0x65, 0x6c, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x09, 0x42, 0x02, 0x18, 0x01, 0x52, 0x0b, 0x61, + 0x67, 0x65, 0x6e, 0x74, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x12, 0x27, 0x0a, 0x0d, 0x63, 0x75, + 0x73, 0x74, 0x6f, 0x6d, 0x5f, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, + 0x09, 0x42, 0x02, 0x18, 0x01, 0x52, 0x0c, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x4c, 0x61, 0x62, + 0x65, 0x6c, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x08, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, + 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x18, 0x09, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x6c, + 0x61, 0x62, 0x65, 0x6c, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x65, 0x70, 0x68, 0x65, 0x6d, 0x65, 0x72, + 0x61, 0x6c, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x65, 0x70, 0x68, 0x65, 0x6d, 0x65, + 0x72, 0x61, 0x6c, 0x22, 0x9a, 0x04, 0x0a, 0x04, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x0e, 0x0a, 0x02, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x2e, 0x0a, 0x10, + 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x48, 0x00, 0x52, 0x0f, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, + 0x6f, 0x77, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x88, 0x01, 0x01, 0x12, 0x36, 0x0a, 0x07, + 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x48, 0x01, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, + 0x74, 0x88, 0x01, 0x01, 0x12, 0x36, 0x0a, 0x07, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x73, 0x18, + 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x72, 0x75, 0x6e, 0x6e, 0x65, 0x72, 0x2e, 0x76, + 0x31, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x2e, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x73, 0x45, 0x6e, + 0x74, 0x72, 0x79, 0x52, 0x07, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x73, 0x12, 0x1c, 0x0a, 0x07, + 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x42, 0x02, 0x18, + 0x01, 0x52, 0x07, 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x12, 0x30, 0x0a, 0x05, 0x6e, 0x65, + 0x65, 0x64, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x72, 0x75, 0x6e, 0x6e, + 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x2e, 0x4e, 0x65, 0x65, 0x64, 0x73, + 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x05, 0x6e, 0x65, 0x65, 0x64, 0x73, 0x12, 0x2d, 0x0a, 0x04, + 0x76, 0x61, 0x72, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x72, 0x75, 0x6e, + 0x6e, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x2e, 0x56, 0x61, 0x72, 0x73, + 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x04, 0x76, 0x61, 0x72, 0x73, 0x1a, 0x3a, 0x0a, 0x0c, 0x53, + 0x65, 0x63, 0x72, 0x65, 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, + 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x4d, 0x0a, 0x0a, 0x4e, 0x65, 0x65, 0x64, 0x73, + 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x29, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x72, 0x75, 0x6e, 0x6e, 0x65, 0x72, 0x2e, + 0x76, 0x31, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x4e, 0x65, 0x65, 0x64, 0x52, 0x05, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x37, 0x0a, 0x09, 0x56, 0x61, 0x72, 0x73, 0x45, 0x6e, + 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x42, + 0x13, 0x0a, 0x11, 0x5f, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x70, 0x61, 0x79, + 0x6c, 0x6f, 0x61, 0x64, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, + 0x22, 0xad, 0x01, 0x0a, 0x08, 0x54, 0x61, 0x73, 0x6b, 0x4e, 0x65, 0x65, 0x64, 0x12, 0x3a, 0x0a, + 0x07, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, + 0x2e, 0x72, 0x75, 0x6e, 0x6e, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x4e, + 0x65, 0x65, 0x64, 0x2e, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, + 0x52, 0x07, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x73, 0x12, 0x29, 0x0a, 0x06, 0x72, 0x65, 0x73, + 0x75, 0x6c, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x11, 0x2e, 0x72, 0x75, 0x6e, 0x6e, + 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x06, 0x72, 0x65, + 0x73, 0x75, 0x6c, 0x74, 0x1a, 0x3a, 0x0a, 0x0c, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x73, 0x45, + 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, + 0x22, 0xe8, 0x01, 0x0a, 0x09, 0x54, 0x61, 0x73, 0x6b, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x0e, + 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x29, + 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x11, + 0x2e, 0x72, 0x75, 0x6e, 0x6e, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x75, 0x6c, + 0x74, 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x39, 0x0a, 0x0a, 0x73, 0x74, 0x61, + 0x72, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x73, 0x74, 0x61, 0x72, 0x74, + 0x65, 0x64, 0x41, 0x74, 0x12, 0x39, 0x0a, 0x0a, 0x73, 0x74, 0x6f, 0x70, 0x70, 0x65, 0x64, 0x5f, + 0x61, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, + 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x73, 0x74, 0x6f, 0x70, 0x70, 0x65, 0x64, 0x41, 0x74, 0x12, + 0x2a, 0x0a, 0x05, 0x73, 0x74, 0x65, 0x70, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, + 0x2e, 0x72, 0x75, 0x6e, 0x6e, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x65, 0x70, 0x53, + 0x74, 0x61, 0x74, 0x65, 0x52, 0x05, 0x73, 0x74, 0x65, 0x70, 0x73, 0x22, 0xf8, 0x01, 0x0a, 0x09, + 0x53, 0x74, 0x65, 0x70, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x29, 0x0a, 0x06, 0x72, 0x65, 0x73, + 0x75, 0x6c, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x11, 0x2e, 0x72, 0x75, 0x6e, 0x6e, + 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x06, 0x72, 0x65, + 0x73, 0x75, 0x6c, 0x74, 0x12, 0x39, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x5f, + 0x61, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, + 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, + 0x39, 0x0a, 0x0a, 0x73, 0x74, 0x6f, 0x70, 0x70, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, + 0x09, 0x73, 0x74, 0x6f, 0x70, 0x70, 0x65, 0x64, 0x41, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x6c, 0x6f, + 0x67, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x6c, + 0x6f, 0x67, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x1d, 0x0a, 0x0a, 0x6c, 0x6f, 0x67, 0x5f, 0x6c, + 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x6c, 0x6f, 0x67, + 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, 0x52, 0x0a, 0x06, 0x4c, 0x6f, 0x67, 0x52, 0x6f, 0x77, + 0x12, 0x2e, 0x0a, 0x04, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x04, 0x74, 0x69, 0x6d, 0x65, + 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2a, 0x7a, 0x0a, 0x0c, 0x52, 0x75, + 0x6e, 0x6e, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1d, 0x0a, 0x19, 0x52, 0x55, + 0x4e, 0x4e, 0x45, 0x52, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, 0x53, 0x50, + 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x16, 0x0a, 0x12, 0x52, 0x55, 0x4e, + 0x4e, 0x45, 0x52, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x49, 0x44, 0x4c, 0x45, 0x10, + 0x01, 0x12, 0x18, 0x0a, 0x14, 0x52, 0x55, 0x4e, 0x4e, 0x45, 0x52, 0x5f, 0x53, 0x54, 0x41, 0x54, + 0x55, 0x53, 0x5f, 0x41, 0x43, 0x54, 0x49, 0x56, 0x45, 0x10, 0x02, 0x12, 0x19, 0x0a, 0x15, 0x52, + 0x55, 0x4e, 0x4e, 0x45, 0x52, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x4f, 0x46, 0x46, + 0x4c, 0x49, 0x4e, 0x45, 0x10, 0x03, 0x2a, 0x72, 0x0a, 0x06, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, + 0x12, 0x16, 0x0a, 0x12, 0x52, 0x45, 0x53, 0x55, 0x4c, 0x54, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, + 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x12, 0x0a, 0x0e, 0x52, 0x45, 0x53, 0x55, + 0x4c, 0x54, 0x5f, 0x53, 0x55, 0x43, 0x43, 0x45, 0x53, 0x53, 0x10, 0x01, 0x12, 0x12, 0x0a, 0x0e, + 0x52, 0x45, 0x53, 0x55, 0x4c, 0x54, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, 0x10, 0x02, + 0x12, 0x14, 0x0a, 0x10, 0x52, 0x45, 0x53, 0x55, 0x4c, 0x54, 0x5f, 0x43, 0x41, 0x4e, 0x43, 0x45, + 0x4c, 0x4c, 0x45, 0x44, 0x10, 0x03, 0x12, 0x12, 0x0a, 0x0e, 0x52, 0x45, 0x53, 0x55, 0x4c, 0x54, + 0x5f, 0x53, 0x4b, 0x49, 0x50, 0x50, 0x45, 0x44, 0x10, 0x04, 0x42, 0x96, 0x01, 0x0a, 0x0d, 0x63, + 0x6f, 0x6d, 0x2e, 0x72, 0x75, 0x6e, 0x6e, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x42, 0x0d, 0x4d, 0x65, + 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x31, 0x63, + 0x6f, 0x64, 0x65, 0x2e, 0x67, 0x69, 0x74, 0x65, 0x61, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x2d, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2d, 0x67, 0x6f, 0x2f, 0x72, 0x75, + 0x6e, 0x6e, 0x65, 0x72, 0x2f, 0x76, 0x31, 0x3b, 0x72, 0x75, 0x6e, 0x6e, 0x65, 0x72, 0x76, 0x31, + 0xa2, 0x02, 0x03, 0x52, 0x58, 0x58, 0xaa, 0x02, 0x09, 0x52, 0x75, 0x6e, 0x6e, 0x65, 0x72, 0x2e, + 0x56, 0x31, 0xca, 0x02, 0x09, 0x52, 0x75, 0x6e, 0x6e, 0x65, 0x72, 0x5c, 0x56, 0x31, 0xe2, 0x02, + 0x15, 0x52, 0x75, 0x6e, 0x6e, 0x65, 0x72, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0a, 0x52, 0x75, 0x6e, 0x6e, 0x65, 0x72, 0x3a, + 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_runner_v1_messages_proto_rawDescOnce sync.Once + file_runner_v1_messages_proto_rawDescData = file_runner_v1_messages_proto_rawDesc +) + +func file_runner_v1_messages_proto_rawDescGZIP() []byte { + file_runner_v1_messages_proto_rawDescOnce.Do(func() { + file_runner_v1_messages_proto_rawDescData = protoimpl.X.CompressGZIP(file_runner_v1_messages_proto_rawDescData) + }) + return file_runner_v1_messages_proto_rawDescData +} + +var file_runner_v1_messages_proto_enumTypes = make([]protoimpl.EnumInfo, 2) +var file_runner_v1_messages_proto_msgTypes = make([]protoimpl.MessageInfo, 21) +var file_runner_v1_messages_proto_goTypes = []interface{}{ + (RunnerStatus)(0), // 0: runner.v1.RunnerStatus + (Result)(0), // 1: runner.v1.Result + (*RegisterRequest)(nil), // 2: runner.v1.RegisterRequest + (*RegisterResponse)(nil), // 3: runner.v1.RegisterResponse + (*DeclareRequest)(nil), // 4: runner.v1.DeclareRequest + (*DeclareResponse)(nil), // 5: runner.v1.DeclareResponse + (*FetchTaskRequest)(nil), // 6: runner.v1.FetchTaskRequest + (*FetchTaskResponse)(nil), // 7: runner.v1.FetchTaskResponse + (*UpdateTaskRequest)(nil), // 8: runner.v1.UpdateTaskRequest + (*UpdateTaskResponse)(nil), // 9: runner.v1.UpdateTaskResponse + (*UpdateLogRequest)(nil), // 10: runner.v1.UpdateLogRequest + (*UpdateLogResponse)(nil), // 11: runner.v1.UpdateLogResponse + (*Runner)(nil), // 12: runner.v1.Runner + (*Task)(nil), // 13: runner.v1.Task + (*TaskNeed)(nil), // 14: runner.v1.TaskNeed + (*TaskState)(nil), // 15: runner.v1.TaskState + (*StepState)(nil), // 16: runner.v1.StepState + (*LogRow)(nil), // 17: runner.v1.LogRow + nil, // 18: runner.v1.UpdateTaskRequest.OutputsEntry + nil, // 19: runner.v1.Task.SecretsEntry + nil, // 20: runner.v1.Task.NeedsEntry + nil, // 21: runner.v1.Task.VarsEntry + nil, // 22: runner.v1.TaskNeed.OutputsEntry + (*structpb.Struct)(nil), // 23: google.protobuf.Struct + (*timestamppb.Timestamp)(nil), // 24: google.protobuf.Timestamp +} +var file_runner_v1_messages_proto_depIdxs = []int32{ + 12, // 0: runner.v1.RegisterResponse.runner:type_name -> runner.v1.Runner + 12, // 1: runner.v1.DeclareResponse.runner:type_name -> runner.v1.Runner + 13, // 2: runner.v1.FetchTaskResponse.task:type_name -> runner.v1.Task + 15, // 3: runner.v1.UpdateTaskRequest.state:type_name -> runner.v1.TaskState + 18, // 4: runner.v1.UpdateTaskRequest.outputs:type_name -> runner.v1.UpdateTaskRequest.OutputsEntry + 15, // 5: runner.v1.UpdateTaskResponse.state:type_name -> runner.v1.TaskState + 17, // 6: runner.v1.UpdateLogRequest.rows:type_name -> runner.v1.LogRow + 0, // 7: runner.v1.Runner.status:type_name -> runner.v1.RunnerStatus + 23, // 8: runner.v1.Task.context:type_name -> google.protobuf.Struct + 19, // 9: runner.v1.Task.secrets:type_name -> runner.v1.Task.SecretsEntry + 20, // 10: runner.v1.Task.needs:type_name -> runner.v1.Task.NeedsEntry + 21, // 11: runner.v1.Task.vars:type_name -> runner.v1.Task.VarsEntry + 22, // 12: runner.v1.TaskNeed.outputs:type_name -> runner.v1.TaskNeed.OutputsEntry + 1, // 13: runner.v1.TaskNeed.result:type_name -> runner.v1.Result + 1, // 14: runner.v1.TaskState.result:type_name -> runner.v1.Result + 24, // 15: runner.v1.TaskState.started_at:type_name -> google.protobuf.Timestamp + 24, // 16: runner.v1.TaskState.stopped_at:type_name -> google.protobuf.Timestamp + 16, // 17: runner.v1.TaskState.steps:type_name -> runner.v1.StepState + 1, // 18: runner.v1.StepState.result:type_name -> runner.v1.Result + 24, // 19: runner.v1.StepState.started_at:type_name -> google.protobuf.Timestamp + 24, // 20: runner.v1.StepState.stopped_at:type_name -> google.protobuf.Timestamp + 24, // 21: runner.v1.LogRow.time:type_name -> google.protobuf.Timestamp + 14, // 22: runner.v1.Task.NeedsEntry.value:type_name -> runner.v1.TaskNeed + 23, // [23:23] is the sub-list for method output_type + 23, // [23:23] is the sub-list for method input_type + 23, // [23:23] is the sub-list for extension type_name + 23, // [23:23] is the sub-list for extension extendee + 0, // [0:23] is the sub-list for field type_name +} + +func init() { file_runner_v1_messages_proto_init() } +func file_runner_v1_messages_proto_init() { + if File_runner_v1_messages_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_runner_v1_messages_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RegisterRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_runner_v1_messages_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RegisterResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_runner_v1_messages_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeclareRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_runner_v1_messages_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeclareResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_runner_v1_messages_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FetchTaskRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_runner_v1_messages_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FetchTaskResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_runner_v1_messages_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateTaskRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_runner_v1_messages_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateTaskResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_runner_v1_messages_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateLogRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_runner_v1_messages_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateLogResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_runner_v1_messages_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Runner); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_runner_v1_messages_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Task); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_runner_v1_messages_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TaskNeed); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_runner_v1_messages_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TaskState); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_runner_v1_messages_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StepState); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_runner_v1_messages_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*LogRow); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_runner_v1_messages_proto_msgTypes[11].OneofWrappers = []interface{}{} + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_runner_v1_messages_proto_rawDesc, + NumEnums: 2, + NumMessages: 21, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_runner_v1_messages_proto_goTypes, + DependencyIndexes: file_runner_v1_messages_proto_depIdxs, + EnumInfos: file_runner_v1_messages_proto_enumTypes, + MessageInfos: file_runner_v1_messages_proto_msgTypes, + }.Build() + File_runner_v1_messages_proto = out.File + file_runner_v1_messages_proto_rawDesc = nil + file_runner_v1_messages_proto_goTypes = nil + file_runner_v1_messages_proto_depIdxs = nil +} diff --git a/runner/v1/runnerv1connect/services.connect.go b/runner/v1/runnerv1connect/services.connect.go new file mode 100644 index 0000000..3c3e86c --- /dev/null +++ b/runner/v1/runnerv1connect/services.connect.go @@ -0,0 +1,239 @@ +// Code generated by protoc-gen-connect-go. DO NOT EDIT. +// +// Source: runner/v1/services.proto + +package runnerv1connect + +import ( + v1 "code.gitea.io/actions-proto-go/runner/v1" + connect "connectrpc.com/connect" + context "context" + errors "errors" + http "net/http" + strings "strings" +) + +// This is a compile-time assertion to ensure that this generated file and the connect package are +// compatible. If you get a compiler error that this constant is not defined, this code was +// generated with a version of connect newer than the one compiled into your binary. You can fix the +// problem by either regenerating this code with an older version of connect or updating the connect +// version compiled into your binary. +const _ = connect.IsAtLeastVersion1_13_0 + +const ( + // RunnerServiceName is the fully-qualified name of the RunnerService service. + RunnerServiceName = "runner.v1.RunnerService" +) + +// These constants are the fully-qualified names of the RPCs defined in this package. They're +// exposed at runtime as Spec.Procedure and as the final two segments of the HTTP route. +// +// Note that these are different from the fully-qualified method names used by +// google.golang.org/protobuf/reflect/protoreflect. To convert from these constants to +// reflection-formatted method names, remove the leading slash and convert the remaining slash to a +// period. +const ( + // RunnerServiceRegisterProcedure is the fully-qualified name of the RunnerService's Register RPC. + RunnerServiceRegisterProcedure = "/runner.v1.RunnerService/Register" + // RunnerServiceDeclareProcedure is the fully-qualified name of the RunnerService's Declare RPC. + RunnerServiceDeclareProcedure = "/runner.v1.RunnerService/Declare" + // RunnerServiceFetchTaskProcedure is the fully-qualified name of the RunnerService's FetchTask RPC. + RunnerServiceFetchTaskProcedure = "/runner.v1.RunnerService/FetchTask" + // RunnerServiceUpdateTaskProcedure is the fully-qualified name of the RunnerService's UpdateTask + // RPC. + RunnerServiceUpdateTaskProcedure = "/runner.v1.RunnerService/UpdateTask" + // RunnerServiceUpdateLogProcedure is the fully-qualified name of the RunnerService's UpdateLog RPC. + RunnerServiceUpdateLogProcedure = "/runner.v1.RunnerService/UpdateLog" +) + +// These variables are the protoreflect.Descriptor objects for the RPCs defined in this package. +var ( + runnerServiceServiceDescriptor = v1.File_runner_v1_services_proto.Services().ByName("RunnerService") + runnerServiceRegisterMethodDescriptor = runnerServiceServiceDescriptor.Methods().ByName("Register") + runnerServiceDeclareMethodDescriptor = runnerServiceServiceDescriptor.Methods().ByName("Declare") + runnerServiceFetchTaskMethodDescriptor = runnerServiceServiceDescriptor.Methods().ByName("FetchTask") + runnerServiceUpdateTaskMethodDescriptor = runnerServiceServiceDescriptor.Methods().ByName("UpdateTask") + runnerServiceUpdateLogMethodDescriptor = runnerServiceServiceDescriptor.Methods().ByName("UpdateLog") +) + +// RunnerServiceClient is a client for the runner.v1.RunnerService service. +type RunnerServiceClient interface { + // Register register a new runner in server. + Register(context.Context, *connect.Request[v1.RegisterRequest]) (*connect.Response[v1.RegisterResponse], error) + // Declare declare runner's version and labels to Gitea before starting fetching task. + Declare(context.Context, *connect.Request[v1.DeclareRequest]) (*connect.Response[v1.DeclareResponse], error) + // FetchTask requests the next available task for execution. + FetchTask(context.Context, *connect.Request[v1.FetchTaskRequest]) (*connect.Response[v1.FetchTaskResponse], error) + // UpdateTask updates the task status. + UpdateTask(context.Context, *connect.Request[v1.UpdateTaskRequest]) (*connect.Response[v1.UpdateTaskResponse], error) + // UpdateLog uploads log of the task. + UpdateLog(context.Context, *connect.Request[v1.UpdateLogRequest]) (*connect.Response[v1.UpdateLogResponse], error) +} + +// NewRunnerServiceClient constructs a client for the runner.v1.RunnerService service. By default, +// it uses the Connect protocol with the binary Protobuf Codec, asks for gzipped responses, and +// sends uncompressed requests. To use the gRPC or gRPC-Web protocols, supply the connect.WithGRPC() +// or connect.WithGRPCWeb() options. +// +// The URL supplied here should be the base URL for the Connect or gRPC server (for example, +// http://api.acme.com or https://acme.com/grpc). +func NewRunnerServiceClient(httpClient connect.HTTPClient, baseURL string, opts ...connect.ClientOption) RunnerServiceClient { + baseURL = strings.TrimRight(baseURL, "/") + return &runnerServiceClient{ + register: connect.NewClient[v1.RegisterRequest, v1.RegisterResponse]( + httpClient, + baseURL+RunnerServiceRegisterProcedure, + connect.WithSchema(runnerServiceRegisterMethodDescriptor), + connect.WithClientOptions(opts...), + ), + declare: connect.NewClient[v1.DeclareRequest, v1.DeclareResponse]( + httpClient, + baseURL+RunnerServiceDeclareProcedure, + connect.WithSchema(runnerServiceDeclareMethodDescriptor), + connect.WithClientOptions(opts...), + ), + fetchTask: connect.NewClient[v1.FetchTaskRequest, v1.FetchTaskResponse]( + httpClient, + baseURL+RunnerServiceFetchTaskProcedure, + connect.WithSchema(runnerServiceFetchTaskMethodDescriptor), + connect.WithClientOptions(opts...), + ), + updateTask: connect.NewClient[v1.UpdateTaskRequest, v1.UpdateTaskResponse]( + httpClient, + baseURL+RunnerServiceUpdateTaskProcedure, + connect.WithSchema(runnerServiceUpdateTaskMethodDescriptor), + connect.WithClientOptions(opts...), + ), + updateLog: connect.NewClient[v1.UpdateLogRequest, v1.UpdateLogResponse]( + httpClient, + baseURL+RunnerServiceUpdateLogProcedure, + connect.WithSchema(runnerServiceUpdateLogMethodDescriptor), + connect.WithClientOptions(opts...), + ), + } +} + +// runnerServiceClient implements RunnerServiceClient. +type runnerServiceClient struct { + register *connect.Client[v1.RegisterRequest, v1.RegisterResponse] + declare *connect.Client[v1.DeclareRequest, v1.DeclareResponse] + fetchTask *connect.Client[v1.FetchTaskRequest, v1.FetchTaskResponse] + updateTask *connect.Client[v1.UpdateTaskRequest, v1.UpdateTaskResponse] + updateLog *connect.Client[v1.UpdateLogRequest, v1.UpdateLogResponse] +} + +// Register calls runner.v1.RunnerService.Register. +func (c *runnerServiceClient) Register(ctx context.Context, req *connect.Request[v1.RegisterRequest]) (*connect.Response[v1.RegisterResponse], error) { + return c.register.CallUnary(ctx, req) +} + +// Declare calls runner.v1.RunnerService.Declare. +func (c *runnerServiceClient) Declare(ctx context.Context, req *connect.Request[v1.DeclareRequest]) (*connect.Response[v1.DeclareResponse], error) { + return c.declare.CallUnary(ctx, req) +} + +// FetchTask calls runner.v1.RunnerService.FetchTask. +func (c *runnerServiceClient) FetchTask(ctx context.Context, req *connect.Request[v1.FetchTaskRequest]) (*connect.Response[v1.FetchTaskResponse], error) { + return c.fetchTask.CallUnary(ctx, req) +} + +// UpdateTask calls runner.v1.RunnerService.UpdateTask. +func (c *runnerServiceClient) UpdateTask(ctx context.Context, req *connect.Request[v1.UpdateTaskRequest]) (*connect.Response[v1.UpdateTaskResponse], error) { + return c.updateTask.CallUnary(ctx, req) +} + +// UpdateLog calls runner.v1.RunnerService.UpdateLog. +func (c *runnerServiceClient) UpdateLog(ctx context.Context, req *connect.Request[v1.UpdateLogRequest]) (*connect.Response[v1.UpdateLogResponse], error) { + return c.updateLog.CallUnary(ctx, req) +} + +// RunnerServiceHandler is an implementation of the runner.v1.RunnerService service. +type RunnerServiceHandler interface { + // Register register a new runner in server. + Register(context.Context, *connect.Request[v1.RegisterRequest]) (*connect.Response[v1.RegisterResponse], error) + // Declare declare runner's version and labels to Gitea before starting fetching task. + Declare(context.Context, *connect.Request[v1.DeclareRequest]) (*connect.Response[v1.DeclareResponse], error) + // FetchTask requests the next available task for execution. + FetchTask(context.Context, *connect.Request[v1.FetchTaskRequest]) (*connect.Response[v1.FetchTaskResponse], error) + // UpdateTask updates the task status. + UpdateTask(context.Context, *connect.Request[v1.UpdateTaskRequest]) (*connect.Response[v1.UpdateTaskResponse], error) + // UpdateLog uploads log of the task. + UpdateLog(context.Context, *connect.Request[v1.UpdateLogRequest]) (*connect.Response[v1.UpdateLogResponse], error) +} + +// NewRunnerServiceHandler builds an HTTP handler from the service implementation. It returns the +// path on which to mount the handler and the handler itself. +// +// By default, handlers support the Connect, gRPC, and gRPC-Web protocols with the binary Protobuf +// and JSON codecs. They also support gzip compression. +func NewRunnerServiceHandler(svc RunnerServiceHandler, opts ...connect.HandlerOption) (string, http.Handler) { + runnerServiceRegisterHandler := connect.NewUnaryHandler( + RunnerServiceRegisterProcedure, + svc.Register, + connect.WithSchema(runnerServiceRegisterMethodDescriptor), + connect.WithHandlerOptions(opts...), + ) + runnerServiceDeclareHandler := connect.NewUnaryHandler( + RunnerServiceDeclareProcedure, + svc.Declare, + connect.WithSchema(runnerServiceDeclareMethodDescriptor), + connect.WithHandlerOptions(opts...), + ) + runnerServiceFetchTaskHandler := connect.NewUnaryHandler( + RunnerServiceFetchTaskProcedure, + svc.FetchTask, + connect.WithSchema(runnerServiceFetchTaskMethodDescriptor), + connect.WithHandlerOptions(opts...), + ) + runnerServiceUpdateTaskHandler := connect.NewUnaryHandler( + RunnerServiceUpdateTaskProcedure, + svc.UpdateTask, + connect.WithSchema(runnerServiceUpdateTaskMethodDescriptor), + connect.WithHandlerOptions(opts...), + ) + runnerServiceUpdateLogHandler := connect.NewUnaryHandler( + RunnerServiceUpdateLogProcedure, + svc.UpdateLog, + connect.WithSchema(runnerServiceUpdateLogMethodDescriptor), + connect.WithHandlerOptions(opts...), + ) + return "/runner.v1.RunnerService/", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + switch r.URL.Path { + case RunnerServiceRegisterProcedure: + runnerServiceRegisterHandler.ServeHTTP(w, r) + case RunnerServiceDeclareProcedure: + runnerServiceDeclareHandler.ServeHTTP(w, r) + case RunnerServiceFetchTaskProcedure: + runnerServiceFetchTaskHandler.ServeHTTP(w, r) + case RunnerServiceUpdateTaskProcedure: + runnerServiceUpdateTaskHandler.ServeHTTP(w, r) + case RunnerServiceUpdateLogProcedure: + runnerServiceUpdateLogHandler.ServeHTTP(w, r) + default: + http.NotFound(w, r) + } + }) +} + +// UnimplementedRunnerServiceHandler returns CodeUnimplemented from all methods. +type UnimplementedRunnerServiceHandler struct{} + +func (UnimplementedRunnerServiceHandler) Register(context.Context, *connect.Request[v1.RegisterRequest]) (*connect.Response[v1.RegisterResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("runner.v1.RunnerService.Register is not implemented")) +} + +func (UnimplementedRunnerServiceHandler) Declare(context.Context, *connect.Request[v1.DeclareRequest]) (*connect.Response[v1.DeclareResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("runner.v1.RunnerService.Declare is not implemented")) +} + +func (UnimplementedRunnerServiceHandler) FetchTask(context.Context, *connect.Request[v1.FetchTaskRequest]) (*connect.Response[v1.FetchTaskResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("runner.v1.RunnerService.FetchTask is not implemented")) +} + +func (UnimplementedRunnerServiceHandler) UpdateTask(context.Context, *connect.Request[v1.UpdateTaskRequest]) (*connect.Response[v1.UpdateTaskResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("runner.v1.RunnerService.UpdateTask is not implemented")) +} + +func (UnimplementedRunnerServiceHandler) UpdateLog(context.Context, *connect.Request[v1.UpdateLogRequest]) (*connect.Response[v1.UpdateLogResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("runner.v1.RunnerService.UpdateLog is not implemented")) +} diff --git a/runner/v1/services.pb.go b/runner/v1/services.pb.go new file mode 100644 index 0000000..851bf85 --- /dev/null +++ b/runner/v1/services.pb.go @@ -0,0 +1,118 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.28.1 +// protoc (unknown) +// source: runner/v1/services.proto + +package runnerv1 + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +var File_runner_v1_services_proto protoreflect.FileDescriptor + +var file_runner_v1_services_proto_rawDesc = []byte{ + 0x0a, 0x18, 0x72, 0x75, 0x6e, 0x6e, 0x65, 0x72, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x65, 0x72, 0x76, + 0x69, 0x63, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x09, 0x72, 0x75, 0x6e, 0x6e, + 0x65, 0x72, 0x2e, 0x76, 0x31, 0x1a, 0x18, 0x72, 0x75, 0x6e, 0x6e, 0x65, 0x72, 0x2f, 0x76, 0x31, + 0x2f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x32, + 0xfb, 0x02, 0x0a, 0x0d, 0x52, 0x75, 0x6e, 0x6e, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x12, 0x45, 0x0a, 0x08, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x12, 0x1a, 0x2e, + 0x72, 0x75, 0x6e, 0x6e, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, + 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x72, 0x75, 0x6e, 0x6e, + 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x42, 0x0a, 0x07, 0x44, 0x65, 0x63, 0x6c, + 0x61, 0x72, 0x65, 0x12, 0x19, 0x2e, 0x72, 0x75, 0x6e, 0x6e, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, + 0x44, 0x65, 0x63, 0x6c, 0x61, 0x72, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, + 0x2e, 0x72, 0x75, 0x6e, 0x6e, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x63, 0x6c, 0x61, + 0x72, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x48, 0x0a, 0x09, + 0x46, 0x65, 0x74, 0x63, 0x68, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x1b, 0x2e, 0x72, 0x75, 0x6e, 0x6e, + 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x65, 0x74, 0x63, 0x68, 0x54, 0x61, 0x73, 0x6b, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x72, 0x75, 0x6e, 0x6e, 0x65, 0x72, 0x2e, + 0x76, 0x31, 0x2e, 0x46, 0x65, 0x74, 0x63, 0x68, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4b, 0x0a, 0x0a, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x54, 0x61, 0x73, 0x6b, 0x12, 0x1c, 0x2e, 0x72, 0x75, 0x6e, 0x6e, 0x65, 0x72, 0x2e, 0x76, 0x31, + 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x72, 0x75, 0x6e, 0x6e, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x55, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x00, 0x12, 0x48, 0x0a, 0x09, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4c, 0x6f, 0x67, + 0x12, 0x1b, 0x2e, 0x72, 0x75, 0x6e, 0x6e, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x4c, 0x6f, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, + 0x72, 0x75, 0x6e, 0x6e, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x4c, 0x6f, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x96, 0x01, + 0x0a, 0x0d, 0x63, 0x6f, 0x6d, 0x2e, 0x72, 0x75, 0x6e, 0x6e, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x42, + 0x0d, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, + 0x5a, 0x31, 0x63, 0x6f, 0x64, 0x65, 0x2e, 0x67, 0x69, 0x74, 0x65, 0x61, 0x2e, 0x69, 0x6f, 0x2f, + 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2d, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2d, 0x67, 0x6f, + 0x2f, 0x72, 0x75, 0x6e, 0x6e, 0x65, 0x72, 0x2f, 0x76, 0x31, 0x3b, 0x72, 0x75, 0x6e, 0x6e, 0x65, + 0x72, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x52, 0x58, 0x58, 0xaa, 0x02, 0x09, 0x52, 0x75, 0x6e, 0x6e, + 0x65, 0x72, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x09, 0x52, 0x75, 0x6e, 0x6e, 0x65, 0x72, 0x5c, 0x56, + 0x31, 0xe2, 0x02, 0x15, 0x52, 0x75, 0x6e, 0x6e, 0x65, 0x72, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, + 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0a, 0x52, 0x75, 0x6e, 0x6e, + 0x65, 0x72, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var file_runner_v1_services_proto_goTypes = []interface{}{ + (*RegisterRequest)(nil), // 0: runner.v1.RegisterRequest + (*DeclareRequest)(nil), // 1: runner.v1.DeclareRequest + (*FetchTaskRequest)(nil), // 2: runner.v1.FetchTaskRequest + (*UpdateTaskRequest)(nil), // 3: runner.v1.UpdateTaskRequest + (*UpdateLogRequest)(nil), // 4: runner.v1.UpdateLogRequest + (*RegisterResponse)(nil), // 5: runner.v1.RegisterResponse + (*DeclareResponse)(nil), // 6: runner.v1.DeclareResponse + (*FetchTaskResponse)(nil), // 7: runner.v1.FetchTaskResponse + (*UpdateTaskResponse)(nil), // 8: runner.v1.UpdateTaskResponse + (*UpdateLogResponse)(nil), // 9: runner.v1.UpdateLogResponse +} +var file_runner_v1_services_proto_depIdxs = []int32{ + 0, // 0: runner.v1.RunnerService.Register:input_type -> runner.v1.RegisterRequest + 1, // 1: runner.v1.RunnerService.Declare:input_type -> runner.v1.DeclareRequest + 2, // 2: runner.v1.RunnerService.FetchTask:input_type -> runner.v1.FetchTaskRequest + 3, // 3: runner.v1.RunnerService.UpdateTask:input_type -> runner.v1.UpdateTaskRequest + 4, // 4: runner.v1.RunnerService.UpdateLog:input_type -> runner.v1.UpdateLogRequest + 5, // 5: runner.v1.RunnerService.Register:output_type -> runner.v1.RegisterResponse + 6, // 6: runner.v1.RunnerService.Declare:output_type -> runner.v1.DeclareResponse + 7, // 7: runner.v1.RunnerService.FetchTask:output_type -> runner.v1.FetchTaskResponse + 8, // 8: runner.v1.RunnerService.UpdateTask:output_type -> runner.v1.UpdateTaskResponse + 9, // 9: runner.v1.RunnerService.UpdateLog:output_type -> runner.v1.UpdateLogResponse + 5, // [5:10] is the sub-list for method output_type + 0, // [0:5] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_runner_v1_services_proto_init() } +func file_runner_v1_services_proto_init() { + if File_runner_v1_services_proto != nil { + return + } + file_runner_v1_messages_proto_init() + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_runner_v1_services_proto_rawDesc, + NumEnums: 0, + NumMessages: 0, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_runner_v1_services_proto_goTypes, + DependencyIndexes: file_runner_v1_services_proto_depIdxs, + }.Build() + File_runner_v1_services_proto = out.File + file_runner_v1_services_proto_rawDesc = nil + file_runner_v1_services_proto_goTypes = nil + file_runner_v1_services_proto_depIdxs = nil +}