From 1bd597357415509e789a96ba0dbce9b716d41eda Mon Sep 17 00:00:00 2001 From: Paul Johnston Date: Thu, 20 Jul 2023 12:00:23 -0600 Subject: [PATCH 1/2] Add v1beta1 highlighter service --- .../v1beta1/syntax_highlight.proto | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 build/stack/syntax_highlight/v1beta1/syntax_highlight.proto diff --git a/build/stack/syntax_highlight/v1beta1/syntax_highlight.proto b/build/stack/syntax_highlight/v1beta1/syntax_highlight.proto new file mode 100644 index 0000000..03ac875 --- /dev/null +++ b/build/stack/syntax_highlight/v1beta1/syntax_highlight.proto @@ -0,0 +1,28 @@ +syntax = "proto3"; + +package build.stack.syntax_highlight.v1beta1; + +option go_package = "github.com/stackb/bezel/proto/syntax_highlight;syntax_highlight"; + +message SyntaxHighlightRequest { + // filename is the name of the file, which may be used by implementations to + // guess a language. + string filename = 1; + // language is the requested language to format. The recognized list of + // languages is is implementation specific. + string language = 2; + // style is the requested style to format. The recognized list of + // styles is is implementation specific. + string style = 3; + // input is the unformatted syntax. + bytes input = 4; +} + +message SyntaxHighlightResponse { + // output is the formatted syntax. + bytes output = 1; +} + +service SyntaxHighlighter { + rpc SyntaxHighlight(SyntaxHighlightRequest) returns (SyntaxHighlightResponse); +} From b7d60d6878ae235f97a2a4b0f657926c933673b6 Mon Sep 17 00:00:00 2001 From: Paul Johnston Date: Thu, 20 Jul 2023 12:02:47 -0600 Subject: [PATCH 2/2] Add generated files --- Makefile | 1 + .../syntax_highlight/v1beta1/BUILD.bazel | 26 ++ .../v1beta1/syntax_highlight.pb.go | 255 ++++++++++++++++++ .../v1beta1/syntax_highlight_grpc.pb.go | 101 +++++++ 4 files changed, 383 insertions(+) create mode 100644 build/stack/syntax_highlight/v1beta1/BUILD.bazel create mode 100644 build/stack/syntax_highlight/v1beta1/syntax_highlight.pb.go create mode 100644 build/stack/syntax_highlight/v1beta1/syntax_highlight_grpc.pb.go diff --git a/Makefile b/Makefile index bf6a048..bc06747 100644 --- a/Makefile +++ b/Makefile @@ -21,3 +21,4 @@ update: $(BAZEL) run //build/stack/protobuf/compiler/v1alpha1:v1alpha1_go_compiled_sources.update $(BAZEL) run //build/stack/protobuf/package/v1alpha1:v1alpha1_go_compiled_sources.update $(BAZEL) run //build/stack/protobuf/package/v1alpha2:v1alpha2_go_compiled_sources.update + $(BAZEL) run //build/stack/syntax_highlight/v1beta1:syntax_highlight_go_compiled_sources.update \ No newline at end of file diff --git a/build/stack/syntax_highlight/v1beta1/BUILD.bazel b/build/stack/syntax_highlight/v1beta1/BUILD.bazel new file mode 100644 index 0000000..321ce4d --- /dev/null +++ b/build/stack/syntax_highlight/v1beta1/BUILD.bazel @@ -0,0 +1,26 @@ +load("@rules_proto//proto:defs.bzl", "proto_library") +load("@build_stack_rules_proto//rules:proto_compiled_sources.bzl", "proto_compiled_sources") + +proto_library( + name = "syntax_highlight_proto", + srcs = ["syntax_highlight.proto"], + visibility = ["//visibility:public"], +) + +proto_compiled_sources( + name = "syntax_highlight_go_compiled_sources", + srcs = [ + "syntax_highlight.pb.go", + "syntax_highlight_grpc.pb.go", + ], + output_mappings = [ + "syntax_highlight.pb.go=github.com/stackb/bezel/proto/syntax_highlight/syntax_highlight.pb.go", + "syntax_highlight_grpc.pb.go=github.com/stackb/bezel/proto/syntax_highlight/syntax_highlight_grpc.pb.go", + ], + plugins = [ + "@build_stack_rules_proto//plugin/golang/protobuf:protoc-gen-go", + "@build_stack_rules_proto//plugin/grpc/grpc-go:protoc-gen-go-grpc", + ], + proto = "syntax_highlight_proto", + visibility = ["//visibility:public"], +) diff --git a/build/stack/syntax_highlight/v1beta1/syntax_highlight.pb.go b/build/stack/syntax_highlight/v1beta1/syntax_highlight.pb.go new file mode 100644 index 0000000..7bc9701 --- /dev/null +++ b/build/stack/syntax_highlight/v1beta1/syntax_highlight.pb.go @@ -0,0 +1,255 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.30.0 +// protoc v3.14.0 +// source: build/stack/syntax_highlight/v1beta1/syntax_highlight.proto + +package syntax_highlight + +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 SyntaxHighlightRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Filename string `protobuf:"bytes,1,opt,name=filename,proto3" json:"filename,omitempty"` + Language string `protobuf:"bytes,2,opt,name=language,proto3" json:"language,omitempty"` + Style string `protobuf:"bytes,3,opt,name=style,proto3" json:"style,omitempty"` + Input []byte `protobuf:"bytes,4,opt,name=input,proto3" json:"input,omitempty"` +} + +func (x *SyntaxHighlightRequest) Reset() { + *x = SyntaxHighlightRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_build_stack_syntax_highlight_v1beta1_syntax_highlight_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SyntaxHighlightRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SyntaxHighlightRequest) ProtoMessage() {} + +func (x *SyntaxHighlightRequest) ProtoReflect() protoreflect.Message { + mi := &file_build_stack_syntax_highlight_v1beta1_syntax_highlight_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 SyntaxHighlightRequest.ProtoReflect.Descriptor instead. +func (*SyntaxHighlightRequest) Descriptor() ([]byte, []int) { + return file_build_stack_syntax_highlight_v1beta1_syntax_highlight_proto_rawDescGZIP(), []int{0} +} + +func (x *SyntaxHighlightRequest) GetFilename() string { + if x != nil { + return x.Filename + } + return "" +} + +func (x *SyntaxHighlightRequest) GetLanguage() string { + if x != nil { + return x.Language + } + return "" +} + +func (x *SyntaxHighlightRequest) GetStyle() string { + if x != nil { + return x.Style + } + return "" +} + +func (x *SyntaxHighlightRequest) GetInput() []byte { + if x != nil { + return x.Input + } + return nil +} + +type SyntaxHighlightResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Output []byte `protobuf:"bytes,1,opt,name=output,proto3" json:"output,omitempty"` +} + +func (x *SyntaxHighlightResponse) Reset() { + *x = SyntaxHighlightResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_build_stack_syntax_highlight_v1beta1_syntax_highlight_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SyntaxHighlightResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SyntaxHighlightResponse) ProtoMessage() {} + +func (x *SyntaxHighlightResponse) ProtoReflect() protoreflect.Message { + mi := &file_build_stack_syntax_highlight_v1beta1_syntax_highlight_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 SyntaxHighlightResponse.ProtoReflect.Descriptor instead. +func (*SyntaxHighlightResponse) Descriptor() ([]byte, []int) { + return file_build_stack_syntax_highlight_v1beta1_syntax_highlight_proto_rawDescGZIP(), []int{1} +} + +func (x *SyntaxHighlightResponse) GetOutput() []byte { + if x != nil { + return x.Output + } + return nil +} + +var File_build_stack_syntax_highlight_v1beta1_syntax_highlight_proto protoreflect.FileDescriptor + +var file_build_stack_syntax_highlight_v1beta1_syntax_highlight_proto_rawDesc = []byte{ + 0x0a, 0x3b, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x2f, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2f, 0x73, 0x79, + 0x6e, 0x74, 0x61, 0x78, 0x5f, 0x68, 0x69, 0x67, 0x68, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x2f, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x73, 0x79, 0x6e, 0x74, 0x61, 0x78, 0x5f, 0x68, 0x69, + 0x67, 0x68, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x24, 0x62, + 0x75, 0x69, 0x6c, 0x64, 0x2e, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x73, 0x79, 0x6e, 0x74, 0x61, + 0x78, 0x5f, 0x68, 0x69, 0x67, 0x68, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x22, 0x7c, 0x0a, 0x16, 0x53, 0x79, 0x6e, 0x74, 0x61, 0x78, 0x48, 0x69, 0x67, + 0x68, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, + 0x08, 0x66, 0x69, 0x6c, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x08, 0x66, 0x69, 0x6c, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x6c, 0x61, 0x6e, + 0x67, 0x75, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6c, 0x61, 0x6e, + 0x67, 0x75, 0x61, 0x67, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x79, 0x6c, 0x65, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x74, 0x79, 0x6c, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x69, + 0x6e, 0x70, 0x75, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x69, 0x6e, 0x70, 0x75, + 0x74, 0x22, 0x31, 0x0a, 0x17, 0x53, 0x79, 0x6e, 0x74, 0x61, 0x78, 0x48, 0x69, 0x67, 0x68, 0x6c, + 0x69, 0x67, 0x68, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, + 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x6f, 0x75, + 0x74, 0x70, 0x75, 0x74, 0x32, 0xa4, 0x01, 0x0a, 0x11, 0x53, 0x79, 0x6e, 0x74, 0x61, 0x78, 0x48, + 0x69, 0x67, 0x68, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x65, 0x72, 0x12, 0x8e, 0x01, 0x0a, 0x0f, 0x53, + 0x79, 0x6e, 0x74, 0x61, 0x78, 0x48, 0x69, 0x67, 0x68, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x12, 0x3c, + 0x2e, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x2e, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x73, 0x79, 0x6e, + 0x74, 0x61, 0x78, 0x5f, 0x68, 0x69, 0x67, 0x68, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x2e, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x53, 0x79, 0x6e, 0x74, 0x61, 0x78, 0x48, 0x69, 0x67, 0x68, + 0x6c, 0x69, 0x67, 0x68, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x3d, 0x2e, 0x62, + 0x75, 0x69, 0x6c, 0x64, 0x2e, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x73, 0x79, 0x6e, 0x74, 0x61, + 0x78, 0x5f, 0x68, 0x69, 0x67, 0x68, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x2e, 0x53, 0x79, 0x6e, 0x74, 0x61, 0x78, 0x48, 0x69, 0x67, 0x68, 0x6c, 0x69, + 0x67, 0x68, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x41, 0x5a, 0x3f, 0x67, + 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x62, + 0x2f, 0x62, 0x65, 0x7a, 0x65, 0x6c, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x73, 0x79, 0x6e, + 0x74, 0x61, 0x78, 0x5f, 0x68, 0x69, 0x67, 0x68, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x3b, 0x73, 0x79, + 0x6e, 0x74, 0x61, 0x78, 0x5f, 0x68, 0x69, 0x67, 0x68, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_build_stack_syntax_highlight_v1beta1_syntax_highlight_proto_rawDescOnce sync.Once + file_build_stack_syntax_highlight_v1beta1_syntax_highlight_proto_rawDescData = file_build_stack_syntax_highlight_v1beta1_syntax_highlight_proto_rawDesc +) + +func file_build_stack_syntax_highlight_v1beta1_syntax_highlight_proto_rawDescGZIP() []byte { + file_build_stack_syntax_highlight_v1beta1_syntax_highlight_proto_rawDescOnce.Do(func() { + file_build_stack_syntax_highlight_v1beta1_syntax_highlight_proto_rawDescData = protoimpl.X.CompressGZIP(file_build_stack_syntax_highlight_v1beta1_syntax_highlight_proto_rawDescData) + }) + return file_build_stack_syntax_highlight_v1beta1_syntax_highlight_proto_rawDescData +} + +var file_build_stack_syntax_highlight_v1beta1_syntax_highlight_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_build_stack_syntax_highlight_v1beta1_syntax_highlight_proto_goTypes = []interface{}{ + (*SyntaxHighlightRequest)(nil), // 0: build.stack.syntax_highlight.v1beta1.SyntaxHighlightRequest + (*SyntaxHighlightResponse)(nil), // 1: build.stack.syntax_highlight.v1beta1.SyntaxHighlightResponse +} +var file_build_stack_syntax_highlight_v1beta1_syntax_highlight_proto_depIdxs = []int32{ + 0, // 0: build.stack.syntax_highlight.v1beta1.SyntaxHighlighter.SyntaxHighlight:input_type -> build.stack.syntax_highlight.v1beta1.SyntaxHighlightRequest + 1, // 1: build.stack.syntax_highlight.v1beta1.SyntaxHighlighter.SyntaxHighlight:output_type -> build.stack.syntax_highlight.v1beta1.SyntaxHighlightResponse + 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_build_stack_syntax_highlight_v1beta1_syntax_highlight_proto_init() } +func file_build_stack_syntax_highlight_v1beta1_syntax_highlight_proto_init() { + if File_build_stack_syntax_highlight_v1beta1_syntax_highlight_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_build_stack_syntax_highlight_v1beta1_syntax_highlight_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SyntaxHighlightRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_build_stack_syntax_highlight_v1beta1_syntax_highlight_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SyntaxHighlightResponse); 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_build_stack_syntax_highlight_v1beta1_syntax_highlight_proto_rawDesc, + NumEnums: 0, + NumMessages: 2, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_build_stack_syntax_highlight_v1beta1_syntax_highlight_proto_goTypes, + DependencyIndexes: file_build_stack_syntax_highlight_v1beta1_syntax_highlight_proto_depIdxs, + MessageInfos: file_build_stack_syntax_highlight_v1beta1_syntax_highlight_proto_msgTypes, + }.Build() + File_build_stack_syntax_highlight_v1beta1_syntax_highlight_proto = out.File + file_build_stack_syntax_highlight_v1beta1_syntax_highlight_proto_rawDesc = nil + file_build_stack_syntax_highlight_v1beta1_syntax_highlight_proto_goTypes = nil + file_build_stack_syntax_highlight_v1beta1_syntax_highlight_proto_depIdxs = nil +} diff --git a/build/stack/syntax_highlight/v1beta1/syntax_highlight_grpc.pb.go b/build/stack/syntax_highlight/v1beta1/syntax_highlight_grpc.pb.go new file mode 100644 index 0000000..941e0df --- /dev/null +++ b/build/stack/syntax_highlight/v1beta1/syntax_highlight_grpc.pb.go @@ -0,0 +1,101 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. + +package syntax_highlight + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +// SyntaxHighlighterClient is the client API for SyntaxHighlighter service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type SyntaxHighlighterClient interface { + SyntaxHighlight(ctx context.Context, in *SyntaxHighlightRequest, opts ...grpc.CallOption) (*SyntaxHighlightResponse, error) +} + +type syntaxHighlighterClient struct { + cc grpc.ClientConnInterface +} + +func NewSyntaxHighlighterClient(cc grpc.ClientConnInterface) SyntaxHighlighterClient { + return &syntaxHighlighterClient{cc} +} + +func (c *syntaxHighlighterClient) SyntaxHighlight(ctx context.Context, in *SyntaxHighlightRequest, opts ...grpc.CallOption) (*SyntaxHighlightResponse, error) { + out := new(SyntaxHighlightResponse) + err := c.cc.Invoke(ctx, "/build.stack.syntax_highlight.v1beta1.SyntaxHighlighter/SyntaxHighlight", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// SyntaxHighlighterServer is the server API for SyntaxHighlighter service. +// All implementations must embed UnimplementedSyntaxHighlighterServer +// for forward compatibility +type SyntaxHighlighterServer interface { + SyntaxHighlight(context.Context, *SyntaxHighlightRequest) (*SyntaxHighlightResponse, error) + mustEmbedUnimplementedSyntaxHighlighterServer() +} + +// UnimplementedSyntaxHighlighterServer must be embedded to have forward compatible implementations. +type UnimplementedSyntaxHighlighterServer struct { +} + +func (UnimplementedSyntaxHighlighterServer) SyntaxHighlight(context.Context, *SyntaxHighlightRequest) (*SyntaxHighlightResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method SyntaxHighlight not implemented") +} +func (UnimplementedSyntaxHighlighterServer) mustEmbedUnimplementedSyntaxHighlighterServer() {} + +// UnsafeSyntaxHighlighterServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to SyntaxHighlighterServer will +// result in compilation errors. +type UnsafeSyntaxHighlighterServer interface { + mustEmbedUnimplementedSyntaxHighlighterServer() +} + +func RegisterSyntaxHighlighterServer(s grpc.ServiceRegistrar, srv SyntaxHighlighterServer) { + s.RegisterService(&SyntaxHighlighter_ServiceDesc, srv) +} + +func _SyntaxHighlighter_SyntaxHighlight_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SyntaxHighlightRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SyntaxHighlighterServer).SyntaxHighlight(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/build.stack.syntax_highlight.v1beta1.SyntaxHighlighter/SyntaxHighlight", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SyntaxHighlighterServer).SyntaxHighlight(ctx, req.(*SyntaxHighlightRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// SyntaxHighlighter_ServiceDesc is the grpc.ServiceDesc for SyntaxHighlighter service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var SyntaxHighlighter_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "build.stack.syntax_highlight.v1beta1.SyntaxHighlighter", + HandlerType: (*SyntaxHighlighterServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "SyntaxHighlight", + Handler: _SyntaxHighlighter_SyntaxHighlight_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "build/stack/syntax_highlight/v1beta1/syntax_highlight.proto", +}