21 lines
595 B
Go
21 lines
595 B
Go
package mocks
|
|
|
|
import (
|
|
"github.com/fiskerinc/cloud-services/pkg/common"
|
|
"github.com/fiskerinc/cloud-services/pkg/db/queries"
|
|
"github.com/go-pg/pg/v10/orm"
|
|
)
|
|
|
|
type MockAPICalls struct {
|
|
SearchMock func(filter common.APICallsSearch, paging *queries.PageQueryOptions) ([]common.APICall, int, error)
|
|
DBMockHelper
|
|
}
|
|
|
|
func (m *MockAPICalls) Insert(keyValue common.APICall) (orm.Result, error) {
|
|
return m.ORMResponse, m.Error
|
|
}
|
|
|
|
func (m *MockAPICalls) Search(filter common.APICallsSearch, paging *queries.PageQueryOptions) ([]common.APICall, int, error) {
|
|
return m.SearchMock(filter, paging)
|
|
}
|