-
Notifications
You must be signed in to change notification settings - Fork 0
/
vault-client.go
108 lines (86 loc) · 2.66 KB
/
vault-client.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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
// Code generated by mockery v2.13.1. DO NOT EDIT.
package mocks
import mock "github.com/stretchr/testify/mock"
// Client is an autogenerated mock type for the Client type
type Client struct {
mock.Mock
}
// Get provides a mock function with given fields: kvMountPath, secretePath
func (_m *Client) Get(kvMountPath string, secretePath string) (map[string]interface{}, error) {
ret := _m.Called(kvMountPath, secretePath)
var r0 map[string]interface{}
if rf, ok := ret.Get(0).(func(string, string) map[string]interface{}); ok {
r0 = rf(kvMountPath, secretePath)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(map[string]interface{})
}
}
var r1 error
if rf, ok := ret.Get(1).(func(string, string) error); ok {
r1 = rf(kvMountPath, secretePath)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// Put provides a mock function with given fields: kvMountPath, secretePath, data
func (_m *Client) Put(kvMountPath string, secretePath string, data map[string]interface{}) error {
ret := _m.Called(kvMountPath, secretePath, data)
var r0 error
if rf, ok := ret.Get(0).(func(string, string, map[string]interface{}) error); ok {
r0 = rf(kvMountPath, secretePath, data)
} else {
r0 = ret.Error(0)
}
return r0
}
// Read provides a mock function with given fields: path
func (_m *Client) Read(path string) (map[string]interface{}, error) {
ret := _m.Called(path)
var r0 map[string]interface{}
if rf, ok := ret.Get(0).(func(string) map[string]interface{}); ok {
r0 = rf(path)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(map[string]interface{})
}
}
var r1 error
if rf, ok := ret.Get(1).(func(string) error); ok {
r1 = rf(path)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// Write provides a mock function with given fields: path, data
func (_m *Client) Write(path string, data map[string]interface{}) (map[string]interface{}, error) {
ret := _m.Called(path, data)
var r0 map[string]interface{}
if rf, ok := ret.Get(0).(func(string, map[string]interface{}) map[string]interface{}); ok {
r0 = rf(path, data)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(map[string]interface{})
}
}
var r1 error
if rf, ok := ret.Get(1).(func(string, map[string]interface{}) error); ok {
r1 = rf(path, data)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
type mockConstructorTestingTNewClient interface {
mock.TestingT
Cleanup(func())
}
// NewClient creates a new instance of Client. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func NewClient(t mockConstructorTestingTNewClient) *Client {
mock := &Client{}
mock.Mock.Test(t)
t.Cleanup(func() { mock.AssertExpectations(t) })
return mock
}