Documentation ¶
Overview ¶
Package machineLearning is a generated GoMock package.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
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) 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) SaveAction ¶
func (mr *MockStoreMockRecorder) SaveAction(requestID, action, date, fields interface{}) *gomock.Call
SaveAction indicates an expected call of SaveAction
func (*MockStoreMockRecorder) SaveInputRecord ¶
func (mr *MockStoreMockRecorder) SaveInputRecord(reqType, date, fields interface{}) *gomock.Call
SaveInputRecord indicates an expected call of SaveInputRecord
type Service ¶
type Service interface { StoreHTTPRequest(ctx context.Context, request *http.Request) context.Context StoreAction(ctx context.Context, action string, fields map[string]interface{}) }
Service forms the basis to build a machine learning data set.
The idea is to log all automated requests into the system and correlate them with actions taken by HAL. Doing so, we will have a link between request and response for audit purposes, however the plan is to use the data to try and implement some machine learning, where we can teach HAL what actions to take based on input.
func NewService ¶
NewService returns a new Machine Learning Service.
type Store ¶
type Store interface { SaveInputRecord(reqType string, date time.Time, fields map[string]interface{}) string SaveAction(requestID string, action string, date time.Time, fields map[string]interface{}) }
Store will save the Machine Learning information to a database
func NewMongoStore ¶
func NewMongoStore(db *mgo.Database) Store
NewMongoStore will return a mongo store service to be able to store Machine Learning information to a Mongo Database