/
platform_Platform.go
87 lines (68 loc) · 1.96 KB
/
platform_Platform.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
// Code generated by mockery 2.9.0. DO NOT EDIT.
package mocks
import (
context "context"
http "net/http"
mock "github.com/stretchr/testify/mock"
models "github.com/krok-o/krok/pkg/models"
)
// Platform is an autogenerated mock type for the Platform type
type Platform struct {
mock.Mock
}
// CreateHook provides a mock function with given fields: ctx, repo
func (_m *Platform) CreateHook(ctx context.Context, repo *models.Repository) error {
ret := _m.Called(ctx, repo)
var r0 error
if rf, ok := ret.Get(0).(func(context.Context, *models.Repository) error); ok {
r0 = rf(ctx, repo)
} else {
r0 = ret.Error(0)
}
return r0
}
// GetEventID provides a mock function with given fields: ctx, r
func (_m *Platform) GetEventID(ctx context.Context, r *http.Request) (string, error) {
ret := _m.Called(ctx, r)
var r0 string
if rf, ok := ret.Get(0).(func(context.Context, *http.Request) string); ok {
r0 = rf(ctx, r)
} else {
r0 = ret.Get(0).(string)
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *http.Request) error); ok {
r1 = rf(ctx, r)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// GetEventType provides a mock function with given fields: ctx, r
func (_m *Platform) GetEventType(ctx context.Context, r *http.Request) (string, error) {
ret := _m.Called(ctx, r)
var r0 string
if rf, ok := ret.Get(0).(func(context.Context, *http.Request) string); ok {
r0 = rf(ctx, r)
} else {
r0 = ret.Get(0).(string)
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *http.Request) error); ok {
r1 = rf(ctx, r)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// ValidateRequest provides a mock function with given fields: ctx, r, repoID
func (_m *Platform) ValidateRequest(ctx context.Context, r *http.Request, repoID int) error {
ret := _m.Called(ctx, r, repoID)
var r0 error
if rf, ok := ret.Get(0).(func(context.Context, *http.Request, int) error); ok {
r0 = rf(ctx, r, repoID)
} else {
r0 = ret.Error(0)
}
return r0
}