-
Notifications
You must be signed in to change notification settings - Fork 9
/
service.go
131 lines (112 loc) · 4.61 KB
/
service.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
129
130
131
// Code generated by MockGen. DO NOT EDIT.
// Source: github.com/go-sigma/sigma/pkg/auth (interfaces: AuthService)
//
// Generated by this command:
//
// mockgen -destination=mocks/service.go -package=mocks github.com/go-sigma/sigma/pkg/auth AuthService
//
// Package mocks is a generated GoMock package.
package mocks
import (
reflect "reflect"
models "github.com/go-sigma/sigma/pkg/dal/models"
enums "github.com/go-sigma/sigma/pkg/types/enums"
gomock "go.uber.org/mock/gomock"
)
// MockAuthService is a mock of AuthService interface.
type MockAuthService struct {
ctrl *gomock.Controller
recorder *MockAuthServiceMockRecorder
}
// MockAuthServiceMockRecorder is the mock recorder for MockAuthService.
type MockAuthServiceMockRecorder struct {
mock *MockAuthService
}
// NewMockAuthService creates a new mock instance.
func NewMockAuthService(ctrl *gomock.Controller) *MockAuthService {
mock := &MockAuthService{ctrl: ctrl}
mock.recorder = &MockAuthServiceMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockAuthService) EXPECT() *MockAuthServiceMockRecorder {
return m.recorder
}
// Artifact mocks base method.
func (m *MockAuthService) Artifact(arg0 models.User, arg1 int64, arg2 enums.Auth) (bool, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Artifact", arg0, arg1, arg2)
ret0, _ := ret[0].(bool)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// Artifact indicates an expected call of Artifact.
func (mr *MockAuthServiceMockRecorder) Artifact(arg0, arg1, arg2 any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Artifact", reflect.TypeOf((*MockAuthService)(nil).Artifact), arg0, arg1, arg2)
}
// Namespace mocks base method.
func (m *MockAuthService) Namespace(arg0 models.User, arg1 int64, arg2 enums.Auth) (bool, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Namespace", arg0, arg1, arg2)
ret0, _ := ret[0].(bool)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// Namespace indicates an expected call of Namespace.
func (mr *MockAuthServiceMockRecorder) Namespace(arg0, arg1, arg2 any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Namespace", reflect.TypeOf((*MockAuthService)(nil).Namespace), arg0, arg1, arg2)
}
// NamespaceRole mocks base method.
func (m *MockAuthService) NamespaceRole(arg0 models.User, arg1 int64) (*enums.NamespaceRole, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "NamespaceRole", arg0, arg1)
ret0, _ := ret[0].(*enums.NamespaceRole)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// NamespaceRole indicates an expected call of NamespaceRole.
func (mr *MockAuthServiceMockRecorder) NamespaceRole(arg0, arg1 any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NamespaceRole", reflect.TypeOf((*MockAuthService)(nil).NamespaceRole), arg0, arg1)
}
// NamespacesRole mocks base method.
func (m *MockAuthService) NamespacesRole(arg0 models.User, arg1 []int64) (map[int64]*enums.NamespaceRole, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "NamespacesRole", arg0, arg1)
ret0, _ := ret[0].(map[int64]*enums.NamespaceRole)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// NamespacesRole indicates an expected call of NamespacesRole.
func (mr *MockAuthServiceMockRecorder) NamespacesRole(arg0, arg1 any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NamespacesRole", reflect.TypeOf((*MockAuthService)(nil).NamespacesRole), arg0, arg1)
}
// Repository mocks base method.
func (m *MockAuthService) Repository(arg0 models.User, arg1 int64, arg2 enums.Auth) (bool, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Repository", arg0, arg1, arg2)
ret0, _ := ret[0].(bool)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// Repository indicates an expected call of Repository.
func (mr *MockAuthServiceMockRecorder) Repository(arg0, arg1, arg2 any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Repository", reflect.TypeOf((*MockAuthService)(nil).Repository), arg0, arg1, arg2)
}
// Tag mocks base method.
func (m *MockAuthService) Tag(arg0 models.User, arg1 int64, arg2 enums.Auth) (bool, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Tag", arg0, arg1, arg2)
ret0, _ := ret[0].(bool)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// Tag indicates an expected call of Tag.
func (mr *MockAuthServiceMockRecorder) Tag(arg0, arg1, arg2 any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Tag", reflect.TypeOf((*MockAuthService)(nil).Tag), arg0, arg1, arg2)
}