mirror of https://github.com/goharbor/harbor.git
99 lines
1.8 KiB
Go
99 lines
1.8 KiB
Go
// Code generated by mockery v2.1.0. DO NOT EDIT.
|
|
|
|
package security
|
|
|
|
import (
|
|
mock "github.com/stretchr/testify/mock"
|
|
|
|
types "github.com/goharbor/harbor/src/pkg/permission/types"
|
|
)
|
|
|
|
// Context is an autogenerated mock type for the Context type
|
|
type Context struct {
|
|
mock.Mock
|
|
}
|
|
|
|
// Can provides a mock function with given fields: action, resource
|
|
func (_m *Context) Can(action types.Action, resource types.Resource) bool {
|
|
ret := _m.Called(action, resource)
|
|
|
|
var r0 bool
|
|
if rf, ok := ret.Get(0).(func(types.Action, types.Resource) bool); ok {
|
|
r0 = rf(action, resource)
|
|
} else {
|
|
r0 = ret.Get(0).(bool)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// GetUsername provides a mock function with given fields:
|
|
func (_m *Context) GetUsername() 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
|
|
}
|
|
|
|
// IsAuthenticated provides a mock function with given fields:
|
|
func (_m *Context) IsAuthenticated() bool {
|
|
ret := _m.Called()
|
|
|
|
var r0 bool
|
|
if rf, ok := ret.Get(0).(func() bool); ok {
|
|
r0 = rf()
|
|
} else {
|
|
r0 = ret.Get(0).(bool)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// IsSolutionUser provides a mock function with given fields:
|
|
func (_m *Context) IsSolutionUser() bool {
|
|
ret := _m.Called()
|
|
|
|
var r0 bool
|
|
if rf, ok := ret.Get(0).(func() bool); ok {
|
|
r0 = rf()
|
|
} else {
|
|
r0 = ret.Get(0).(bool)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// IsSysAdmin provides a mock function with given fields:
|
|
func (_m *Context) IsSysAdmin() bool {
|
|
ret := _m.Called()
|
|
|
|
var r0 bool
|
|
if rf, ok := ret.Get(0).(func() bool); ok {
|
|
r0 = rf()
|
|
} else {
|
|
r0 = ret.Get(0).(bool)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// Name provides a mock function with given fields:
|
|
func (_m *Context) Name() 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
|
|
}
|