/
ModificationStrategy.go
85 lines (67 loc) · 2.59 KB
/
ModificationStrategy.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
// Code generated by mockery v1.0.0. DO NOT EDIT.
package mocks
import (
apperrors "github.com/kyma-project/kyma/components/application-registry/internal/apperrors"
applications "github.com/kyma-project/kyma/components/application-registry/internal/metadata/applications"
mock "github.com/stretchr/testify/mock"
model "github.com/kyma-project/kyma/components/application-registry/internal/metadata/model"
strategy "github.com/kyma-project/kyma/components/application-registry/internal/metadata/secrets/strategy"
)
// ModificationStrategy is an autogenerated mock type for the ModificationStrategy type
type ModificationStrategy struct {
mock.Mock
}
// CreateSecretData provides a mock function with given fields: credentials
func (_m *ModificationStrategy) CreateSecretData(credentials *model.CredentialsWithCSRF) (strategy.SecretData, apperrors.AppError) {
ret := _m.Called(credentials)
var r0 strategy.SecretData
if rf, ok := ret.Get(0).(func(*model.CredentialsWithCSRF) strategy.SecretData); ok {
r0 = rf(credentials)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(strategy.SecretData)
}
}
var r1 apperrors.AppError
if rf, ok := ret.Get(1).(func(*model.CredentialsWithCSRF) apperrors.AppError); ok {
r1 = rf(credentials)
} else {
if ret.Get(1) != nil {
r1 = ret.Get(1).(apperrors.AppError)
}
}
return r0, r1
}
// CredentialsProvided provides a mock function with given fields: credentials
func (_m *ModificationStrategy) CredentialsProvided(credentials *model.CredentialsWithCSRF) bool {
ret := _m.Called(credentials)
var r0 bool
if rf, ok := ret.Get(0).(func(*model.CredentialsWithCSRF) bool); ok {
r0 = rf(credentials)
} else {
r0 = ret.Get(0).(bool)
}
return r0
}
// ShouldUpdate provides a mock function with given fields: currentData, newData
func (_m *ModificationStrategy) ShouldUpdate(currentData strategy.SecretData, newData strategy.SecretData) bool {
ret := _m.Called(currentData, newData)
var r0 bool
if rf, ok := ret.Get(0).(func(strategy.SecretData, strategy.SecretData) bool); ok {
r0 = rf(currentData, newData)
} else {
r0 = ret.Get(0).(bool)
}
return r0
}
// ToCredentialsInfo provides a mock function with given fields: credentials, secretName
func (_m *ModificationStrategy) ToCredentialsInfo(credentials *model.CredentialsWithCSRF, secretName string) applications.Credentials {
ret := _m.Called(credentials, secretName)
var r0 applications.Credentials
if rf, ok := ret.Get(0).(func(*model.CredentialsWithCSRF, string) applications.Credentials); ok {
r0 = rf(credentials, secretName)
} else {
r0 = ret.Get(0).(applications.Credentials)
}
return r0
}