serviceInterfacesSubmodule

This commit is contained in:
Michael McGuinness
2024-12-23 14:58:50 +00:00
parent dd7b3ef2fd
commit ce5e566c9e
7 changed files with 1023 additions and 115 deletions
+3
View File
@@ -0,0 +1,3 @@
[submodule "api/serviceInterfaces"]
path = api/serviceInterfaces
url = https://bitbucket.org/aarete/service-interfaces.git
+2 -2
View File
@@ -7,11 +7,11 @@ includes:
taskfile: scripts/Taskfile.yml
flatten: true
vars:
PROJECT_NAME: GoTemplate
PROJECT_NAME: QueryOrchestration
COVERAGE_FILE: coverage.out
COVERAGE_THRESHOLD: 80
PROJECT_MAIN: cmd/grpc/main.go
PROTOBUF_DIR: api/grpc/protobuf
PROTOBUF_DIR: api/serviceInterfaces/queryOrchestration
API_GRPC_DIR: api/grpc
IMAGE_NAME: gotemplate
DOCKERFILE_DIR: build/package
-14
View File
@@ -1,14 +0,0 @@
syntax = "proto3";
package gotemplate;
option go_package = "./spec";
service Name {
rpc Add(NameMessage) returns (NameMessage);
rpc Get(NameMessage) returns (NameMessage);
}
message NameMessage {
string name = 1;
}
+532 -41
View File
@@ -1,12 +1,13 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.35.2
// protoc-gen-go v1.36.0
// protoc v3.12.4
// source: main.proto
package spec
import (
empty "github.com/golang/protobuf/ptypes/empty"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
@@ -20,28 +21,26 @@ const (
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
type NameMessage struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
type QueryTestRequest struct {
state protoimpl.MessageState `protogen:"open.v1"`
unknownFields protoimpl.UnknownFields
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
sizeCache protoimpl.SizeCache
}
func (x *NameMessage) Reset() {
*x = NameMessage{}
func (x *QueryTestRequest) Reset() {
*x = QueryTestRequest{}
mi := &file_main_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *NameMessage) String() string {
func (x *QueryTestRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*NameMessage) ProtoMessage() {}
func (*QueryTestRequest) ProtoMessage() {}
func (x *NameMessage) ProtoReflect() protoreflect.Message {
func (x *QueryTestRequest) ProtoReflect() protoreflect.Message {
mi := &file_main_proto_msgTypes[0]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@@ -53,14 +52,419 @@ func (x *NameMessage) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x)
}
// Deprecated: Use NameMessage.ProtoReflect.Descriptor instead.
func (*NameMessage) Descriptor() ([]byte, []int) {
// Deprecated: Use QueryTestRequest.ProtoReflect.Descriptor instead.
func (*QueryTestRequest) Descriptor() ([]byte, []int) {
return file_main_proto_rawDescGZIP(), []int{0}
}
func (x *NameMessage) GetName() string {
type QueryTestResponse struct {
state protoimpl.MessageState `protogen:"open.v1"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *QueryTestResponse) Reset() {
*x = QueryTestResponse{}
mi := &file_main_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *QueryTestResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*QueryTestResponse) ProtoMessage() {}
func (x *QueryTestResponse) ProtoReflect() protoreflect.Message {
mi := &file_main_proto_msgTypes[1]
if x != nil {
return x.Name
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use QueryTestResponse.ProtoReflect.Descriptor instead.
func (*QueryTestResponse) Descriptor() ([]byte, []int) {
return file_main_proto_rawDescGZIP(), []int{1}
}
type Query struct {
state protoimpl.MessageState `protogen:"open.v1"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *Query) Reset() {
*x = Query{}
mi := &file_main_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *Query) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Query) ProtoMessage() {}
func (x *Query) ProtoReflect() protoreflect.Message {
mi := &file_main_proto_msgTypes[2]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Query.ProtoReflect.Descriptor instead.
func (*Query) Descriptor() ([]byte, []int) {
return file_main_proto_rawDescGZIP(), []int{2}
}
type QueryFilter struct {
state protoimpl.MessageState `protogen:"open.v1"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *QueryFilter) Reset() {
*x = QueryFilter{}
mi := &file_main_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *QueryFilter) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*QueryFilter) ProtoMessage() {}
func (x *QueryFilter) ProtoReflect() protoreflect.Message {
mi := &file_main_proto_msgTypes[3]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use QueryFilter.ProtoReflect.Descriptor instead.
func (*QueryFilter) Descriptor() ([]byte, []int) {
return file_main_proto_rawDescGZIP(), []int{3}
}
type QueryCreate struct {
state protoimpl.MessageState `protogen:"open.v1"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *QueryCreate) Reset() {
*x = QueryCreate{}
mi := &file_main_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *QueryCreate) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*QueryCreate) ProtoMessage() {}
func (x *QueryCreate) ProtoReflect() protoreflect.Message {
mi := &file_main_proto_msgTypes[4]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use QueryCreate.ProtoReflect.Descriptor instead.
func (*QueryCreate) Descriptor() ([]byte, []int) {
return file_main_proto_rawDescGZIP(), []int{4}
}
type QueryUpdate struct {
state protoimpl.MessageState `protogen:"open.v1"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *QueryUpdate) Reset() {
*x = QueryUpdate{}
mi := &file_main_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *QueryUpdate) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*QueryUpdate) ProtoMessage() {}
func (x *QueryUpdate) ProtoReflect() protoreflect.Message {
mi := &file_main_proto_msgTypes[5]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use QueryUpdate.ProtoReflect.Descriptor instead.
func (*QueryUpdate) Descriptor() ([]byte, []int) {
return file_main_proto_rawDescGZIP(), []int{5}
}
type Queries struct {
state protoimpl.MessageState `protogen:"open.v1"`
Queries []*Query `protobuf:"bytes,1,rep,name=queries,proto3" json:"queries,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *Queries) Reset() {
*x = Queries{}
mi := &file_main_proto_msgTypes[6]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *Queries) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Queries) ProtoMessage() {}
func (x *Queries) ProtoReflect() protoreflect.Message {
mi := &file_main_proto_msgTypes[6]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Queries.ProtoReflect.Descriptor instead.
func (*Queries) Descriptor() ([]byte, []int) {
return file_main_proto_rawDescGZIP(), []int{6}
}
func (x *Queries) GetQueries() []*Query {
if x != nil {
return x.Queries
}
return nil
}
type JobCollector struct {
state protoimpl.MessageState `protogen:"open.v1"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *JobCollector) Reset() {
*x = JobCollector{}
mi := &file_main_proto_msgTypes[7]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *JobCollector) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*JobCollector) ProtoMessage() {}
func (x *JobCollector) ProtoReflect() protoreflect.Message {
mi := &file_main_proto_msgTypes[7]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use JobCollector.ProtoReflect.Descriptor instead.
func (*JobCollector) Descriptor() ([]byte, []int) {
return file_main_proto_rawDescGZIP(), []int{7}
}
type JobCollectorCreate struct {
state protoimpl.MessageState `protogen:"open.v1"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *JobCollectorCreate) Reset() {
*x = JobCollectorCreate{}
mi := &file_main_proto_msgTypes[8]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *JobCollectorCreate) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*JobCollectorCreate) ProtoMessage() {}
func (x *JobCollectorCreate) ProtoReflect() protoreflect.Message {
mi := &file_main_proto_msgTypes[8]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use JobCollectorCreate.ProtoReflect.Descriptor instead.
func (*JobCollectorCreate) Descriptor() ([]byte, []int) {
return file_main_proto_rawDescGZIP(), []int{8}
}
type JobCollectorUpdate struct {
state protoimpl.MessageState `protogen:"open.v1"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *JobCollectorUpdate) Reset() {
*x = JobCollectorUpdate{}
mi := &file_main_proto_msgTypes[9]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *JobCollectorUpdate) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*JobCollectorUpdate) ProtoMessage() {}
func (x *JobCollectorUpdate) ProtoReflect() protoreflect.Message {
mi := &file_main_proto_msgTypes[9]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use JobCollectorUpdate.ProtoReflect.Descriptor instead.
func (*JobCollectorUpdate) Descriptor() ([]byte, []int) {
return file_main_proto_rawDescGZIP(), []int{9}
}
type ExportTrigger struct {
state protoimpl.MessageState `protogen:"open.v1"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *ExportTrigger) Reset() {
*x = ExportTrigger{}
mi := &file_main_proto_msgTypes[10]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *ExportTrigger) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ExportTrigger) ProtoMessage() {}
func (x *ExportTrigger) ProtoReflect() protoreflect.Message {
mi := &file_main_proto_msgTypes[10]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ExportTrigger.ProtoReflect.Descriptor instead.
func (*ExportTrigger) Descriptor() ([]byte, []int) {
return file_main_proto_rawDescGZIP(), []int{10}
}
type IdMessage struct {
state protoimpl.MessageState `protogen:"open.v1"`
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *IdMessage) Reset() {
*x = IdMessage{}
mi := &file_main_proto_msgTypes[11]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *IdMessage) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*IdMessage) ProtoMessage() {}
func (x *IdMessage) ProtoReflect() protoreflect.Message {
mi := &file_main_proto_msgTypes[11]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use IdMessage.ProtoReflect.Descriptor instead.
func (*IdMessage) Descriptor() ([]byte, []int) {
return file_main_proto_rawDescGZIP(), []int{11}
}
func (x *IdMessage) GetId() string {
if x != nil {
return x.Id
}
return ""
}
@@ -68,19 +472,77 @@ func (x *NameMessage) GetName() string {
var File_main_proto protoreflect.FileDescriptor
var file_main_proto_rawDesc = []byte{
0x0a, 0x0a, 0x6d, 0x61, 0x69, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0a, 0x67, 0x6f,
0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x22, 0x21, 0x0a, 0x0b, 0x4e, 0x61, 0x6d, 0x65,
0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18,
0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x32, 0x78, 0x0a, 0x04, 0x4e,
0x61, 0x6d, 0x65, 0x12, 0x37, 0x0a, 0x03, 0x41, 0x64, 0x64, 0x12, 0x17, 0x2e, 0x67, 0x6f, 0x74,
0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x4d, 0x65, 0x73, 0x73,
0x61, 0x67, 0x65, 0x1a, 0x17, 0x2e, 0x67, 0x6f, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65,
0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x37, 0x0a, 0x03,
0x47, 0x65, 0x74, 0x12, 0x17, 0x2e, 0x67, 0x6f, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65,
0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x1a, 0x17, 0x2e, 0x67,
0x6f, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x4d, 0x65,
0x73, 0x73, 0x61, 0x67, 0x65, 0x42, 0x08, 0x5a, 0x06, 0x2e, 0x2f, 0x73, 0x70, 0x65, 0x63, 0x62,
0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
0x0a, 0x0a, 0x6d, 0x61, 0x69, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x12, 0x71, 0x75,
0x65, 0x72, 0x79, 0x6f, 0x72, 0x63, 0x68, 0x65, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e,
0x1a, 0x1b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75,
0x66, 0x2f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x12, 0x0a,
0x10, 0x51, 0x75, 0x65, 0x72, 0x79, 0x54, 0x65, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
0x74, 0x22, 0x13, 0x0a, 0x11, 0x51, 0x75, 0x65, 0x72, 0x79, 0x54, 0x65, 0x73, 0x74, 0x52, 0x65,
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x07, 0x0a, 0x05, 0x51, 0x75, 0x65, 0x72, 0x79, 0x22,
0x0d, 0x0a, 0x0b, 0x51, 0x75, 0x65, 0x72, 0x79, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x22, 0x0d,
0x0a, 0x0b, 0x51, 0x75, 0x65, 0x72, 0x79, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x22, 0x0d, 0x0a,
0x0b, 0x51, 0x75, 0x65, 0x72, 0x79, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x22, 0x3e, 0x0a, 0x07,
0x51, 0x75, 0x65, 0x72, 0x69, 0x65, 0x73, 0x12, 0x33, 0x0a, 0x07, 0x71, 0x75, 0x65, 0x72, 0x69,
0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79,
0x6f, 0x72, 0x63, 0x68, 0x65, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x51, 0x75,
0x65, 0x72, 0x79, 0x52, 0x07, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x73, 0x22, 0x0e, 0x0a, 0x0c,
0x4a, 0x6f, 0x62, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x22, 0x14, 0x0a, 0x12,
0x4a, 0x6f, 0x62, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x43, 0x72, 0x65, 0x61,
0x74, 0x65, 0x22, 0x14, 0x0a, 0x12, 0x4a, 0x6f, 0x62, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74,
0x6f, 0x72, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x22, 0x0f, 0x0a, 0x0d, 0x45, 0x78, 0x70, 0x6f,
0x72, 0x74, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x22, 0x1b, 0x0a, 0x09, 0x49, 0x64, 0x4d,
0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01,
0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x32, 0xb8, 0x03, 0x0a, 0x0c, 0x51, 0x75, 0x65, 0x72, 0x79,
0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x44, 0x0a, 0x04, 0x4c, 0x69, 0x73, 0x74, 0x12,
0x1f, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x6f, 0x72, 0x63, 0x68, 0x65, 0x73, 0x74, 0x72, 0x61,
0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72,
0x1a, 0x1b, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x6f, 0x72, 0x63, 0x68, 0x65, 0x73, 0x74, 0x72,
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x69, 0x65, 0x73, 0x12, 0x3f, 0x0a,
0x03, 0x47, 0x65, 0x74, 0x12, 0x1d, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x6f, 0x72, 0x63, 0x68,
0x65, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x49, 0x64, 0x4d, 0x65, 0x73, 0x73,
0x61, 0x67, 0x65, 0x1a, 0x19, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x6f, 0x72, 0x63, 0x68, 0x65,
0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x48,
0x0a, 0x06, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x12, 0x1f, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79,
0x6f, 0x72, 0x63, 0x68, 0x65, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x51, 0x75,
0x65, 0x72, 0x79, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x1a, 0x1d, 0x2e, 0x71, 0x75, 0x65, 0x72,
0x79, 0x6f, 0x72, 0x63, 0x68, 0x65, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x49,
0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x41, 0x0a, 0x06, 0x55, 0x70, 0x64, 0x61,
0x74, 0x65, 0x12, 0x1f, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x6f, 0x72, 0x63, 0x68, 0x65, 0x73,
0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x55, 0x70, 0x64,
0x61, 0x74, 0x65, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x3f, 0x0a, 0x06, 0x52,
0x65, 0x6d, 0x6f, 0x76, 0x65, 0x12, 0x1d, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x6f, 0x72, 0x63,
0x68, 0x65, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x49, 0x64, 0x4d, 0x65, 0x73,
0x73, 0x61, 0x67, 0x65, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x53, 0x0a, 0x04,
0x54, 0x65, 0x73, 0x74, 0x12, 0x24, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x6f, 0x72, 0x63, 0x68,
0x65, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x54,
0x65, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x71, 0x75, 0x65,
0x72, 0x79, 0x6f, 0x72, 0x63, 0x68, 0x65, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e,
0x51, 0x75, 0x65, 0x72, 0x79, 0x54, 0x65, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
0x65, 0x32, 0xf8, 0x01, 0x0a, 0x13, 0x4a, 0x6f, 0x62, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74,
0x6f, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x4f, 0x0a, 0x06, 0x43, 0x72, 0x65,
0x61, 0x74, 0x65, 0x12, 0x26, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x6f, 0x72, 0x63, 0x68, 0x65,
0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4a, 0x6f, 0x62, 0x43, 0x6f, 0x6c, 0x6c,
0x65, 0x63, 0x74, 0x6f, 0x72, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x1a, 0x1d, 0x2e, 0x71, 0x75,
0x65, 0x72, 0x79, 0x6f, 0x72, 0x63, 0x68, 0x65, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e,
0x2e, 0x49, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x48, 0x0a, 0x06, 0x55, 0x70,
0x64, 0x61, 0x74, 0x65, 0x12, 0x26, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x6f, 0x72, 0x63, 0x68,
0x65, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4a, 0x6f, 0x62, 0x43, 0x6f, 0x6c,
0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x1a, 0x16, 0x2e, 0x67,
0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45,
0x6d, 0x70, 0x74, 0x79, 0x12, 0x46, 0x0a, 0x03, 0x47, 0x65, 0x74, 0x12, 0x1d, 0x2e, 0x71, 0x75,
0x65, 0x72, 0x79, 0x6f, 0x72, 0x63, 0x68, 0x65, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e,
0x2e, 0x49, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x1a, 0x20, 0x2e, 0x71, 0x75, 0x65,
0x72, 0x79, 0x6f, 0x72, 0x63, 0x68, 0x65, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e,
0x4a, 0x6f, 0x62, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x32, 0x5c, 0x0a, 0x0d,
0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x4b, 0x0a,
0x07, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x12, 0x21, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79,
0x6f, 0x72, 0x63, 0x68, 0x65, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x45, 0x78,
0x70, 0x6f, 0x72, 0x74, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x1a, 0x1d, 0x2e, 0x71, 0x75,
0x65, 0x72, 0x79, 0x6f, 0x72, 0x63, 0x68, 0x65, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e,
0x2e, 0x49, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x42, 0x08, 0x5a, 0x06, 0x2e, 0x2f,
0x73, 0x70, 0x65, 0x63, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
@@ -95,20 +557,49 @@ func file_main_proto_rawDescGZIP() []byte {
return file_main_proto_rawDescData
}
var file_main_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
var file_main_proto_msgTypes = make([]protoimpl.MessageInfo, 12)
var file_main_proto_goTypes = []any{
(*NameMessage)(nil), // 0: gotemplate.NameMessage
(*QueryTestRequest)(nil), // 0: queryorchestration.QueryTestRequest
(*QueryTestResponse)(nil), // 1: queryorchestration.QueryTestResponse
(*Query)(nil), // 2: queryorchestration.Query
(*QueryFilter)(nil), // 3: queryorchestration.QueryFilter
(*QueryCreate)(nil), // 4: queryorchestration.QueryCreate
(*QueryUpdate)(nil), // 5: queryorchestration.QueryUpdate
(*Queries)(nil), // 6: queryorchestration.Queries
(*JobCollector)(nil), // 7: queryorchestration.JobCollector
(*JobCollectorCreate)(nil), // 8: queryorchestration.JobCollectorCreate
(*JobCollectorUpdate)(nil), // 9: queryorchestration.JobCollectorUpdate
(*ExportTrigger)(nil), // 10: queryorchestration.ExportTrigger
(*IdMessage)(nil), // 11: queryorchestration.IdMessage
(*empty.Empty)(nil), // 12: google.protobuf.Empty
}
var file_main_proto_depIdxs = []int32{
0, // 0: gotemplate.Name.Add:input_type -> gotemplate.NameMessage
0, // 1: gotemplate.Name.Get:input_type -> gotemplate.NameMessage
0, // 2: gotemplate.Name.Add:output_type -> gotemplate.NameMessage
0, // 3: gotemplate.Name.Get:output_type -> gotemplate.NameMessage
2, // [2:4] is the sub-list for method output_type
0, // [0:2] 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
2, // 0: queryorchestration.Queries.queries:type_name -> queryorchestration.Query
3, // 1: queryorchestration.QueryService.List:input_type -> queryorchestration.QueryFilter
11, // 2: queryorchestration.QueryService.Get:input_type -> queryorchestration.IdMessage
4, // 3: queryorchestration.QueryService.Create:input_type -> queryorchestration.QueryCreate
5, // 4: queryorchestration.QueryService.Update:input_type -> queryorchestration.QueryUpdate
11, // 5: queryorchestration.QueryService.Remove:input_type -> queryorchestration.IdMessage
0, // 6: queryorchestration.QueryService.Test:input_type -> queryorchestration.QueryTestRequest
8, // 7: queryorchestration.JobCollectorService.Create:input_type -> queryorchestration.JobCollectorCreate
9, // 8: queryorchestration.JobCollectorService.Update:input_type -> queryorchestration.JobCollectorUpdate
11, // 9: queryorchestration.JobCollectorService.Get:input_type -> queryorchestration.IdMessage
10, // 10: queryorchestration.ExportService.Trigger:input_type -> queryorchestration.ExportTrigger
6, // 11: queryorchestration.QueryService.List:output_type -> queryorchestration.Queries
2, // 12: queryorchestration.QueryService.Get:output_type -> queryorchestration.Query
11, // 13: queryorchestration.QueryService.Create:output_type -> queryorchestration.IdMessage
12, // 14: queryorchestration.QueryService.Update:output_type -> google.protobuf.Empty
12, // 15: queryorchestration.QueryService.Remove:output_type -> google.protobuf.Empty
1, // 16: queryorchestration.QueryService.Test:output_type -> queryorchestration.QueryTestResponse
11, // 17: queryorchestration.JobCollectorService.Create:output_type -> queryorchestration.IdMessage
12, // 18: queryorchestration.JobCollectorService.Update:output_type -> google.protobuf.Empty
7, // 19: queryorchestration.JobCollectorService.Get:output_type -> queryorchestration.JobCollector
11, // 20: queryorchestration.ExportService.Trigger:output_type -> queryorchestration.IdMessage
11, // [11:21] is the sub-list for method output_type
1, // [1:11] is the sub-list for method input_type
1, // [1:1] is the sub-list for extension type_name
1, // [1:1] is the sub-list for extension extendee
0, // [0:1] is the sub-list for field type_name
}
func init() { file_main_proto_init() }
@@ -122,9 +613,9 @@ func file_main_proto_init() {
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_main_proto_rawDesc,
NumEnums: 0,
NumMessages: 1,
NumMessages: 12,
NumExtensions: 0,
NumServices: 1,
NumServices: 3,
},
GoTypes: file_main_proto_goTypes,
DependencyIndexes: file_main_proto_depIdxs,
+485 -52
View File
@@ -8,6 +8,7 @@ package spec
import (
context "context"
empty "github.com/golang/protobuf/ptypes/empty"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
@@ -19,139 +20,571 @@ import (
const _ = grpc.SupportPackageIsVersion9
const (
Name_Add_FullMethodName = "/gotemplate.Name/Add"
Name_Get_FullMethodName = "/gotemplate.Name/Get"
QueryService_List_FullMethodName = "/queryorchestration.QueryService/List"
QueryService_Get_FullMethodName = "/queryorchestration.QueryService/Get"
QueryService_Create_FullMethodName = "/queryorchestration.QueryService/Create"
QueryService_Update_FullMethodName = "/queryorchestration.QueryService/Update"
QueryService_Remove_FullMethodName = "/queryorchestration.QueryService/Remove"
QueryService_Test_FullMethodName = "/queryorchestration.QueryService/Test"
)
// NameClient is the client API for Name service.
// QueryServiceClient is the client API for QueryService 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 NameClient interface {
Add(ctx context.Context, in *NameMessage, opts ...grpc.CallOption) (*NameMessage, error)
Get(ctx context.Context, in *NameMessage, opts ...grpc.CallOption) (*NameMessage, error)
type QueryServiceClient interface {
List(ctx context.Context, in *QueryFilter, opts ...grpc.CallOption) (*Queries, error)
Get(ctx context.Context, in *IdMessage, opts ...grpc.CallOption) (*Query, error)
Create(ctx context.Context, in *QueryCreate, opts ...grpc.CallOption) (*IdMessage, error)
Update(ctx context.Context, in *QueryUpdate, opts ...grpc.CallOption) (*empty.Empty, error)
Remove(ctx context.Context, in *IdMessage, opts ...grpc.CallOption) (*empty.Empty, error)
Test(ctx context.Context, in *QueryTestRequest, opts ...grpc.CallOption) (*QueryTestResponse, error)
}
type nameClient struct {
type queryServiceClient struct {
cc grpc.ClientConnInterface
}
func NewNameClient(cc grpc.ClientConnInterface) NameClient {
return &nameClient{cc}
func NewQueryServiceClient(cc grpc.ClientConnInterface) QueryServiceClient {
return &queryServiceClient{cc}
}
func (c *nameClient) Add(ctx context.Context, in *NameMessage, opts ...grpc.CallOption) (*NameMessage, error) {
func (c *queryServiceClient) List(ctx context.Context, in *QueryFilter, opts ...grpc.CallOption) (*Queries, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(NameMessage)
err := c.cc.Invoke(ctx, Name_Add_FullMethodName, in, out, cOpts...)
out := new(Queries)
err := c.cc.Invoke(ctx, QueryService_List_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *nameClient) Get(ctx context.Context, in *NameMessage, opts ...grpc.CallOption) (*NameMessage, error) {
func (c *queryServiceClient) Get(ctx context.Context, in *IdMessage, opts ...grpc.CallOption) (*Query, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(NameMessage)
err := c.cc.Invoke(ctx, Name_Get_FullMethodName, in, out, cOpts...)
out := new(Query)
err := c.cc.Invoke(ctx, QueryService_Get_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
// NameServer is the server API for Name service.
// All implementations must embed UnimplementedNameServer
func (c *queryServiceClient) Create(ctx context.Context, in *QueryCreate, opts ...grpc.CallOption) (*IdMessage, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(IdMessage)
err := c.cc.Invoke(ctx, QueryService_Create_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *queryServiceClient) Update(ctx context.Context, in *QueryUpdate, opts ...grpc.CallOption) (*empty.Empty, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(empty.Empty)
err := c.cc.Invoke(ctx, QueryService_Update_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *queryServiceClient) Remove(ctx context.Context, in *IdMessage, opts ...grpc.CallOption) (*empty.Empty, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(empty.Empty)
err := c.cc.Invoke(ctx, QueryService_Remove_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *queryServiceClient) Test(ctx context.Context, in *QueryTestRequest, opts ...grpc.CallOption) (*QueryTestResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(QueryTestResponse)
err := c.cc.Invoke(ctx, QueryService_Test_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
// QueryServiceServer is the server API for QueryService service.
// All implementations must embed UnimplementedQueryServiceServer
// for forward compatibility.
type NameServer interface {
Add(context.Context, *NameMessage) (*NameMessage, error)
Get(context.Context, *NameMessage) (*NameMessage, error)
mustEmbedUnimplementedNameServer()
type QueryServiceServer interface {
List(context.Context, *QueryFilter) (*Queries, error)
Get(context.Context, *IdMessage) (*Query, error)
Create(context.Context, *QueryCreate) (*IdMessage, error)
Update(context.Context, *QueryUpdate) (*empty.Empty, error)
Remove(context.Context, *IdMessage) (*empty.Empty, error)
Test(context.Context, *QueryTestRequest) (*QueryTestResponse, error)
mustEmbedUnimplementedQueryServiceServer()
}
// UnimplementedNameServer must be embedded to have
// UnimplementedQueryServiceServer must be embedded to have
// forward compatible implementations.
//
// NOTE: this should be embedded by value instead of pointer to avoid a nil
// pointer dereference when methods are called.
type UnimplementedNameServer struct{}
type UnimplementedQueryServiceServer struct{}
func (UnimplementedNameServer) Add(context.Context, *NameMessage) (*NameMessage, error) {
return nil, status.Errorf(codes.Unimplemented, "method Add not implemented")
func (UnimplementedQueryServiceServer) List(context.Context, *QueryFilter) (*Queries, error) {
return nil, status.Errorf(codes.Unimplemented, "method List not implemented")
}
func (UnimplementedNameServer) Get(context.Context, *NameMessage) (*NameMessage, error) {
func (UnimplementedQueryServiceServer) Get(context.Context, *IdMessage) (*Query, error) {
return nil, status.Errorf(codes.Unimplemented, "method Get not implemented")
}
func (UnimplementedNameServer) mustEmbedUnimplementedNameServer() {}
func (UnimplementedNameServer) testEmbeddedByValue() {}
func (UnimplementedQueryServiceServer) Create(context.Context, *QueryCreate) (*IdMessage, error) {
return nil, status.Errorf(codes.Unimplemented, "method Create not implemented")
}
func (UnimplementedQueryServiceServer) Update(context.Context, *QueryUpdate) (*empty.Empty, error) {
return nil, status.Errorf(codes.Unimplemented, "method Update not implemented")
}
func (UnimplementedQueryServiceServer) Remove(context.Context, *IdMessage) (*empty.Empty, error) {
return nil, status.Errorf(codes.Unimplemented, "method Remove not implemented")
}
func (UnimplementedQueryServiceServer) Test(context.Context, *QueryTestRequest) (*QueryTestResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method Test not implemented")
}
func (UnimplementedQueryServiceServer) mustEmbedUnimplementedQueryServiceServer() {}
func (UnimplementedQueryServiceServer) testEmbeddedByValue() {}
// UnsafeNameServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to NameServer will
// UnsafeQueryServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to QueryServiceServer will
// result in compilation errors.
type UnsafeNameServer interface {
mustEmbedUnimplementedNameServer()
type UnsafeQueryServiceServer interface {
mustEmbedUnimplementedQueryServiceServer()
}
func RegisterNameServer(s grpc.ServiceRegistrar, srv NameServer) {
// If the following call pancis, it indicates UnimplementedNameServer was
func RegisterQueryServiceServer(s grpc.ServiceRegistrar, srv QueryServiceServer) {
// If the following call pancis, it indicates UnimplementedQueryServiceServer was
// embedded by pointer and is nil. This will cause panics if an
// unimplemented method is ever invoked, so we test this at initialization
// time to prevent it from happening at runtime later due to I/O.
if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
t.testEmbeddedByValue()
}
s.RegisterService(&Name_ServiceDesc, srv)
s.RegisterService(&QueryService_ServiceDesc, srv)
}
func _Name_Add_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(NameMessage)
func _QueryService_List_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(QueryFilter)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(NameServer).Add(ctx, in)
return srv.(QueryServiceServer).List(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Name_Add_FullMethodName,
FullMethod: QueryService_List_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(NameServer).Add(ctx, req.(*NameMessage))
return srv.(QueryServiceServer).List(ctx, req.(*QueryFilter))
}
return interceptor(ctx, in, info, handler)
}
func _Name_Get_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(NameMessage)
func _QueryService_Get_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(IdMessage)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(NameServer).Get(ctx, in)
return srv.(QueryServiceServer).Get(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Name_Get_FullMethodName,
FullMethod: QueryService_Get_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(NameServer).Get(ctx, req.(*NameMessage))
return srv.(QueryServiceServer).Get(ctx, req.(*IdMessage))
}
return interceptor(ctx, in, info, handler)
}
// Name_ServiceDesc is the grpc.ServiceDesc for Name service.
func _QueryService_Create_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(QueryCreate)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(QueryServiceServer).Create(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: QueryService_Create_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(QueryServiceServer).Create(ctx, req.(*QueryCreate))
}
return interceptor(ctx, in, info, handler)
}
func _QueryService_Update_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(QueryUpdate)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(QueryServiceServer).Update(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: QueryService_Update_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(QueryServiceServer).Update(ctx, req.(*QueryUpdate))
}
return interceptor(ctx, in, info, handler)
}
func _QueryService_Remove_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(IdMessage)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(QueryServiceServer).Remove(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: QueryService_Remove_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(QueryServiceServer).Remove(ctx, req.(*IdMessage))
}
return interceptor(ctx, in, info, handler)
}
func _QueryService_Test_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(QueryTestRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(QueryServiceServer).Test(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: QueryService_Test_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(QueryServiceServer).Test(ctx, req.(*QueryTestRequest))
}
return interceptor(ctx, in, info, handler)
}
// QueryService_ServiceDesc is the grpc.ServiceDesc for QueryService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var Name_ServiceDesc = grpc.ServiceDesc{
ServiceName: "gotemplate.Name",
HandlerType: (*NameServer)(nil),
var QueryService_ServiceDesc = grpc.ServiceDesc{
ServiceName: "queryorchestration.QueryService",
HandlerType: (*QueryServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "Add",
Handler: _Name_Add_Handler,
MethodName: "List",
Handler: _QueryService_List_Handler,
},
{
MethodName: "Get",
Handler: _Name_Get_Handler,
Handler: _QueryService_Get_Handler,
},
{
MethodName: "Create",
Handler: _QueryService_Create_Handler,
},
{
MethodName: "Update",
Handler: _QueryService_Update_Handler,
},
{
MethodName: "Remove",
Handler: _QueryService_Remove_Handler,
},
{
MethodName: "Test",
Handler: _QueryService_Test_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "main.proto",
}
const (
JobCollectorService_Create_FullMethodName = "/queryorchestration.JobCollectorService/Create"
JobCollectorService_Update_FullMethodName = "/queryorchestration.JobCollectorService/Update"
JobCollectorService_Get_FullMethodName = "/queryorchestration.JobCollectorService/Get"
)
// JobCollectorServiceClient is the client API for JobCollectorService 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 JobCollectorServiceClient interface {
Create(ctx context.Context, in *JobCollectorCreate, opts ...grpc.CallOption) (*IdMessage, error)
Update(ctx context.Context, in *JobCollectorUpdate, opts ...grpc.CallOption) (*empty.Empty, error)
Get(ctx context.Context, in *IdMessage, opts ...grpc.CallOption) (*JobCollector, error)
}
type jobCollectorServiceClient struct {
cc grpc.ClientConnInterface
}
func NewJobCollectorServiceClient(cc grpc.ClientConnInterface) JobCollectorServiceClient {
return &jobCollectorServiceClient{cc}
}
func (c *jobCollectorServiceClient) Create(ctx context.Context, in *JobCollectorCreate, opts ...grpc.CallOption) (*IdMessage, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(IdMessage)
err := c.cc.Invoke(ctx, JobCollectorService_Create_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *jobCollectorServiceClient) Update(ctx context.Context, in *JobCollectorUpdate, opts ...grpc.CallOption) (*empty.Empty, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(empty.Empty)
err := c.cc.Invoke(ctx, JobCollectorService_Update_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *jobCollectorServiceClient) Get(ctx context.Context, in *IdMessage, opts ...grpc.CallOption) (*JobCollector, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(JobCollector)
err := c.cc.Invoke(ctx, JobCollectorService_Get_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
// JobCollectorServiceServer is the server API for JobCollectorService service.
// All implementations must embed UnimplementedJobCollectorServiceServer
// for forward compatibility.
type JobCollectorServiceServer interface {
Create(context.Context, *JobCollectorCreate) (*IdMessage, error)
Update(context.Context, *JobCollectorUpdate) (*empty.Empty, error)
Get(context.Context, *IdMessage) (*JobCollector, error)
mustEmbedUnimplementedJobCollectorServiceServer()
}
// UnimplementedJobCollectorServiceServer must be embedded to have
// forward compatible implementations.
//
// NOTE: this should be embedded by value instead of pointer to avoid a nil
// pointer dereference when methods are called.
type UnimplementedJobCollectorServiceServer struct{}
func (UnimplementedJobCollectorServiceServer) Create(context.Context, *JobCollectorCreate) (*IdMessage, error) {
return nil, status.Errorf(codes.Unimplemented, "method Create not implemented")
}
func (UnimplementedJobCollectorServiceServer) Update(context.Context, *JobCollectorUpdate) (*empty.Empty, error) {
return nil, status.Errorf(codes.Unimplemented, "method Update not implemented")
}
func (UnimplementedJobCollectorServiceServer) Get(context.Context, *IdMessage) (*JobCollector, error) {
return nil, status.Errorf(codes.Unimplemented, "method Get not implemented")
}
func (UnimplementedJobCollectorServiceServer) mustEmbedUnimplementedJobCollectorServiceServer() {}
func (UnimplementedJobCollectorServiceServer) testEmbeddedByValue() {}
// UnsafeJobCollectorServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to JobCollectorServiceServer will
// result in compilation errors.
type UnsafeJobCollectorServiceServer interface {
mustEmbedUnimplementedJobCollectorServiceServer()
}
func RegisterJobCollectorServiceServer(s grpc.ServiceRegistrar, srv JobCollectorServiceServer) {
// If the following call pancis, it indicates UnimplementedJobCollectorServiceServer was
// embedded by pointer and is nil. This will cause panics if an
// unimplemented method is ever invoked, so we test this at initialization
// time to prevent it from happening at runtime later due to I/O.
if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
t.testEmbeddedByValue()
}
s.RegisterService(&JobCollectorService_ServiceDesc, srv)
}
func _JobCollectorService_Create_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(JobCollectorCreate)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(JobCollectorServiceServer).Create(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: JobCollectorService_Create_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(JobCollectorServiceServer).Create(ctx, req.(*JobCollectorCreate))
}
return interceptor(ctx, in, info, handler)
}
func _JobCollectorService_Update_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(JobCollectorUpdate)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(JobCollectorServiceServer).Update(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: JobCollectorService_Update_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(JobCollectorServiceServer).Update(ctx, req.(*JobCollectorUpdate))
}
return interceptor(ctx, in, info, handler)
}
func _JobCollectorService_Get_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(IdMessage)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(JobCollectorServiceServer).Get(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: JobCollectorService_Get_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(JobCollectorServiceServer).Get(ctx, req.(*IdMessage))
}
return interceptor(ctx, in, info, handler)
}
// JobCollectorService_ServiceDesc is the grpc.ServiceDesc for JobCollectorService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var JobCollectorService_ServiceDesc = grpc.ServiceDesc{
ServiceName: "queryorchestration.JobCollectorService",
HandlerType: (*JobCollectorServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "Create",
Handler: _JobCollectorService_Create_Handler,
},
{
MethodName: "Update",
Handler: _JobCollectorService_Update_Handler,
},
{
MethodName: "Get",
Handler: _JobCollectorService_Get_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "main.proto",
}
const (
ExportService_Trigger_FullMethodName = "/queryorchestration.ExportService/Trigger"
)
// ExportServiceClient is the client API for ExportService 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 ExportServiceClient interface {
Trigger(ctx context.Context, in *ExportTrigger, opts ...grpc.CallOption) (*IdMessage, error)
}
type exportServiceClient struct {
cc grpc.ClientConnInterface
}
func NewExportServiceClient(cc grpc.ClientConnInterface) ExportServiceClient {
return &exportServiceClient{cc}
}
func (c *exportServiceClient) Trigger(ctx context.Context, in *ExportTrigger, opts ...grpc.CallOption) (*IdMessage, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(IdMessage)
err := c.cc.Invoke(ctx, ExportService_Trigger_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
// ExportServiceServer is the server API for ExportService service.
// All implementations must embed UnimplementedExportServiceServer
// for forward compatibility.
type ExportServiceServer interface {
Trigger(context.Context, *ExportTrigger) (*IdMessage, error)
mustEmbedUnimplementedExportServiceServer()
}
// UnimplementedExportServiceServer must be embedded to have
// forward compatible implementations.
//
// NOTE: this should be embedded by value instead of pointer to avoid a nil
// pointer dereference when methods are called.
type UnimplementedExportServiceServer struct{}
func (UnimplementedExportServiceServer) Trigger(context.Context, *ExportTrigger) (*IdMessage, error) {
return nil, status.Errorf(codes.Unimplemented, "method Trigger not implemented")
}
func (UnimplementedExportServiceServer) mustEmbedUnimplementedExportServiceServer() {}
func (UnimplementedExportServiceServer) testEmbeddedByValue() {}
// UnsafeExportServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to ExportServiceServer will
// result in compilation errors.
type UnsafeExportServiceServer interface {
mustEmbedUnimplementedExportServiceServer()
}
func RegisterExportServiceServer(s grpc.ServiceRegistrar, srv ExportServiceServer) {
// If the following call pancis, it indicates UnimplementedExportServiceServer was
// embedded by pointer and is nil. This will cause panics if an
// unimplemented method is ever invoked, so we test this at initialization
// time to prevent it from happening at runtime later due to I/O.
if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
t.testEmbeddedByValue()
}
s.RegisterService(&ExportService_ServiceDesc, srv)
}
func _ExportService_Trigger_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ExportTrigger)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ExportServiceServer).Trigger(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: ExportService_Trigger_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ExportServiceServer).Trigger(ctx, req.(*ExportTrigger))
}
return interceptor(ctx, in, info, handler)
}
// ExportService_ServiceDesc is the grpc.ServiceDesc for ExportService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var ExportService_ServiceDesc = grpc.ServiceDesc{
ServiceName: "queryorchestration.ExportService",
HandlerType: (*ExportServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "Trigger",
Handler: _ExportService_Trigger_Handler,
},
},
Streams: []grpc.StreamDesc{},
-6
View File
@@ -6,12 +6,6 @@ vars:
PROTO_DIR_WITH_CONTEXT: "{{.CONTEXT}}/{{.PROTOBUF_DIR}}"
tasks:
lint:
cmds:
- protolint lint {{.PROTO_DIR_WITH_CONTEXT}}
lint:fix:
cmds:
- protolint lint -fix {{.PROTO_DIR_WITH_CONTEXT}}
generate:
cmds:
- protoc --proto_path={{.PROTO_DIR_WITH_CONTEXT}} --go_out={{.CONTEXT}}/{{.API_GRPC_DIR}}/spec --go-grpc_out={{.CONTEXT}}/{{.API_GRPC_DIR}} --go_opt=paths=source_relative main.proto