pushremoteref.go 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. // Code generated by counterfeiter. DO NOT EDIT.
  2. package fakes
  3. import (
  4. "sync"
  5. "github.com/external-secrets/external-secrets/apis/externalsecrets/v1"
  6. )
  7. type PushRemoteRef struct {
  8. GetRemoteKeyStub func() string
  9. getRemoteKeyMutex sync.RWMutex
  10. getRemoteKeyArgsForCall []struct {
  11. }
  12. getRemoteKeyReturns struct {
  13. result1 string
  14. }
  15. getRemoteKeyReturnsOnCall map[int]struct {
  16. result1 string
  17. }
  18. invocations map[string][][]any
  19. invocationsMutex sync.RWMutex
  20. }
  21. func (fake *PushRemoteRef) GetRemoteKey() string {
  22. fake.getRemoteKeyMutex.Lock()
  23. ret, specificReturn := fake.getRemoteKeyReturnsOnCall[len(fake.getRemoteKeyArgsForCall)]
  24. fake.getRemoteKeyArgsForCall = append(fake.getRemoteKeyArgsForCall, struct {
  25. }{})
  26. stub := fake.GetRemoteKeyStub
  27. fakeReturns := fake.getRemoteKeyReturns
  28. fake.recordInvocation("GetRemoteKey", []any{})
  29. fake.getRemoteKeyMutex.Unlock()
  30. if stub != nil {
  31. return stub()
  32. }
  33. if specificReturn {
  34. return ret.result1
  35. }
  36. return fakeReturns.result1
  37. }
  38. func (fake *PushRemoteRef) GetProperty() string {
  39. return ""
  40. }
  41. func (fake *PushRemoteRef) GetRemoteKeyCallCount() int {
  42. fake.getRemoteKeyMutex.RLock()
  43. defer fake.getRemoteKeyMutex.RUnlock()
  44. return len(fake.getRemoteKeyArgsForCall)
  45. }
  46. func (fake *PushRemoteRef) GetRemoteKeyCalls(stub func() string) {
  47. fake.getRemoteKeyMutex.Lock()
  48. defer fake.getRemoteKeyMutex.Unlock()
  49. fake.GetRemoteKeyStub = stub
  50. }
  51. func (fake *PushRemoteRef) GetRemoteKeyReturns(result1 string) {
  52. fake.getRemoteKeyMutex.Lock()
  53. defer fake.getRemoteKeyMutex.Unlock()
  54. fake.GetRemoteKeyStub = nil
  55. fake.getRemoteKeyReturns = struct {
  56. result1 string
  57. }{result1}
  58. }
  59. func (fake *PushRemoteRef) GetRemoteKeyReturnsOnCall(i int, result1 string) {
  60. fake.getRemoteKeyMutex.Lock()
  61. defer fake.getRemoteKeyMutex.Unlock()
  62. fake.GetRemoteKeyStub = nil
  63. if fake.getRemoteKeyReturnsOnCall == nil {
  64. fake.getRemoteKeyReturnsOnCall = make(map[int]struct {
  65. result1 string
  66. })
  67. }
  68. fake.getRemoteKeyReturnsOnCall[i] = struct {
  69. result1 string
  70. }{result1}
  71. }
  72. func (fake *PushRemoteRef) Invocations() map[string][][]any {
  73. fake.invocationsMutex.RLock()
  74. defer fake.invocationsMutex.RUnlock()
  75. fake.getRemoteKeyMutex.RLock()
  76. defer fake.getRemoteKeyMutex.RUnlock()
  77. copiedInvocations := map[string][][]any{}
  78. for key, value := range fake.invocations {
  79. copiedInvocations[key] = value
  80. }
  81. return copiedInvocations
  82. }
  83. func (fake *PushRemoteRef) recordInvocation(key string, args []any) {
  84. fake.invocationsMutex.Lock()
  85. defer fake.invocationsMutex.Unlock()
  86. if fake.invocations == nil {
  87. fake.invocations = map[string][][]any{}
  88. }
  89. if fake.invocations[key] == nil {
  90. fake.invocations[key] = [][]any{}
  91. }
  92. fake.invocations[key] = append(fake.invocations[key], args)
  93. }
  94. var _ v1.PushSecretRemoteRef = new(PushRemoteRef)