add ListWorkflowTemplates

This commit is contained in:
rushtehrani
2019-12-19 11:15:53 -08:00
parent bdcd517135
commit 3d5aeccaa1
9 changed files with 397 additions and 83 deletions

View File

@@ -214,8 +214,8 @@ func (m *ListWorkflowsRequest) GetWorkflowTemplateUid() string {
}
type ListWorkflowsResponse struct {
Workflows []*Workflow `protobuf:"bytes,1,rep,name=workflows,proto3" json:"workflows,omitempty"`
Count int32 `protobuf:"varint,2,opt,name=count,proto3" json:"count,omitempty"`
Count int32 `protobuf:"varint,1,opt,name=count,proto3" json:"count,omitempty"`
Workflows []*Workflow `protobuf:"bytes,2,rep,name=workflows,proto3" json:"workflows,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
@@ -246,13 +246,6 @@ func (m *ListWorkflowsResponse) XXX_DiscardUnknown() {
var xxx_messageInfo_ListWorkflowsResponse proto.InternalMessageInfo
func (m *ListWorkflowsResponse) GetWorkflows() []*Workflow {
if m != nil {
return m.Workflows
}
return nil
}
func (m *ListWorkflowsResponse) GetCount() int32 {
if m != nil {
return m.Count
@@ -260,6 +253,13 @@ func (m *ListWorkflowsResponse) GetCount() int32 {
return 0
}
func (m *ListWorkflowsResponse) GetWorkflows() []*Workflow {
if m != nil {
return m.Workflows
}
return nil
}
type Workflow struct {
Uid string `protobuf:"bytes,1,opt,name=uid,proto3" json:"uid,omitempty"`
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
@@ -391,45 +391,46 @@ func init() {
func init() { proto.RegisterFile("workflow.proto", fileDescriptor_892c7f566756b0be) }
var fileDescriptor_892c7f566756b0be = []byte{
// 596 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x55, 0xcd, 0x6e, 0xd3, 0x40,
0x10, 0x66, 0x9b, 0xa6, 0x34, 0x53, 0xb5, 0x54, 0xd3, 0xb4, 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f, 0xa2, 0x67, 0xff, 0x02, 0x00, 0x00, 0xff, 0xff, 0x90, 0x49, 0xff, 0xc5,
0xd7, 0x06, 0x00, 0x00,
// 624 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x55, 0xcf, 0x6e, 0xd3, 0x4e,
0x10, 0xfe, 0xb9, 0x69, 0xaa, 0x66, 0xaa, 0xe4, 0x57, 0x4d, 0x93, 0xd6, 0x58, 0x91, 0x08, 0x8b,
0x90, 0x52, 0x5a, 0xc5, 0x6d, 0xa0, 0x97, 0xa2, 0x4a, 0xa0, 0x8a, 0x96, 0x03, 0x07, 0x64, 0xfe,
0x54, 0xea, 0x05, 0xb6, 0xc9, 0xb6, 0x58, 0x24, 0xb6, 0xf1, 0xae, 0xd3, 0x43, 0x94, 0x0b, 0x3c,
0x02, 0xdc, 0x78, 0x11, 0x24, 0x1e, 0xa3, 0xaf, 0xc0, 0x89, 0xa7, 0x40, 0x59, 0x7b, 0xb7, 0xb1,
0x63, 0x20, 0x51, 0x6f, 0xbb, 0x33, 0xe3, 0x6f, 0xbe, 0x6f, 0xe7, 0xdb, 0x35, 0x54, 0x2e, 0xfd,
0xf0, 0xc3, 0x79, 0xcf, 0xbf, 0x6c, 0x05, 0xa1, 0x2f, 0x7c, 0x2c, 0xd0, 0xc0, 0xb5, 0xea, 0x17,
0xbe, 0x7f, 0xd1, 0x63, 0x36, 0x0d, 0x5c, 0x9b, 0x7a, 0x9e, 0x2f, 0xa8, 0x70, 0x7d, 0x8f, 0xc7,
0x25, 0xd6, 0x86, 0xfa, 0xe4, 0xad, 0x60, 0xfd, 0xa0, 0x47, 0x05, 0x8b, 0x13, 0xe4, 0x1d, 0xd4,
0x0e, 0x43, 0x46, 0x05, 0x3b, 0x49, 0x0a, 0x1c, 0xf6, 0x31, 0x62, 0x5c, 0x60, 0x1d, 0x4a, 0x1e,
0xed, 0x33, 0x1e, 0xd0,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x7c, 0x3a, 0xff, 0x57, 0xf6, 0x80, 0x85, 0x7c, 0xfc, 0xb8,
0xdb, 0xc3, 0x64, 0x35, 0xc2, 0xef, 0x06, 0xd4, 0x27, 0x27, 0xaf, 0xe8, 0xbd, 0x49, 0x4a, 0xb1,
0x39, 0x65, 0x8e, 0x6c, 0x89, 0xd2, 0xb9, 0x39, 0x43, 0x65, 0xe2, 0xaa, 0x43, 0x29, 0xfd, 0x00,
0x1f, 0xdd, 0x40, 0x04, 0x7e, 0x35, 0xd2, 0xef, 0xa4, 0xea, 0xc6, 0xf1, 0xce, 0x1f, 0x99, 0x68,
0xb2, 0xe4, 0x6f, 0x25, 0x09, 0xcb, 0x87, 0x92, 0x65, 0x0b, 0xe7, 0x72, 0xce, 0xd9, 0x92, 0xfc,
0x41, 0x3e, 0xf8, 0x1d, 0x00, 0x00, 0xff, 0xff, 0x12, 0x2a, 0x17, 0xe3, 0x6e, 0x07, 0x00, 0x00,
}
// Reference imports to suppress errors if they are not otherwise used.
@@ -452,6 +453,7 @@ type WorkflowServiceClient interface {
CreateWorkflowTemplate(ctx context.Context, in *CreateWorkflowTemplateRequest, opts ...grpc.CallOption) (*WorkflowTemplate, error)
GetWorkflowTemplate(ctx context.Context, in *GetWorkflowTemplateRequest, opts ...grpc.CallOption) (*WorkflowTemplate, error)
ListWorkflowTemplateVersions(ctx context.Context, in *ListWorkflowTemplateVersionsRequest, opts ...grpc.CallOption) (*ListWorkflowTemplateVersionsResponse, error)
ListWorkflowTemplates(ctx context.Context, in *ListWorkflowTemplatesRequest, opts ...grpc.CallOption) (*ListWorkflowTemplatesResponse, error)
}
type workflowServiceClient struct {
@@ -548,6 +550,15 @@ func (c *workflowServiceClient) ListWorkflowTemplateVersions(ctx context.Context
return out, nil
}
func (c *workflowServiceClient) ListWorkflowTemplates(ctx context.Context, in *ListWorkflowTemplatesRequest, opts ...grpc.CallOption) (*ListWorkflowTemplatesResponse, error) {
out := new(ListWorkflowTemplatesResponse)
err := c.cc.Invoke(ctx, "/api.WorkflowService/ListWorkflowTemplates", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// WorkflowServiceServer is the server API for WorkflowService service.
type WorkflowServiceServer interface {
// Creates a Workflow
@@ -558,6 +569,7 @@ type WorkflowServiceServer interface {
CreateWorkflowTemplate(context.Context, *CreateWorkflowTemplateRequest) (*WorkflowTemplate, error)
GetWorkflowTemplate(context.Context, *GetWorkflowTemplateRequest) (*WorkflowTemplate, error)
ListWorkflowTemplateVersions(context.Context, *ListWorkflowTemplateVersionsRequest) (*ListWorkflowTemplateVersionsResponse, error)
ListWorkflowTemplates(context.Context, *ListWorkflowTemplatesRequest) (*ListWorkflowTemplatesResponse, error)
}
// UnimplementedWorkflowServiceServer can be embedded to have forward compatible implementations.
@@ -585,6 +597,9 @@ func (*UnimplementedWorkflowServiceServer) GetWorkflowTemplate(ctx context.Conte
func (*UnimplementedWorkflowServiceServer) ListWorkflowTemplateVersions(ctx context.Context, req *ListWorkflowTemplateVersionsRequest) (*ListWorkflowTemplateVersionsResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method ListWorkflowTemplateVersions not implemented")
}
func (*UnimplementedWorkflowServiceServer) ListWorkflowTemplates(ctx context.Context, req *ListWorkflowTemplatesRequest) (*ListWorkflowTemplatesResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method ListWorkflowTemplates not implemented")
}
func RegisterWorkflowServiceServer(s *grpc.Server, srv WorkflowServiceServer) {
s.RegisterService(&_WorkflowService_serviceDesc, srv)
@@ -719,6 +734,24 @@ func _WorkflowService_ListWorkflowTemplateVersions_Handler(srv interface{}, ctx
return interceptor(ctx, in, info, handler)
}
func _WorkflowService_ListWorkflowTemplates_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ListWorkflowTemplatesRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(WorkflowServiceServer).ListWorkflowTemplates(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/api.WorkflowService/ListWorkflowTemplates",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(WorkflowServiceServer).ListWorkflowTemplates(ctx, req.(*ListWorkflowTemplatesRequest))
}
return interceptor(ctx, in, info, handler)
}
var _WorkflowService_serviceDesc = grpc.ServiceDesc{
ServiceName: "api.WorkflowService",
HandlerType: (*WorkflowServiceServer)(nil),
@@ -747,6 +780,10 @@ var _WorkflowService_serviceDesc = grpc.ServiceDesc{
MethodName: "ListWorkflowTemplateVersions",
Handler: _WorkflowService_ListWorkflowTemplateVersions_Handler,
},
{
MethodName: "ListWorkflowTemplates",
Handler: _WorkflowService_ListWorkflowTemplates_Handler,
},
},
Streams: []grpc.StreamDesc{
{