Initial cloud-services repo - gateway service + pkg modules

This commit is contained in:
Chris Rai
2026-01-30 23:14:52 -05:00
commit fbb820d7b3
1037 changed files with 171318 additions and 0 deletions

View File

@@ -0,0 +1,30 @@
package mocks
import (
"fiskerinc.com/modules/common"
"fiskerinc.com/modules/db/queries"
"github.com/go-pg/pg/v10/orm"
)
type MockEcuDtc struct {
DBMockHelper
SelectDTCECUResponse []common.DTC_ECU
LastInsertCount int
}
func (c *MockEcuDtc) Insert(ecudtc *[]common.DTC_ECU) (orm.Result, error) {
c.LastInsertCount = len(*ecudtc)
return c.ORMResponse, c.Error
}
func (c *MockEcuDtc) UpdateTimestamp(dtc *common.DTC_ECU) error {
return c.Error
}
func (c *MockEcuDtc) Select(ecudtc common.DTC_ECUQuery, paging *queries.PageQueryOptions) ([]common.DTC_ECU, error) {
return c.SelectDTCECUResponse, c.Error
}
func (c *MockEcuDtc) Count(filter common.DTC_ECUQuery) (int, error) {
return 0, c.Error
}