Documentation ¶
Overview ¶
Package mock_alert is a generated GoMock package.
Index ¶
- func MakeHandler(service Service, logger kitlog.Logger, ml machineLearning.Service) http.Handler
- type MockService
- func (m *MockService) DeleteReply(ctx context.Context, chatId uint32, messageId string) error
- func (m *MockService) EXPECT() *MockServiceMockRecorder
- func (m *MockService) GetReplies(ctx context.Context, chatId uint32) ([]telegram.Replies, error)
- func (m *MockService) SendAlert(ctx context.Context, chatId uint32, message string) error
- func (m *MockService) SendAlertWithReply(ctx context.Context, chatId uint32, message, correlationId string) (int, error)
- func (m *MockService) SendDocumentToAlertGroup(ctx context.Context, chatid uint32, document []byte, extension string) error
- func (m *MockService) SendError(ctx context.Context, err error) error
- func (m *MockService) SendErrorImage(ctx context.Context, image []byte) error
- func (m *MockService) SendImageToAlertGroup(ctx context.Context, chatid uint32, image []byte) error
- type MockServiceMockRecorder
- func (mr *MockServiceMockRecorder) DeleteReply(ctx, chatId, messageId interface{}) *gomock.Call
- func (mr *MockServiceMockRecorder) GetReplies(ctx, chatId interface{}) *gomock.Call
- func (mr *MockServiceMockRecorder) SendAlert(ctx, chatId, message interface{}) *gomock.Call
- func (mr *MockServiceMockRecorder) SendAlertWithReply(ctx, chatId, message, correlationId interface{}) *gomock.Call
- func (mr *MockServiceMockRecorder) SendDocumentToAlertGroup(ctx, chatid, document, extension interface{}) *gomock.Call
- func (mr *MockServiceMockRecorder) SendError(ctx, err interface{}) *gomock.Call
- func (mr *MockServiceMockRecorder) SendErrorImage(ctx, image interface{}) *gomock.Call
- func (mr *MockServiceMockRecorder) SendImageToAlertGroup(ctx, chatid, image interface{}) *gomock.Call
- type Reply
- type SendReplyAlertMessageRequest
- type SendReplyAlertMessageResponse
- type Service
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MakeHandler ¶
MakeHandler returns a rest http handler to send alerts.
The machine learning service can be set to nil if you do not wish to save the requests.
Types ¶
type MockService ¶
type MockService struct {
// contains filtered or unexported fields
}
MockService is a mock of Service interface
func NewMockService ¶
func NewMockService(ctrl *gomock.Controller) *MockService
NewMockService creates a new mock instance
func (*MockService) DeleteReply ¶
DeleteReply mocks base method
func (*MockService) EXPECT ¶
func (m *MockService) EXPECT() *MockServiceMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
func (*MockService) GetReplies ¶
GetReplies mocks base method
func (*MockService) SendAlertWithReply ¶
func (m *MockService) SendAlertWithReply(ctx context.Context, chatId uint32, message, correlationId string) (int, error)
SendAlertWithReply mocks base method
func (*MockService) SendDocumentToAlertGroup ¶
func (m *MockService) SendDocumentToAlertGroup(ctx context.Context, chatid uint32, document []byte, extension string) error
SendDocumentToAlertGroup mocks base method
func (*MockService) SendError ¶
func (m *MockService) SendError(ctx context.Context, err error) error
SendError mocks base method
func (*MockService) SendErrorImage ¶
func (m *MockService) SendErrorImage(ctx context.Context, image []byte) error
SendErrorImage mocks base method
func (*MockService) SendImageToAlertGroup ¶
SendImageToAlertGroup mocks base method
type MockServiceMockRecorder ¶
type MockServiceMockRecorder struct {
// contains filtered or unexported fields
}
MockServiceMockRecorder is the mock recorder for MockService
func (*MockServiceMockRecorder) DeleteReply ¶
func (mr *MockServiceMockRecorder) DeleteReply(ctx, chatId, messageId interface{}) *gomock.Call
DeleteReply indicates an expected call of DeleteReply
func (*MockServiceMockRecorder) GetReplies ¶
func (mr *MockServiceMockRecorder) GetReplies(ctx, chatId interface{}) *gomock.Call
GetReplies indicates an expected call of GetReplies
func (*MockServiceMockRecorder) SendAlert ¶
func (mr *MockServiceMockRecorder) SendAlert(ctx, chatId, message interface{}) *gomock.Call
SendAlert indicates an expected call of SendAlert
func (*MockServiceMockRecorder) SendAlertWithReply ¶
func (mr *MockServiceMockRecorder) SendAlertWithReply(ctx, chatId, message, correlationId interface{}) *gomock.Call
SendAlertWithReply indicates an expected call of SendAlertWithReply
func (*MockServiceMockRecorder) SendDocumentToAlertGroup ¶
func (mr *MockServiceMockRecorder) SendDocumentToAlertGroup(ctx, chatid, document, extension interface{}) *gomock.Call
SendDocumentToAlertGroup indicates an expected call of SendDocumentToAlertGroup
func (*MockServiceMockRecorder) SendError ¶
func (mr *MockServiceMockRecorder) SendError(ctx, err interface{}) *gomock.Call
SendError indicates an expected call of SendError
func (*MockServiceMockRecorder) SendErrorImage ¶
func (mr *MockServiceMockRecorder) SendErrorImage(ctx, image interface{}) *gomock.Call
SendErrorImage indicates an expected call of SendErrorImage
func (*MockServiceMockRecorder) SendImageToAlertGroup ¶
func (mr *MockServiceMockRecorder) SendImageToAlertGroup(ctx, chatid, image interface{}) *gomock.Call
SendImageToAlertGroup indicates an expected call of SendImageToAlertGroup
type SendReplyAlertMessageResponse ¶
type SendReplyAlertMessageResponse struct {
MessageId int
}
type Service ¶
type Service interface { SendAlert(ctx context.Context, chatId uint32, message string) error SendAlertWithReply(ctx context.Context, chatId uint32, message string, correlationId string) (int, error) SendImageToAlertGroup(ctx context.Context, chatid uint32, image []byte) error SendDocumentToAlertGroup(ctx context.Context, chatid uint32, document []byte, extension string) error SendError(ctx context.Context, err error) error SendErrorImage(ctx context.Context, image []byte) error GetReplies(ctx context.Context, chatId uint32) ([]telegram.Replies, error) DeleteReply(ctx context.Context, chatId uint32, messageId string) error }
Service interface