cloudfoundry-incubator/stratos

View on GitHub
src/jetstream/repository/apikeys/mock_apikeys.go

Summary

Maintainability
A
0 mins
Test Coverage
// Code generated by MockGen. DO NOT EDIT.
// Source: apikeys.go

// Package apikeys is a generated GoMock package.
package apikeys

import (
    interfaces "github.com/cloudfoundry-incubator/stratos/src/jetstream/repository/interfaces"
    gomock "github.com/golang/mock/gomock"
    reflect "reflect"
)

// MockRepository is a mock of Repository interface
type MockRepository struct {
    ctrl     *gomock.Controller
    recorder *MockRepositoryMockRecorder
}

// MockRepositoryMockRecorder is the mock recorder for MockRepository
type MockRepositoryMockRecorder struct {
    mock *MockRepository
}

// NewMockRepository creates a new mock instance
func NewMockRepository(ctrl *gomock.Controller) *MockRepository {
    mock := &MockRepository{ctrl: ctrl}
    mock.recorder = &MockRepositoryMockRecorder{mock}
    return mock
}

// EXPECT returns an object that allows the caller to indicate expected use
func (m *MockRepository) EXPECT() *MockRepositoryMockRecorder {
    return m.recorder
}

// AddAPIKey mocks base method
func (m *MockRepository) AddAPIKey(userID, comment string) (*interfaces.APIKey, error) {
    m.ctrl.T.Helper()
    ret := m.ctrl.Call(m, "AddAPIKey", userID, comment)
    ret0, _ := ret[0].(*interfaces.APIKey)
    ret1, _ := ret[1].(error)
    return ret0, ret1
}

// AddAPIKey indicates an expected call of AddAPIKey
func (mr *MockRepositoryMockRecorder) AddAPIKey(userID, comment interface{}) *gomock.Call {
    mr.mock.ctrl.T.Helper()
    return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddAPIKey", reflect.TypeOf((*MockRepository)(nil).AddAPIKey), userID, comment)
}

// GetAPIKeyBySecret mocks base method
func (m *MockRepository) GetAPIKeyBySecret(keySecret string) (*interfaces.APIKey, error) {
    m.ctrl.T.Helper()
    ret := m.ctrl.Call(m, "GetAPIKeyBySecret", keySecret)
    ret0, _ := ret[0].(*interfaces.APIKey)
    ret1, _ := ret[1].(error)
    return ret0, ret1
}

// GetAPIKeyBySecret indicates an expected call of GetAPIKeyBySecret
func (mr *MockRepositoryMockRecorder) GetAPIKeyBySecret(keySecret interface{}) *gomock.Call {
    mr.mock.ctrl.T.Helper()
    return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAPIKeyBySecret", reflect.TypeOf((*MockRepository)(nil).GetAPIKeyBySecret), keySecret)
}

// ListAPIKeys mocks base method
func (m *MockRepository) ListAPIKeys(userID string) ([]interfaces.APIKey, error) {
    m.ctrl.T.Helper()
    ret := m.ctrl.Call(m, "ListAPIKeys", userID)
    ret0, _ := ret[0].([]interfaces.APIKey)
    ret1, _ := ret[1].(error)
    return ret0, ret1
}

// ListAPIKeys indicates an expected call of ListAPIKeys
func (mr *MockRepositoryMockRecorder) ListAPIKeys(userID interface{}) *gomock.Call {
    mr.mock.ctrl.T.Helper()
    return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListAPIKeys", reflect.TypeOf((*MockRepository)(nil).ListAPIKeys), userID)
}

// DeleteAPIKey mocks base method
func (m *MockRepository) DeleteAPIKey(userGUID, keyGUID string) error {
    m.ctrl.T.Helper()
    ret := m.ctrl.Call(m, "DeleteAPIKey", userGUID, keyGUID)
    ret0, _ := ret[0].(error)
    return ret0
}

// DeleteAPIKey indicates an expected call of DeleteAPIKey
func (mr *MockRepositoryMockRecorder) DeleteAPIKey(userGUID, keyGUID interface{}) *gomock.Call {
    mr.mock.ctrl.T.Helper()
    return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteAPIKey", reflect.TypeOf((*MockRepository)(nil).DeleteAPIKey), userGUID, keyGUID)
}

// UpdateAPIKeyLastUsed mocks base method
func (m *MockRepository) UpdateAPIKeyLastUsed(keyGUID string) error {
    m.ctrl.T.Helper()
    ret := m.ctrl.Call(m, "UpdateAPIKeyLastUsed", keyGUID)
    ret0, _ := ret[0].(error)
    return ret0
}

// UpdateAPIKeyLastUsed indicates an expected call of UpdateAPIKeyLastUsed
func (mr *MockRepositoryMockRecorder) UpdateAPIKeyLastUsed(keyGUID interface{}) *gomock.Call {
    mr.mock.ctrl.T.Helper()
    return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateAPIKeyLastUsed", reflect.TypeOf((*MockRepository)(nil).UpdateAPIKeyLastUsed), keyGUID)
}