-
Notifications
You must be signed in to change notification settings - Fork 161
/
fake_blobs_dir_reporter.go
143 lines (127 loc) · 4.9 KB
/
fake_blobs_dir_reporter.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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
// This file was generated by counterfeiter
package fakes
import (
"sync"
"github.com/cloudfoundry/bosh-cli/releasedir"
)
type FakeBlobsDirReporter struct {
BlobDownloadStartedStub func(path string, size int64, blobID, sha1 string)
blobDownloadStartedMutex sync.RWMutex
blobDownloadStartedArgsForCall []struct {
path string
size int64
blobID string
sha1 string
}
BlobDownloadFinishedStub func(path, blobID string, err error)
blobDownloadFinishedMutex sync.RWMutex
blobDownloadFinishedArgsForCall []struct {
path string
blobID string
err error
}
BlobUploadStartedStub func(path string, size int64, sha1 string)
blobUploadStartedMutex sync.RWMutex
blobUploadStartedArgsForCall []struct {
path string
size int64
sha1 string
}
BlobUploadFinishedStub func(path, blobID string, err error)
blobUploadFinishedMutex sync.RWMutex
blobUploadFinishedArgsForCall []struct {
path string
blobID string
err error
}
}
func (fake *FakeBlobsDirReporter) BlobDownloadStarted(path string, size int64, blobID string, sha1 string) {
fake.blobDownloadStartedMutex.Lock()
fake.blobDownloadStartedArgsForCall = append(fake.blobDownloadStartedArgsForCall, struct {
path string
size int64
blobID string
sha1 string
}{path, size, blobID, sha1})
fake.blobDownloadStartedMutex.Unlock()
if fake.BlobDownloadStartedStub != nil {
fake.BlobDownloadStartedStub(path, size, blobID, sha1)
}
}
func (fake *FakeBlobsDirReporter) BlobDownloadStartedCallCount() int {
fake.blobDownloadStartedMutex.RLock()
defer fake.blobDownloadStartedMutex.RUnlock()
return len(fake.blobDownloadStartedArgsForCall)
}
func (fake *FakeBlobsDirReporter) BlobDownloadStartedArgsForCall(i int) (string, int64, string, string) {
fake.blobDownloadStartedMutex.RLock()
defer fake.blobDownloadStartedMutex.RUnlock()
return fake.blobDownloadStartedArgsForCall[i].path, fake.blobDownloadStartedArgsForCall[i].size, fake.blobDownloadStartedArgsForCall[i].blobID, fake.blobDownloadStartedArgsForCall[i].sha1
}
func (fake *FakeBlobsDirReporter) BlobDownloadFinished(path string, blobID string, err error) {
fake.blobDownloadFinishedMutex.Lock()
fake.blobDownloadFinishedArgsForCall = append(fake.blobDownloadFinishedArgsForCall, struct {
path string
blobID string
err error
}{path, blobID, err})
fake.blobDownloadFinishedMutex.Unlock()
if fake.BlobDownloadFinishedStub != nil {
fake.BlobDownloadFinishedStub(path, blobID, err)
}
}
func (fake *FakeBlobsDirReporter) BlobDownloadFinishedCallCount() int {
fake.blobDownloadFinishedMutex.RLock()
defer fake.blobDownloadFinishedMutex.RUnlock()
return len(fake.blobDownloadFinishedArgsForCall)
}
func (fake *FakeBlobsDirReporter) BlobDownloadFinishedArgsForCall(i int) (string, string, error) {
fake.blobDownloadFinishedMutex.RLock()
defer fake.blobDownloadFinishedMutex.RUnlock()
return fake.blobDownloadFinishedArgsForCall[i].path, fake.blobDownloadFinishedArgsForCall[i].blobID, fake.blobDownloadFinishedArgsForCall[i].err
}
func (fake *FakeBlobsDirReporter) BlobUploadStarted(path string, size int64, sha1 string) {
fake.blobUploadStartedMutex.Lock()
fake.blobUploadStartedArgsForCall = append(fake.blobUploadStartedArgsForCall, struct {
path string
size int64
sha1 string
}{path, size, sha1})
fake.blobUploadStartedMutex.Unlock()
if fake.BlobUploadStartedStub != nil {
fake.BlobUploadStartedStub(path, size, sha1)
}
}
func (fake *FakeBlobsDirReporter) BlobUploadStartedCallCount() int {
fake.blobUploadStartedMutex.RLock()
defer fake.blobUploadStartedMutex.RUnlock()
return len(fake.blobUploadStartedArgsForCall)
}
func (fake *FakeBlobsDirReporter) BlobUploadStartedArgsForCall(i int) (string, int64, string) {
fake.blobUploadStartedMutex.RLock()
defer fake.blobUploadStartedMutex.RUnlock()
return fake.blobUploadStartedArgsForCall[i].path, fake.blobUploadStartedArgsForCall[i].size, fake.blobUploadStartedArgsForCall[i].sha1
}
func (fake *FakeBlobsDirReporter) BlobUploadFinished(path string, blobID string, err error) {
fake.blobUploadFinishedMutex.Lock()
fake.blobUploadFinishedArgsForCall = append(fake.blobUploadFinishedArgsForCall, struct {
path string
blobID string
err error
}{path, blobID, err})
fake.blobUploadFinishedMutex.Unlock()
if fake.BlobUploadFinishedStub != nil {
fake.BlobUploadFinishedStub(path, blobID, err)
}
}
func (fake *FakeBlobsDirReporter) BlobUploadFinishedCallCount() int {
fake.blobUploadFinishedMutex.RLock()
defer fake.blobUploadFinishedMutex.RUnlock()
return len(fake.blobUploadFinishedArgsForCall)
}
func (fake *FakeBlobsDirReporter) BlobUploadFinishedArgsForCall(i int) (string, string, error) {
fake.blobUploadFinishedMutex.RLock()
defer fake.blobUploadFinishedMutex.RUnlock()
return fake.blobUploadFinishedArgsForCall[i].path, fake.blobUploadFinishedArgsForCall[i].blobID, fake.blobUploadFinishedArgsForCall[i].err
}
var _ releasedir.BlobsDirReporter = new(FakeBlobsDirReporter)