mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Alerting: Break dependency between state and image packages (#58381)
* Refactor state and manager to not depend directly on image interface * Move generic errors to models package * Move NotAvailableImageService to state as its only references are in state tests * Move NoopImageService to state package * Move mock to state package * Fix linter error * Fix comment styling * Fix a couple added references introduced by rebase * Empty commit to kick build
This commit is contained in:
51
pkg/services/ngalert/state/image_mock.go
Normal file
51
pkg/services/ngalert/state/image_mock.go
Normal file
@@ -0,0 +1,51 @@
|
||||
// Code generated by MockGen. DO NOT EDIT.
|
||||
// Source: github.com/grafana/grafana/pkg/services/ngalert/state (interfaces: ImageCapturer)
|
||||
|
||||
// Package state is a generated GoMock package.
|
||||
package state
|
||||
|
||||
import (
|
||||
context "context"
|
||||
reflect "reflect"
|
||||
|
||||
gomock "github.com/golang/mock/gomock"
|
||||
models "github.com/grafana/grafana/pkg/services/ngalert/models"
|
||||
)
|
||||
|
||||
// MockImageCapturer is a mock of ImageCapturer interface.
|
||||
type MockImageCapturer struct {
|
||||
ctrl *gomock.Controller
|
||||
recorder *MockImageCapturerMockRecorder
|
||||
}
|
||||
|
||||
// MockImageCapturerMockRecorder is the mock recorder for MockImageCapturer.
|
||||
type MockImageCapturerMockRecorder struct {
|
||||
mock *MockImageCapturer
|
||||
}
|
||||
|
||||
// NewMockImageCapturer creates a new mock instance.
|
||||
func NewMockImageCapturer(ctrl *gomock.Controller) *MockImageCapturer {
|
||||
mock := &MockImageCapturer{ctrl: ctrl}
|
||||
mock.recorder = &MockImageCapturerMockRecorder{mock}
|
||||
return mock
|
||||
}
|
||||
|
||||
// EXPECT returns an object that allows the caller to indicate expected use.
|
||||
func (m *MockImageCapturer) EXPECT() *MockImageCapturerMockRecorder {
|
||||
return m.recorder
|
||||
}
|
||||
|
||||
// NewImage mocks base method.
|
||||
func (m *MockImageCapturer) NewImage(arg0 context.Context, arg1 *models.AlertRule) (*models.Image, error) {
|
||||
m.ctrl.T.Helper()
|
||||
ret := m.ctrl.Call(m, "NewImage", arg0, arg1)
|
||||
ret0, _ := ret[0].(*models.Image)
|
||||
ret1, _ := ret[1].(error)
|
||||
return ret0, ret1
|
||||
}
|
||||
|
||||
// NewImage indicates an expected call of NewImage.
|
||||
func (mr *MockImageCapturerMockRecorder) NewImage(arg0, arg1 interface{}) *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NewImage", reflect.TypeOf((*MockImageCapturer)(nil).NewImage), arg0, arg1)
|
||||
}
|
||||
Reference in New Issue
Block a user