-
Notifications
You must be signed in to change notification settings - Fork 3.2k
/
Gatekeeper.go
94 lines (75 loc) · 2.08 KB
/
Gatekeeper.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
// Code generated by mockery v2.9.4. DO NOT EDIT.
package mocks
import (
context "context"
grpc "google.golang.org/grpc"
mock "github.com/stretchr/testify/mock"
)
// Gatekeeper is an autogenerated mock type for the Gatekeeper type
type Gatekeeper struct {
mock.Mock
}
// Context provides a mock function with given fields: ctx
func (_m *Gatekeeper) Context(ctx context.Context) (context.Context, error) {
ret := _m.Called(ctx)
var r0 context.Context
if rf, ok := ret.Get(0).(func(context.Context) context.Context); ok {
r0 = rf(ctx)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(context.Context)
}
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context) error); ok {
r1 = rf(ctx)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// ContextWithRequest provides a mock function with given fields: ctx, req
func (_m *Gatekeeper) ContextWithRequest(ctx context.Context, req interface{}) (context.Context, error) {
ret := _m.Called(ctx, req)
var r0 context.Context
if rf, ok := ret.Get(0).(func(context.Context, interface{}) context.Context); ok {
r0 = rf(ctx, req)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(context.Context)
}
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, interface{}) error); ok {
r1 = rf(ctx, req)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// StreamServerInterceptor provides a mock function with given fields:
func (_m *Gatekeeper) StreamServerInterceptor() grpc.StreamServerInterceptor {
ret := _m.Called()
var r0 grpc.StreamServerInterceptor
if rf, ok := ret.Get(0).(func() grpc.StreamServerInterceptor); ok {
r0 = rf()
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(grpc.StreamServerInterceptor)
}
}
return r0
}
// UnaryServerInterceptor provides a mock function with given fields:
func (_m *Gatekeeper) UnaryServerInterceptor() grpc.UnaryServerInterceptor {
ret := _m.Called()
var r0 grpc.UnaryServerInterceptor
if rf, ok := ret.Get(0).(func() grpc.UnaryServerInterceptor); ok {
r0 = rf()
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(grpc.UnaryServerInterceptor)
}
}
return r0
}