45 lines
1.2 KiB
Go
45 lines
1.2 KiB
Go
package mocks
|
|
|
|
import (
|
|
"github.com/go-pg/pg/v10/orm"
|
|
|
|
"github.com/fiskerinc/cloud-services/pkg/common"
|
|
)
|
|
|
|
// EccKey query methods
|
|
type MockSignedImages struct {
|
|
DBMockHelper
|
|
MockListResponse []common.SignedImage
|
|
MockSignedImage common.SignedImage
|
|
GetSigningCertResponse common.SupplierSigningCert
|
|
GetSigningCertErr error
|
|
}
|
|
|
|
func (si *MockSignedImages) Insert(keys common.SignedImage) (orm.Result, error) {
|
|
return si.ORMResponse, si.Error
|
|
}
|
|
|
|
func (si *MockSignedImages) SelectAll() ([]common.SignedImage, error) {
|
|
return si.MockListResponse, si.Error
|
|
}
|
|
|
|
func (si *MockSignedImages) SelectBySupplier(email string) (common.SignedImage, error) {
|
|
return si.MockSignedImage, si.Error
|
|
}
|
|
|
|
func (si *MockSignedImages) DeleteSigningCert(supplier_cert common.SupplierSigningCert) (orm.Result, error) {
|
|
return si.ORMResponse, si.Error
|
|
}
|
|
|
|
func (si *MockSignedImages) GetSigningCert(supplier string, keyCert string) (common.SupplierSigningCert, error) {
|
|
return si.GetSigningCertResponse, si.GetSigningCertErr
|
|
}
|
|
|
|
func (si *MockSignedImages) InsertSigningCert(supplier_cert common.SupplierSigningCert) (orm.Result, error) {
|
|
return si.ORMResponse, si.Error
|
|
}
|
|
|
|
func (si *MockSignedImages) SetListResp(list interface{}) {
|
|
|
|
}
|