Documentation ¶
Overview ¶
Package firstcall is a generated GoMock package.
Index ¶
- func MakeHandler(service CalloutFunction, logger kitlog.Logger, ml machineLearning.Service) http.Handler
- func NewWhosOnFirstCallCommand(alert alert.Service, telegram telegram.Service, service Service, ...) telegram.Command
- type CalloutFunction
- type DefaultCalloutRequest
- type DefaultCalloutService
- type MockCalloutFunction
- func (m *MockCalloutFunction) Configured(chat uint32) bool
- func (m *MockCalloutFunction) EXPECT() *MockCalloutFunctionMockRecorder
- func (m *MockCalloutFunction) Escalate(ctx context.Context, count int, chat uint32) (string, string, error)
- func (m *MockCalloutFunction) GetFirstCallDetails(ctx context.Context, chat uint32) (string, string, error)
- type MockCalloutFunctionMockRecorder
- type MockDefaultCalloutService
- type MockDefaultCalloutServiceMockRecorder
- type MockService
- func (m *MockService) AddCalloutFunc(function CalloutFunction)
- func (m *MockService) EXPECT() *MockServiceMockRecorder
- func (m *MockService) Escalate(ctx context.Context, chat uint32, count int) (string, string, error)
- func (m *MockService) GetFirstCall(ctx context.Context, chat uint32) (string, string, error)
- func (m *MockService) IsConfigured(chat uint32) bool
- type MockServiceMockRecorder
- func (mr *MockServiceMockRecorder) AddCalloutFunc(function interface{}) *gomock.Call
- func (mr *MockServiceMockRecorder) Escalate(ctx, chat, count interface{}) *gomock.Call
- func (mr *MockServiceMockRecorder) GetFirstCall(ctx, chat interface{}) *gomock.Call
- func (mr *MockServiceMockRecorder) IsConfigured(chat interface{}) *gomock.Call
- type Service
- type Store
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MakeHandler ¶
func MakeHandler(service CalloutFunction, logger kitlog.Logger, ml machineLearning.Service) http.Handler
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 CalloutFunction ¶
type CalloutFunction interface { GetFirstCallDetails(ctx context.Context, chat uint32) (name string, number string, err error) Escalate(ctx context.Context, count int, chat uint32) (name string, number string, err error) Configured(chat uint32) bool }
func NewDefaultFirstcallService ¶
func NewDefaultFirstcallService(store Store, service alert.Service) CalloutFunction
type DefaultCalloutService ¶
type DefaultCalloutService interface {
// contains filtered or unexported methods
}
-----
type MockCalloutFunction ¶
type MockCalloutFunction struct {
// contains filtered or unexported fields
}
MockCalloutFunction is a mock of CalloutFunction interface
func NewMockCalloutFunction ¶
func NewMockCalloutFunction(ctrl *gomock.Controller) *MockCalloutFunction
NewMockCalloutFunction creates a new mock instance
func (*MockCalloutFunction) Configured ¶
func (m *MockCalloutFunction) Configured(chat uint32) bool
Configured mocks base method
func (*MockCalloutFunction) EXPECT ¶
func (m *MockCalloutFunction) EXPECT() *MockCalloutFunctionMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
func (*MockCalloutFunction) Escalate ¶
func (m *MockCalloutFunction) Escalate(ctx context.Context, count int, chat uint32) (string, string, error)
Escalate mocks base method
func (*MockCalloutFunction) GetFirstCallDetails ¶
func (m *MockCalloutFunction) GetFirstCallDetails(ctx context.Context, chat uint32) (string, string, error)
GetFirstCallDetails mocks base method
type MockCalloutFunctionMockRecorder ¶
type MockCalloutFunctionMockRecorder struct {
// contains filtered or unexported fields
}
MockCalloutFunctionMockRecorder is the mock recorder for MockCalloutFunction
func (*MockCalloutFunctionMockRecorder) Configured ¶
func (mr *MockCalloutFunctionMockRecorder) Configured(chat interface{}) *gomock.Call
Configured indicates an expected call of Configured
func (*MockCalloutFunctionMockRecorder) Escalate ¶
func (mr *MockCalloutFunctionMockRecorder) Escalate(ctx, count, chat interface{}) *gomock.Call
Escalate indicates an expected call of Escalate
func (*MockCalloutFunctionMockRecorder) GetFirstCallDetails ¶
func (mr *MockCalloutFunctionMockRecorder) GetFirstCallDetails(ctx, chat interface{}) *gomock.Call
GetFirstCallDetails indicates an expected call of GetFirstCallDetails
type MockDefaultCalloutService ¶
type MockDefaultCalloutService struct {
// contains filtered or unexported fields
}
MockDefaultCalloutService is a mock of DefaultCalloutService interface
func NewMockDefaultCalloutService ¶
func NewMockDefaultCalloutService(ctrl *gomock.Controller) *MockDefaultCalloutService
NewMockDefaultCalloutService creates a new mock instance
func (*MockDefaultCalloutService) EXPECT ¶
func (m *MockDefaultCalloutService) EXPECT() *MockDefaultCalloutServiceMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
type MockDefaultCalloutServiceMockRecorder ¶
type MockDefaultCalloutServiceMockRecorder struct {
// contains filtered or unexported fields
}
MockDefaultCalloutServiceMockRecorder is the mock recorder for MockDefaultCalloutService
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) AddCalloutFunc ¶
func (m *MockService) AddCalloutFunc(function CalloutFunction)
AddCalloutFunc 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) GetFirstCall ¶
GetFirstCall mocks base method
func (*MockService) IsConfigured ¶
func (m *MockService) IsConfigured(chat uint32) bool
IsConfigured mocks base method
type MockServiceMockRecorder ¶
type MockServiceMockRecorder struct {
// contains filtered or unexported fields
}
MockServiceMockRecorder is the mock recorder for MockService
func (*MockServiceMockRecorder) AddCalloutFunc ¶
func (mr *MockServiceMockRecorder) AddCalloutFunc(function interface{}) *gomock.Call
AddCalloutFunc indicates an expected call of AddCalloutFunc
func (*MockServiceMockRecorder) Escalate ¶
func (mr *MockServiceMockRecorder) Escalate(ctx, chat, count interface{}) *gomock.Call
Escalate indicates an expected call of Escalate
func (*MockServiceMockRecorder) GetFirstCall ¶
func (mr *MockServiceMockRecorder) GetFirstCall(ctx, chat interface{}) *gomock.Call
GetFirstCall indicates an expected call of GetFirstCall
func (*MockServiceMockRecorder) IsConfigured ¶
func (mr *MockServiceMockRecorder) IsConfigured(chat interface{}) *gomock.Call
IsConfigured indicates an expected call of IsConfigured
type Service ¶
type Service interface { GetFirstCall(ctx context.Context, chat uint32) (name string, number string, err error) AddCalloutFunc(function CalloutFunction) IsConfigured(chat uint32) bool Escalate(ctx context.Context, chat uint32, count int) (name string, number string, err error) }
func NewCalloutService ¶
func NewCalloutService() Service
type Store ¶
type Store interface {
// contains filtered or unexported methods
}
func NewMongoStore ¶
func NewMongoStore(db *mgo.Database) Store