Documentation ¶
Overview ¶
Package callout provides a mechanism to invoke various different forms of callout depending on the services linked when creating the service.
Package callout is a generated GoMock package.
Package callout is a generated GoMock package.
Index ¶
- func MakeHandler(service Service, logger kitlog.Logger, ml machineLearning.Service) http.Handler
- func NewAckCommand(alert alert.Service, telegram telegram.Store, store Store) telegram.Command
- type MockService
- type MockServiceMockRecorder
- type MockStore
- type MockStoreMockRecorder
- type SendCalloutRequest
- type Service
- type Store
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MakeHandler ¶
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) EXPECT ¶
func (m *MockService) EXPECT() *MockServiceMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
func (*MockService) InvokeCallout ¶
func (m *MockService) InvokeCallout(ctx context.Context, chat uint32, title, message string, ack bool) error
InvokeCallout mocks base method
type MockServiceMockRecorder ¶
type MockServiceMockRecorder struct {
// contains filtered or unexported fields
}
MockServiceMockRecorder is the mock recorder for MockService
func (*MockServiceMockRecorder) InvokeCallout ¶
func (mr *MockServiceMockRecorder) InvokeCallout(ctx, chat, title, message, ack interface{}) *gomock.Call
InvokeCallout indicates an expected call of InvokeCallout
type MockStore ¶
type MockStore struct {
// contains filtered or unexported fields
}
MockStore is a mock of Store interface
func NewMockStore ¶
func NewMockStore(ctrl *gomock.Controller) *MockStore
NewMockStore creates a new mock instance
func (*MockStore) EXPECT ¶
func (m *MockStore) EXPECT() *MockStoreMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
type MockStoreMockRecorder ¶
type MockStoreMockRecorder struct {
// contains filtered or unexported fields
}
MockStoreMockRecorder is the mock recorder for MockStore
func (*MockStoreMockRecorder) AddAck ¶
func (mr *MockStoreMockRecorder) AddAck(fields, chat, phone, name interface{}) *gomock.Call
AddAck indicates an expected call of AddAck
func (*MockStoreMockRecorder) Bump ¶
func (mr *MockStoreMockRecorder) Bump(chat interface{}) *gomock.Call
Bump indicates an expected call of Bump
func (*MockStoreMockRecorder) DeleteAck ¶
func (mr *MockStoreMockRecorder) DeleteAck(chat interface{}) *gomock.Call
DeleteAck indicates an expected call of DeleteAck
type SendCalloutRequest ¶
type SendCalloutRequest struct { // Title for the JIRA ticket // // required: true Title string `json:"title"` // Message that will be used for the Telegram Alert, the Jira Ticket and the Alexa Callout // // required: true Message string `json:"message"` // RequireAcknowledge when set to true, will require the user to /ack the call on telegram. RequireAcknowledge bool `json:"require_acknowledge"` }
Callout Request
swagger:model
type Service ¶
type Service interface { //InvokeCallout will invoke snmp if configured, then create a jira ticket if configured. InvokeCallout(ctx context.Context, chat uint32, title, message string, ack bool) error }
Service interface for the Callout Service
func NewInstrumentService ¶
func NewService ¶
func NewService(alert alert.Service, firstcall firstCall.Service, snmp snmp.Service, jira jira.Service, alexa halaws.Service, store Store) Service
NewService creates a new Callout Service. Parameters can be passed in as Nil should they not be required. any items that are nil will simply not be invoked.