1// Code generated by mockery; DO NOT EDIT.
2// github.com/vektra/mockery
3// template: testify
4
5package mocks
6
7import (
8 "context"
9
10 mock "github.com/stretchr/testify/mock"
11)
12
13// NewMockSecretWriter creates a new instance of MockSecretWriter. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
14// The first argument is typically a *testing.T value.
15func NewMockSecretWriter(t interface {
16 mock.TestingT
17 Cleanup(func())
18}) *MockSecretWriter {
19 if helper, ok := t.(interface{ Helper() }); ok {
20 helper.Helper()
21 }
22
23 mock := &MockSecretWriter{}
24 mock.Mock.Test(t)
25
26 t.Cleanup(func() {
27 if helper, ok := t.(interface{ Helper() }); ok {
28 helper.Helper()
29 }
30 mock.AssertExpectations(t)
31 })
32
33 return mock
34}
35
36// MockSecretWriter is an autogenerated mock type for the SecretWriter type
37type MockSecretWriter struct {
38 mock.Mock
39}
40
41type MockSecretWriter_Expecter struct {
42 mock *mock.Mock
43}
44
45func (_m *MockSecretWriter) EXPECT() *MockSecretWriter_Expecter {
46 return &MockSecretWriter_Expecter{mock: &_m.Mock}
47}
48
49// DeleteSecret provides a mock function for the type MockSecretWriter
50func (_mock *MockSecretWriter) DeleteSecret(ctx context.Context, path string) error {
51 ret := _mock.Called(ctx, path)
52
53 if len(ret) == 0 {
54 panic("no return value specified for DeleteSecret")
55 }
56
57 var r0 error
58 if returnFunc, ok := ret.Get(0).(func(context.Context, string) error); ok {
59 r0 = returnFunc(ctx, path)
60 } else {
61 r0 = ret.Error(0)
62 }
63 return r0
64}
65
66// MockSecretWriter_DeleteSecret_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteSecret'
67type MockSecretWriter_DeleteSecret_Call struct {
68 *mock.Call
69}
70
71// DeleteSecret is a helper method to define mock.On call
72// - ctx context.Context
73// - path string
74func (_e *MockSecretWriter_Expecter) DeleteSecret(ctx any, path any) *MockSecretWriter_DeleteSecret_Call {
75 return &MockSecretWriter_DeleteSecret_Call{Call: _e.mock.On("DeleteSecret", ctx, path)}
76}
77
78func (_c *MockSecretWriter_DeleteSecret_Call) Run(run func(ctx context.Context, path string)) *MockSecretWriter_DeleteSecret_Call {
79 _c.Call.Run(func(args mock.Arguments) {
80 var arg0 context.Context
81 if args[0] != nil {
82 arg0 = args[0].(context.Context)
83 }
84 var arg1 string
85 if args[1] != nil {
86 arg1 = args[1].(string)
87 }
88 run(
89 arg0,
90 arg1,
91 )
92 })
93 return _c
94}
95
96func (_c *MockSecretWriter_DeleteSecret_Call) Return(err error) *MockSecretWriter_DeleteSecret_Call {
97 _c.Call.Return(err)
98 return _c
99}
100
101func (_c *MockSecretWriter_DeleteSecret_Call) RunAndReturn(run func(ctx context.Context, path string) error) *MockSecretWriter_DeleteSecret_Call {
102 _c.Call.Return(run)
103 return _c
104}
105
106// SetSecret provides a mock function for the type MockSecretWriter
107func (_mock *MockSecretWriter) SetSecret(ctx context.Context, path string, value string) error {
108 ret := _mock.Called(ctx, path, value)
109
110 if len(ret) == 0 {
111 panic("no return value specified for SetSecret")
112 }
113
114 var r0 error
115 if returnFunc, ok := ret.Get(0).(func(context.Context, string, string) error); ok {
116 r0 = returnFunc(ctx, path, value)
117 } else {
118 r0 = ret.Error(0)
119 }
120 return r0
121}
122
123// MockSecretWriter_SetSecret_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetSecret'
124type MockSecretWriter_SetSecret_Call struct {
125 *mock.Call
126}
127
128// SetSecret is a helper method to define mock.On call
129// - ctx context.Context
130// - path string
131// - value string
132func (_e *MockSecretWriter_Expecter) SetSecret(ctx any, path any, value any) *MockSecretWriter_SetSecret_Call {
133 return &MockSecretWriter_SetSecret_Call{Call: _e.mock.On("SetSecret", ctx, path, value)}
134}
135
136func (_c *MockSecretWriter_SetSecret_Call) Run(run func(ctx context.Context, path string, value string)) *MockSecretWriter_SetSecret_Call {
137 _c.Call.Run(func(args mock.Arguments) {
138 var arg0 context.Context
139 if args[0] != nil {
140 arg0 = args[0].(context.Context)
141 }
142 var arg1 string
143 if args[1] != nil {
144 arg1 = args[1].(string)
145 }
146 var arg2 string
147 if args[2] != nil {
148 arg2 = args[2].(string)
149 }
150 run(
151 arg0,
152 arg1,
153 arg2,
154 )
155 })
156 return _c
157}
158
159func (_c *MockSecretWriter_SetSecret_Call) Return(err error) *MockSecretWriter_SetSecret_Call {
160 _c.Call.Return(err)
161 return _c
162}
163
164func (_c *MockSecretWriter_SetSecret_Call) RunAndReturn(run func(ctx context.Context, path string, value string) error) *MockSecretWriter_SetSecret_Call {
165 _c.Call.Return(run)
166 return _c
167}