-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add getWorkflows query options for leaning out the response (#53)
* WAG updates * make generate * Implementation * Fix lint
- Loading branch information
1 parent
1122869
commit d5339e2
Showing
13 changed files
with
256 additions
and
223 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,215 +1,183 @@ | ||
// Code generated by MockGen. DO NOT EDIT. | ||
// Automatically generated by MockGen. DO NOT EDIT! | ||
// Source: interface.go | ||
|
||
// Package server is a generated GoMock package. | ||
package server | ||
|
||
import ( | ||
context "context" | ||
models "github.com/Clever/workflow-manager/gen-go/models" | ||
gomock "github.com/golang/mock/gomock" | ||
reflect "reflect" | ||
) | ||
|
||
// MockController is a mock of Controller interface | ||
// Mock of Controller interface | ||
type MockController struct { | ||
ctrl *gomock.Controller | ||
recorder *MockControllerMockRecorder | ||
recorder *_MockControllerRecorder | ||
} | ||
|
||
// MockControllerMockRecorder is the mock recorder for MockController | ||
type MockControllerMockRecorder struct { | ||
// Recorder for MockController (not exported) | ||
type _MockControllerRecorder struct { | ||
mock *MockController | ||
} | ||
|
||
// NewMockController creates a new mock instance | ||
func NewMockController(ctrl *gomock.Controller) *MockController { | ||
mock := &MockController{ctrl: ctrl} | ||
mock.recorder = &MockControllerMockRecorder{mock} | ||
mock.recorder = &_MockControllerRecorder{mock} | ||
return mock | ||
} | ||
|
||
// EXPECT returns an object that allows the caller to indicate expected use | ||
func (m *MockController) EXPECT() *MockControllerMockRecorder { | ||
return m.recorder | ||
func (_m *MockController) EXPECT() *_MockControllerRecorder { | ||
return _m.recorder | ||
} | ||
|
||
// HealthCheck mocks base method | ||
func (m *MockController) HealthCheck(ctx context.Context) error { | ||
ret := m.ctrl.Call(m, "HealthCheck", ctx) | ||
func (_m *MockController) HealthCheck(ctx context.Context) error { | ||
ret := _m.ctrl.Call(_m, "HealthCheck", ctx) | ||
ret0, _ := ret[0].(error) | ||
return ret0 | ||
} | ||
|
||
// HealthCheck indicates an expected call of HealthCheck | ||
func (mr *MockControllerMockRecorder) HealthCheck(ctx interface{}) *gomock.Call { | ||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HealthCheck", reflect.TypeOf((*MockController)(nil).HealthCheck), ctx) | ||
func (_mr *_MockControllerRecorder) HealthCheck(arg0 interface{}) *gomock.Call { | ||
return _mr.mock.ctrl.RecordCall(_mr.mock, "HealthCheck", arg0) | ||
} | ||
|
||
// PostStateResource mocks base method | ||
func (m *MockController) PostStateResource(ctx context.Context, i *models.NewStateResource) (*models.StateResource, error) { | ||
ret := m.ctrl.Call(m, "PostStateResource", ctx, i) | ||
func (_m *MockController) PostStateResource(ctx context.Context, i *models.NewStateResource) (*models.StateResource, error) { | ||
ret := _m.ctrl.Call(_m, "PostStateResource", ctx, i) | ||
ret0, _ := ret[0].(*models.StateResource) | ||
ret1, _ := ret[1].(error) | ||
return ret0, ret1 | ||
} | ||
|
||
// PostStateResource indicates an expected call of PostStateResource | ||
func (mr *MockControllerMockRecorder) PostStateResource(ctx, i interface{}) *gomock.Call { | ||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PostStateResource", reflect.TypeOf((*MockController)(nil).PostStateResource), ctx, i) | ||
func (_mr *_MockControllerRecorder) PostStateResource(arg0, arg1 interface{}) *gomock.Call { | ||
return _mr.mock.ctrl.RecordCall(_mr.mock, "PostStateResource", arg0, arg1) | ||
} | ||
|
||
// DeleteStateResource mocks base method | ||
func (m *MockController) DeleteStateResource(ctx context.Context, i *models.DeleteStateResourceInput) error { | ||
ret := m.ctrl.Call(m, "DeleteStateResource", ctx, i) | ||
func (_m *MockController) DeleteStateResource(ctx context.Context, i *models.DeleteStateResourceInput) error { | ||
ret := _m.ctrl.Call(_m, "DeleteStateResource", ctx, i) | ||
ret0, _ := ret[0].(error) | ||
return ret0 | ||
} | ||
|
||
// DeleteStateResource indicates an expected call of DeleteStateResource | ||
func (mr *MockControllerMockRecorder) DeleteStateResource(ctx, i interface{}) *gomock.Call { | ||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteStateResource", reflect.TypeOf((*MockController)(nil).DeleteStateResource), ctx, i) | ||
func (_mr *_MockControllerRecorder) DeleteStateResource(arg0, arg1 interface{}) *gomock.Call { | ||
return _mr.mock.ctrl.RecordCall(_mr.mock, "DeleteStateResource", arg0, arg1) | ||
} | ||
|
||
// GetStateResource mocks base method | ||
func (m *MockController) GetStateResource(ctx context.Context, i *models.GetStateResourceInput) (*models.StateResource, error) { | ||
ret := m.ctrl.Call(m, "GetStateResource", ctx, i) | ||
func (_m *MockController) GetStateResource(ctx context.Context, i *models.GetStateResourceInput) (*models.StateResource, error) { | ||
ret := _m.ctrl.Call(_m, "GetStateResource", ctx, i) | ||
ret0, _ := ret[0].(*models.StateResource) | ||
ret1, _ := ret[1].(error) | ||
return ret0, ret1 | ||
} | ||
|
||
// GetStateResource indicates an expected call of GetStateResource | ||
func (mr *MockControllerMockRecorder) GetStateResource(ctx, i interface{}) *gomock.Call { | ||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetStateResource", reflect.TypeOf((*MockController)(nil).GetStateResource), ctx, i) | ||
func (_mr *_MockControllerRecorder) GetStateResource(arg0, arg1 interface{}) *gomock.Call { | ||
return _mr.mock.ctrl.RecordCall(_mr.mock, "GetStateResource", arg0, arg1) | ||
} | ||
|
||
// PutStateResource mocks base method | ||
func (m *MockController) PutStateResource(ctx context.Context, i *models.PutStateResourceInput) (*models.StateResource, error) { | ||
ret := m.ctrl.Call(m, "PutStateResource", ctx, i) | ||
func (_m *MockController) PutStateResource(ctx context.Context, i *models.PutStateResourceInput) (*models.StateResource, error) { | ||
ret := _m.ctrl.Call(_m, "PutStateResource", ctx, i) | ||
ret0, _ := ret[0].(*models.StateResource) | ||
ret1, _ := ret[1].(error) | ||
return ret0, ret1 | ||
} | ||
|
||
// PutStateResource indicates an expected call of PutStateResource | ||
func (mr *MockControllerMockRecorder) PutStateResource(ctx, i interface{}) *gomock.Call { | ||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PutStateResource", reflect.TypeOf((*MockController)(nil).PutStateResource), ctx, i) | ||
func (_mr *_MockControllerRecorder) PutStateResource(arg0, arg1 interface{}) *gomock.Call { | ||
return _mr.mock.ctrl.RecordCall(_mr.mock, "PutStateResource", arg0, arg1) | ||
} | ||
|
||
// GetWorkflowDefinitions mocks base method | ||
func (m *MockController) GetWorkflowDefinitions(ctx context.Context) ([]models.WorkflowDefinition, error) { | ||
ret := m.ctrl.Call(m, "GetWorkflowDefinitions", ctx) | ||
func (_m *MockController) GetWorkflowDefinitions(ctx context.Context) ([]models.WorkflowDefinition, error) { | ||
ret := _m.ctrl.Call(_m, "GetWorkflowDefinitions", ctx) | ||
ret0, _ := ret[0].([]models.WorkflowDefinition) | ||
ret1, _ := ret[1].(error) | ||
return ret0, ret1 | ||
} | ||
|
||
// GetWorkflowDefinitions indicates an expected call of GetWorkflowDefinitions | ||
func (mr *MockControllerMockRecorder) GetWorkflowDefinitions(ctx interface{}) *gomock.Call { | ||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetWorkflowDefinitions", reflect.TypeOf((*MockController)(nil).GetWorkflowDefinitions), ctx) | ||
func (_mr *_MockControllerRecorder) GetWorkflowDefinitions(arg0 interface{}) *gomock.Call { | ||
return _mr.mock.ctrl.RecordCall(_mr.mock, "GetWorkflowDefinitions", arg0) | ||
} | ||
|
||
// NewWorkflowDefinition mocks base method | ||
func (m *MockController) NewWorkflowDefinition(ctx context.Context, i *models.NewWorkflowDefinitionRequest) (*models.WorkflowDefinition, error) { | ||
ret := m.ctrl.Call(m, "NewWorkflowDefinition", ctx, i) | ||
func (_m *MockController) NewWorkflowDefinition(ctx context.Context, i *models.NewWorkflowDefinitionRequest) (*models.WorkflowDefinition, error) { | ||
ret := _m.ctrl.Call(_m, "NewWorkflowDefinition", ctx, i) | ||
ret0, _ := ret[0].(*models.WorkflowDefinition) | ||
ret1, _ := ret[1].(error) | ||
return ret0, ret1 | ||
} | ||
|
||
// NewWorkflowDefinition indicates an expected call of NewWorkflowDefinition | ||
func (mr *MockControllerMockRecorder) NewWorkflowDefinition(ctx, i interface{}) *gomock.Call { | ||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NewWorkflowDefinition", reflect.TypeOf((*MockController)(nil).NewWorkflowDefinition), ctx, i) | ||
func (_mr *_MockControllerRecorder) NewWorkflowDefinition(arg0, arg1 interface{}) *gomock.Call { | ||
return _mr.mock.ctrl.RecordCall(_mr.mock, "NewWorkflowDefinition", arg0, arg1) | ||
} | ||
|
||
// GetWorkflowDefinitionVersionsByName mocks base method | ||
func (m *MockController) GetWorkflowDefinitionVersionsByName(ctx context.Context, i *models.GetWorkflowDefinitionVersionsByNameInput) ([]models.WorkflowDefinition, error) { | ||
ret := m.ctrl.Call(m, "GetWorkflowDefinitionVersionsByName", ctx, i) | ||
func (_m *MockController) GetWorkflowDefinitionVersionsByName(ctx context.Context, i *models.GetWorkflowDefinitionVersionsByNameInput) ([]models.WorkflowDefinition, error) { | ||
ret := _m.ctrl.Call(_m, "GetWorkflowDefinitionVersionsByName", ctx, i) | ||
ret0, _ := ret[0].([]models.WorkflowDefinition) | ||
ret1, _ := ret[1].(error) | ||
return ret0, ret1 | ||
} | ||
|
||
// GetWorkflowDefinitionVersionsByName indicates an expected call of GetWorkflowDefinitionVersionsByName | ||
func (mr *MockControllerMockRecorder) GetWorkflowDefinitionVersionsByName(ctx, i interface{}) *gomock.Call { | ||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetWorkflowDefinitionVersionsByName", reflect.TypeOf((*MockController)(nil).GetWorkflowDefinitionVersionsByName), ctx, i) | ||
func (_mr *_MockControllerRecorder) GetWorkflowDefinitionVersionsByName(arg0, arg1 interface{}) *gomock.Call { | ||
return _mr.mock.ctrl.RecordCall(_mr.mock, "GetWorkflowDefinitionVersionsByName", arg0, arg1) | ||
} | ||
|
||
// UpdateWorkflowDefinition mocks base method | ||
func (m *MockController) UpdateWorkflowDefinition(ctx context.Context, i *models.UpdateWorkflowDefinitionInput) (*models.WorkflowDefinition, error) { | ||
ret := m.ctrl.Call(m, "UpdateWorkflowDefinition", ctx, i) | ||
func (_m *MockController) UpdateWorkflowDefinition(ctx context.Context, i *models.UpdateWorkflowDefinitionInput) (*models.WorkflowDefinition, error) { | ||
ret := _m.ctrl.Call(_m, "UpdateWorkflowDefinition", ctx, i) | ||
ret0, _ := ret[0].(*models.WorkflowDefinition) | ||
ret1, _ := ret[1].(error) | ||
return ret0, ret1 | ||
} | ||
|
||
// UpdateWorkflowDefinition indicates an expected call of UpdateWorkflowDefinition | ||
func (mr *MockControllerMockRecorder) UpdateWorkflowDefinition(ctx, i interface{}) *gomock.Call { | ||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateWorkflowDefinition", reflect.TypeOf((*MockController)(nil).UpdateWorkflowDefinition), ctx, i) | ||
func (_mr *_MockControllerRecorder) UpdateWorkflowDefinition(arg0, arg1 interface{}) *gomock.Call { | ||
return _mr.mock.ctrl.RecordCall(_mr.mock, "UpdateWorkflowDefinition", arg0, arg1) | ||
} | ||
|
||
// GetWorkflowDefinitionByNameAndVersion mocks base method | ||
func (m *MockController) GetWorkflowDefinitionByNameAndVersion(ctx context.Context, i *models.GetWorkflowDefinitionByNameAndVersionInput) (*models.WorkflowDefinition, error) { | ||
ret := m.ctrl.Call(m, "GetWorkflowDefinitionByNameAndVersion", ctx, i) | ||
func (_m *MockController) GetWorkflowDefinitionByNameAndVersion(ctx context.Context, i *models.GetWorkflowDefinitionByNameAndVersionInput) (*models.WorkflowDefinition, error) { | ||
ret := _m.ctrl.Call(_m, "GetWorkflowDefinitionByNameAndVersion", ctx, i) | ||
ret0, _ := ret[0].(*models.WorkflowDefinition) | ||
ret1, _ := ret[1].(error) | ||
return ret0, ret1 | ||
} | ||
|
||
// GetWorkflowDefinitionByNameAndVersion indicates an expected call of GetWorkflowDefinitionByNameAndVersion | ||
func (mr *MockControllerMockRecorder) GetWorkflowDefinitionByNameAndVersion(ctx, i interface{}) *gomock.Call { | ||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetWorkflowDefinitionByNameAndVersion", reflect.TypeOf((*MockController)(nil).GetWorkflowDefinitionByNameAndVersion), ctx, i) | ||
func (_mr *_MockControllerRecorder) GetWorkflowDefinitionByNameAndVersion(arg0, arg1 interface{}) *gomock.Call { | ||
return _mr.mock.ctrl.RecordCall(_mr.mock, "GetWorkflowDefinitionByNameAndVersion", arg0, arg1) | ||
} | ||
|
||
// GetWorkflows mocks base method | ||
func (m *MockController) GetWorkflows(ctx context.Context, i *models.GetWorkflowsInput) ([]models.Workflow, string, error) { | ||
ret := m.ctrl.Call(m, "GetWorkflows", ctx, i) | ||
func (_m *MockController) GetWorkflows(ctx context.Context, i *models.GetWorkflowsInput) ([]models.Workflow, string, error) { | ||
ret := _m.ctrl.Call(_m, "GetWorkflows", ctx, i) | ||
ret0, _ := ret[0].([]models.Workflow) | ||
ret1, _ := ret[1].(string) | ||
ret2, _ := ret[2].(error) | ||
return ret0, ret1, ret2 | ||
} | ||
|
||
// GetWorkflows indicates an expected call of GetWorkflows | ||
func (mr *MockControllerMockRecorder) GetWorkflows(ctx, i interface{}) *gomock.Call { | ||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetWorkflows", reflect.TypeOf((*MockController)(nil).GetWorkflows), ctx, i) | ||
func (_mr *_MockControllerRecorder) GetWorkflows(arg0, arg1 interface{}) *gomock.Call { | ||
return _mr.mock.ctrl.RecordCall(_mr.mock, "GetWorkflows", arg0, arg1) | ||
} | ||
|
||
// StartWorkflow mocks base method | ||
func (m *MockController) StartWorkflow(ctx context.Context, i *models.StartWorkflowRequest) (*models.Workflow, error) { | ||
ret := m.ctrl.Call(m, "StartWorkflow", ctx, i) | ||
func (_m *MockController) StartWorkflow(ctx context.Context, i *models.StartWorkflowRequest) (*models.Workflow, error) { | ||
ret := _m.ctrl.Call(_m, "StartWorkflow", ctx, i) | ||
ret0, _ := ret[0].(*models.Workflow) | ||
ret1, _ := ret[1].(error) | ||
return ret0, ret1 | ||
} | ||
|
||
// StartWorkflow indicates an expected call of StartWorkflow | ||
func (mr *MockControllerMockRecorder) StartWorkflow(ctx, i interface{}) *gomock.Call { | ||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StartWorkflow", reflect.TypeOf((*MockController)(nil).StartWorkflow), ctx, i) | ||
func (_mr *_MockControllerRecorder) StartWorkflow(arg0, arg1 interface{}) *gomock.Call { | ||
return _mr.mock.ctrl.RecordCall(_mr.mock, "StartWorkflow", arg0, arg1) | ||
} | ||
|
||
// CancelWorkflow mocks base method | ||
func (m *MockController) CancelWorkflow(ctx context.Context, i *models.CancelWorkflowInput) error { | ||
ret := m.ctrl.Call(m, "CancelWorkflow", ctx, i) | ||
func (_m *MockController) CancelWorkflow(ctx context.Context, i *models.CancelWorkflowInput) error { | ||
ret := _m.ctrl.Call(_m, "CancelWorkflow", ctx, i) | ||
ret0, _ := ret[0].(error) | ||
return ret0 | ||
} | ||
|
||
// CancelWorkflow indicates an expected call of CancelWorkflow | ||
func (mr *MockControllerMockRecorder) CancelWorkflow(ctx, i interface{}) *gomock.Call { | ||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CancelWorkflow", reflect.TypeOf((*MockController)(nil).CancelWorkflow), ctx, i) | ||
func (_mr *_MockControllerRecorder) CancelWorkflow(arg0, arg1 interface{}) *gomock.Call { | ||
return _mr.mock.ctrl.RecordCall(_mr.mock, "CancelWorkflow", arg0, arg1) | ||
} | ||
|
||
// GetWorkflowByID mocks base method | ||
func (m *MockController) GetWorkflowByID(ctx context.Context, workflowID string) (*models.Workflow, error) { | ||
ret := m.ctrl.Call(m, "GetWorkflowByID", ctx, workflowID) | ||
func (_m *MockController) GetWorkflowByID(ctx context.Context, workflowID string) (*models.Workflow, error) { | ||
ret := _m.ctrl.Call(_m, "GetWorkflowByID", ctx, workflowID) | ||
ret0, _ := ret[0].(*models.Workflow) | ||
ret1, _ := ret[1].(error) | ||
return ret0, ret1 | ||
} | ||
|
||
// GetWorkflowByID indicates an expected call of GetWorkflowByID | ||
func (mr *MockControllerMockRecorder) GetWorkflowByID(ctx, workflowID interface{}) *gomock.Call { | ||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetWorkflowByID", reflect.TypeOf((*MockController)(nil).GetWorkflowByID), ctx, workflowID) | ||
func (_mr *_MockControllerRecorder) GetWorkflowByID(arg0, arg1 interface{}) *gomock.Call { | ||
return _mr.mock.ctrl.RecordCall(_mr.mock, "GetWorkflowByID", arg0, arg1) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.