Initial cloud-services repo - gateway service + pkg modules
This commit is contained in:
33
pkg/db/queries/mocks/sums_versions.go
Normal file
33
pkg/db/queries/mocks/sums_versions.go
Normal file
@@ -0,0 +1,33 @@
|
||||
package mocks
|
||||
|
||||
import (
|
||||
"fiskerinc.com/modules/common"
|
||||
"fiskerinc.com/modules/db/queries"
|
||||
"github.com/go-pg/pg/v10/orm"
|
||||
)
|
||||
|
||||
type MockUpdateManifestVersions struct {
|
||||
queries.QueryBase
|
||||
SelectResponse []common.SUMSVersion
|
||||
DBMockHelper
|
||||
}
|
||||
|
||||
func (m *MockUpdateManifestVersions) SelectAll(options *queries.PageQueryOptions) ([]common.SUMSVersion, error) {
|
||||
return m.SelectResponse, nil
|
||||
}
|
||||
|
||||
func (m *MockUpdateManifestVersions) SelectAllCount() (int, error) {
|
||||
return len(m.SelectResponse), nil
|
||||
}
|
||||
|
||||
func (m *MockUpdateManifestVersions) Insert(u *common.SUMSVersion) (orm.Result, error) {
|
||||
return m.ORMResponse, nil
|
||||
}
|
||||
|
||||
func (m *MockUpdateManifestVersions) Delete(u *common.SUMSVersion) (orm.Result, error) {
|
||||
return m.ORMResponse, nil
|
||||
}
|
||||
|
||||
func (m *MockUpdateManifestVersions) Select(version string) (*common.SUMSVersion, error) {
|
||||
return nil, nil
|
||||
}
|
||||
Reference in New Issue
Block a user