firstCall

package
v0.0.0-...-fb315dc Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 5, 2019 License: MIT Imports: 21 Imported by: 4

Documentation

Overview

Package firstcall is a generated GoMock package.

Index

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.

func NewWhosOnFirstCallCommand

func NewWhosOnFirstCallCommand(alert alert.Service, telegram telegram.Service, service Service, store telegram.Store) telegram.Command

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 DefaultCalloutRequest

type DefaultCalloutRequest struct {
	PhoneNumber string
}

swagger:model

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

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

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) Escalate

func (m *MockService) Escalate(ctx context.Context, chat uint32, count int) (string, string, error)

Escalate mocks base method

func (*MockService) GetFirstCall

func (m *MockService) GetFirstCall(ctx context.Context, chat uint32) (string, string, error)

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL