This repository has been archived by the owner on May 15, 2020. It is now read-only.
/
Validator.go
77 lines (62 loc) · 1.74 KB
/
Validator.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
// Code generated by mockery v1.0.0. DO NOT EDIT.
package mocks
import apperrors "github.com/kyma-incubator/hack-showcase/github-connector/internal/apperrors"
import http "net/http"
import mock "github.com/stretchr/testify/mock"
// Validator is an autogenerated mock type for the Validator type
type Validator struct {
mock.Mock
}
// GetToken provides a mock function with given fields:
func (_m *Validator) GetToken() string {
ret := _m.Called()
var r0 string
if rf, ok := ret.Get(0).(func() string); ok {
r0 = rf()
} else {
r0 = ret.Get(0).(string)
}
return r0
}
// ParseWebHook provides a mock function with given fields: _a0, _a1
func (_m *Validator) ParseWebHook(_a0 string, _a1 []byte) (interface{}, apperrors.AppError) {
ret := _m.Called(_a0, _a1)
var r0 interface{}
if rf, ok := ret.Get(0).(func(string, []byte) interface{}); ok {
r0 = rf(_a0, _a1)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(interface{})
}
}
var r1 apperrors.AppError
if rf, ok := ret.Get(1).(func(string, []byte) apperrors.AppError); ok {
r1 = rf(_a0, _a1)
} else {
if ret.Get(1) != nil {
r1 = ret.Get(1).(apperrors.AppError)
}
}
return r0, r1
}
// ValidatePayload provides a mock function with given fields: _a0, _a1
func (_m *Validator) ValidatePayload(_a0 *http.Request, _a1 []byte) ([]byte, apperrors.AppError) {
ret := _m.Called(_a0, _a1)
var r0 []byte
if rf, ok := ret.Get(0).(func(*http.Request, []byte) []byte); ok {
r0 = rf(_a0, _a1)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).([]byte)
}
}
var r1 apperrors.AppError
if rf, ok := ret.Get(1).(func(*http.Request, []byte) apperrors.AppError); ok {
r1 = rf(_a0, _a1)
} else {
if ret.Get(1) != nil {
r1 = ret.Get(1).(apperrors.AppError)
}
}
return r0, r1
}