| 1 |
// This file was auto-generated using createmock. See the following page for |
| 2 |
// more information: |
| 3 |
// |
| 4 |
// https://github.com/jacobsa/oglemock |
| 5 |
// |
| 6 |
|
| 7 |
package mock_gcs |
| 8 |
|
| 9 |
import ( |
| 10 |
fmt "fmt" |
| 11 |
oglemock "github.com/jacobsa/oglemock" |
| 12 |
gcs "github.com/jacobsa/oglemock/createmock/testdata/gcs" |
| 13 |
context "golang.org/x/net/context" |
| 14 |
runtime "runtime" |
| 15 |
unsafe "unsafe" |
| 16 |
) |
| 17 |
|
| 18 |
type MockBucket interface { |
| 19 |
gcs.Bucket |
| 20 |
oglemock.MockObject |
| 21 |
} |
| 22 |
|
| 23 |
type mockBucket struct { |
| 24 |
controller oglemock.Controller |
| 25 |
description string |
| 26 |
} |
| 27 |
|
| 28 |
func NewMockBucket( |
| 29 |
c oglemock.Controller, |
| 30 |
desc string) MockBucket { |
| 31 |
return &mockBucket{ |
| 32 |
controller: c, |
| 33 |
description: desc, |
| 34 |
} |
| 35 |
} |
| 36 |
|
| 37 |
func (m *mockBucket) Oglemock_Id() uintptr { |
| 38 |
return uintptr(unsafe.Pointer(m)) |
| 39 |
} |
| 40 |
|
| 41 |
func (m *mockBucket) Oglemock_Description() string { |
| 42 |
return m.description |
| 43 |
} |
| 44 |
|
| 45 |
func (m *mockBucket) CopyObject(p0 context.Context, p1 *gcs.CopyObjectRequest) (o0 *gcs.Object, o1 error) { |
| 46 |
// Get a file name and line number for the caller. |
| 47 |
_, file, line, _ := runtime.Caller(1) |
| 48 |
|
| 49 |
// Hand the call off to the controller, which does most of the work. |
| 50 |
retVals := m.controller.HandleMethodCall( |
| 51 |
m, |
| 52 |
"CopyObject", |
| 53 |
file, |
| 54 |
line, |
| 55 |
[]interface{}{p0, p1}) |
| 56 |
|
| 57 |
if len(retVals) != 2 { |
| 58 |
panic(fmt.Sprintf("mockBucket.CopyObject: invalid return values: %v", retVals)) |
| 59 |
} |
| 60 |
|
| 61 |
// o0 *gcs.Object |
| 62 |
if retVals[0] != nil { |
| 63 |
o0 = retVals[0].(*gcs.Object) |
| 64 |
} |
| 65 |
|
| 66 |
// o1 error |
| 67 |
if retVals[1] != nil { |
| 68 |
o1 = retVals[1].(error) |
| 69 |
} |
| 70 |
|
| 71 |
return |
| 72 |
} |
| 73 |
|
| 74 |
func (m *mockBucket) CreateObject(p0 context.Context, p1 *gcs.CreateObjectRequest) (o0 *gcs.Object, o1 error) { |
| 75 |
// Get a file name and line number for the caller. |
| 76 |
_, file, line, _ := runtime.Caller(1) |
| 77 |
|
| 78 |
// Hand the call off to the controller, which does most of the work. |
| 79 |
retVals := m.controller.HandleMethodCall( |
| 80 |
m, |
| 81 |
"CreateObject", |
| 82 |
file, |
| 83 |
line, |
| 84 |
[]interface{}{p0, p1}) |
| 85 |
|
| 86 |
if len(retVals) != 2 { |
| 87 |
panic(fmt.Sprintf("mockBucket.CreateObject: invalid return values: %v", retVals)) |
| 88 |
} |
| 89 |
|
| 90 |
// o0 *gcs.Object |
| 91 |
if retVals[0] != nil { |
| 92 |
o0 = retVals[0].(*gcs.Object) |
| 93 |
} |
| 94 |
|
| 95 |
// o1 error |
| 96 |
if retVals[1] != nil { |
| 97 |
o1 = retVals[1].(error) |
| 98 |
} |
| 99 |
|
| 100 |
return |
| 101 |
} |
| 102 |
|
| 103 |
func (m *mockBucket) Name() (o0 string) { |
| 104 |
// Get a file name and line number for the caller. |
| 105 |
_, file, line, _ := runtime.Caller(1) |
| 106 |
|
| 107 |
// Hand the call off to the controller, which does most of the work. |
| 108 |
retVals := m.controller.HandleMethodCall( |
| 109 |
m, |
| 110 |
"Name", |
| 111 |
file, |
| 112 |
line, |
| 113 |
[]interface{}{}) |
| 114 |
|
| 115 |
if len(retVals) != 1 { |
| 116 |
panic(fmt.Sprintf("mockBucket.Name: invalid return values: %v", retVals)) |
| 117 |
} |
| 118 |
|
| 119 |
// o0 string |
| 120 |
if retVals[0] != nil { |
| 121 |
o0 = retVals[0].(string) |
| 122 |
} |
| 123 |
|
| 124 |
return |
| 125 |
} |