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