This repository has been archived by the owner on Oct 9, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 53
/
qubole_client.go
128 lines (100 loc) · 4.64 KB
/
qubole_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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
// Code generated by mockery v1.0.1. DO NOT EDIT.
package mocks
import (
context "context"
client "github.com/flyteorg/flyteplugins/go/tasks/plugins/hive/client"
mock "github.com/stretchr/testify/mock"
)
// QuboleClient is an autogenerated mock type for the QuboleClient type
type QuboleClient struct {
mock.Mock
}
type QuboleClient_ExecuteHiveCommand struct {
*mock.Call
}
func (_m QuboleClient_ExecuteHiveCommand) Return(_a0 *client.QuboleCommandDetails, _a1 error) *QuboleClient_ExecuteHiveCommand {
return &QuboleClient_ExecuteHiveCommand{Call: _m.Call.Return(_a0, _a1)}
}
func (_m *QuboleClient) OnExecuteHiveCommand(ctx context.Context, commandStr string, timeoutVal uint32, clusterPrimaryLabel string, accountKey string, tags []string, commandMetadata client.CommandMetadata) *QuboleClient_ExecuteHiveCommand {
c := _m.On("ExecuteHiveCommand", ctx, commandStr, timeoutVal, clusterPrimaryLabel, accountKey, tags, commandMetadata)
return &QuboleClient_ExecuteHiveCommand{Call: c}
}
func (_m *QuboleClient) OnExecuteHiveCommandMatch(matchers ...interface{}) *QuboleClient_ExecuteHiveCommand {
c := _m.On("ExecuteHiveCommand", matchers...)
return &QuboleClient_ExecuteHiveCommand{Call: c}
}
// ExecuteHiveCommand provides a mock function with given fields: ctx, commandStr, timeoutVal, clusterPrimaryLabel, accountKey, tags, commandMetadata
func (_m *QuboleClient) ExecuteHiveCommand(ctx context.Context, commandStr string, timeoutVal uint32, clusterPrimaryLabel string, accountKey string, tags []string, commandMetadata client.CommandMetadata) (*client.QuboleCommandDetails, error) {
ret := _m.Called(ctx, commandStr, timeoutVal, clusterPrimaryLabel, accountKey, tags, commandMetadata)
var r0 *client.QuboleCommandDetails
if rf, ok := ret.Get(0).(func(context.Context, string, uint32, string, string, []string, client.CommandMetadata) *client.QuboleCommandDetails); ok {
r0 = rf(ctx, commandStr, timeoutVal, clusterPrimaryLabel, accountKey, tags, commandMetadata)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*client.QuboleCommandDetails)
}
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, string, uint32, string, string, []string, client.CommandMetadata) error); ok {
r1 = rf(ctx, commandStr, timeoutVal, clusterPrimaryLabel, accountKey, tags, commandMetadata)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
type QuboleClient_GetCommandStatus struct {
*mock.Call
}
func (_m QuboleClient_GetCommandStatus) Return(_a0 client.QuboleStatus, _a1 error) *QuboleClient_GetCommandStatus {
return &QuboleClient_GetCommandStatus{Call: _m.Call.Return(_a0, _a1)}
}
func (_m *QuboleClient) OnGetCommandStatus(ctx context.Context, commandID string, accountKey string) *QuboleClient_GetCommandStatus {
c := _m.On("GetCommandStatus", ctx, commandID, accountKey)
return &QuboleClient_GetCommandStatus{Call: c}
}
func (_m *QuboleClient) OnGetCommandStatusMatch(matchers ...interface{}) *QuboleClient_GetCommandStatus {
c := _m.On("GetCommandStatus", matchers...)
return &QuboleClient_GetCommandStatus{Call: c}
}
// GetCommandStatus provides a mock function with given fields: ctx, commandID, accountKey
func (_m *QuboleClient) GetCommandStatus(ctx context.Context, commandID string, accountKey string) (client.QuboleStatus, error) {
ret := _m.Called(ctx, commandID, accountKey)
var r0 client.QuboleStatus
if rf, ok := ret.Get(0).(func(context.Context, string, string) client.QuboleStatus); ok {
r0 = rf(ctx, commandID, accountKey)
} else {
r0 = ret.Get(0).(client.QuboleStatus)
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, string, string) error); ok {
r1 = rf(ctx, commandID, accountKey)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
type QuboleClient_KillCommand struct {
*mock.Call
}
func (_m QuboleClient_KillCommand) Return(_a0 error) *QuboleClient_KillCommand {
return &QuboleClient_KillCommand{Call: _m.Call.Return(_a0)}
}
func (_m *QuboleClient) OnKillCommand(ctx context.Context, commandID string, accountKey string) *QuboleClient_KillCommand {
c := _m.On("KillCommand", ctx, commandID, accountKey)
return &QuboleClient_KillCommand{Call: c}
}
func (_m *QuboleClient) OnKillCommandMatch(matchers ...interface{}) *QuboleClient_KillCommand {
c := _m.On("KillCommand", matchers...)
return &QuboleClient_KillCommand{Call: c}
}
// KillCommand provides a mock function with given fields: ctx, commandID, accountKey
func (_m *QuboleClient) KillCommand(ctx context.Context, commandID string, accountKey string) error {
ret := _m.Called(ctx, commandID, accountKey)
var r0 error
if rf, ok := ret.Get(0).(func(context.Context, string, string) error); ok {
r0 = rf(ctx, commandID, accountKey)
} else {
r0 = ret.Error(0)
}
return r0
}