Documentation
¶
Overview ¶
Package user is a generated GoMock package.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MakeHandler ¶
MakeHandler returns a HTTP Restul endpoint to handle user requests
Types ¶
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) AddUpdateUser ¶
AddUpdateUser mocks base method
func (*MockStore) EXPECT ¶
func (m *MockStore) EXPECT() *MockStoreMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
func (*MockStore) FindUserByCalloutName ¶
FindUserByCalloutName mocks base method
type MockStoreMockRecorder ¶
type MockStoreMockRecorder struct {
// contains filtered or unexported fields
}
MockStoreMockRecorder is the mock recorder for MockStore
func (*MockStoreMockRecorder) AddUpdateUser ¶
func (mr *MockStoreMockRecorder) AddUpdateUser(employeeNumber, CalloutName, JiraName interface{}) *gomock.Call
AddUpdateUser indicates an expected call of AddUpdateUser
func (*MockStoreMockRecorder) FindUserByCalloutName ¶
func (mr *MockStoreMockRecorder) FindUserByCalloutName(name interface{}) *gomock.Call
FindUserByCalloutName indicates an expected call of FindUserByCalloutName
type Service ¶
type Service interface {
// contains filtered or unexported methods
}
Service interface to mamage users on HAL
func NewInstrumentService ¶
func NewInstrumentService(counter metrics.Counter, errorCount metrics.Counter, latency metrics.Histogram, s Service) Service
NewInstrumentService creates a prometheus service that will log request count, error count and latency
func NewLoggingService ¶
NewLoggingService creates a loggng service to log the request and response from the service
type Store ¶
type Store interface { /* AddUpdateUser will verify if the employee number already exists in the DB. If it does, its updated, else added */ AddUpdateUser(employeeNumber, CalloutName, JiraName string) /* FindUserByCalloutName Return a user whos details matches the callout */ FindUserByCalloutName(name string) User }
func NewMongoStore ¶
func NewMongoStore(db *mgo.Database) Store