Documentation ¶
Index ¶
- Variables
- type IAuthBiz
- type MockIAuthBiz
- func (_m *MockIAuthBiz) Callback(ctx contextx.Contextx, code string) (*user.Profile, error)
- func (_m *MockIAuthBiz) GetLoginURL(ctx contextx.Contextx, state string) string
- func (_m *MockIAuthBiz) HasPermission(ctx contextx.Contextx, token string, obj string, act string) (bool, error)
- func (_m *MockIAuthBiz) VerifyToken(ctx contextx.Contextx, token string) (*user.Profile, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ProviderSet = wire.NewSet(NewImpl, repo.ProviderSet)
ProviderSet is a provider set for wire
Functions ¶
This section is empty.
Types ¶
type IAuthBiz ¶
type IAuthBiz interface { GetLoginURL(ctx contextx.Contextx, state string) string Callback(ctx contextx.Contextx, code string) (info *user.Profile, err error) VerifyToken(ctx contextx.Contextx, token string) (info *user.Profile, err error) HasPermission(ctx contextx.Contextx, token, obj, act string) (bool, error) }
IAuthBiz declare auth business functions
func CreateIBiz ¶
func CreateIBiz(repo2 repo.IAuthRepo, auth authenticator.Authenticator, jwt2 jwt.IJwt, node2 node.Generator) (IAuthBiz, error)
type MockIAuthBiz ¶
MockIAuthBiz is an autogenerated mock type for the IAuthBiz type
func NewMockIAuthBiz ¶
func NewMockIAuthBiz(t mockConstructorTestingTNewMockIAuthBiz) *MockIAuthBiz
NewMockIAuthBiz creates a new instance of MockIAuthBiz. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func (*MockIAuthBiz) GetLoginURL ¶
func (_m *MockIAuthBiz) GetLoginURL(ctx contextx.Contextx, state string) string
GetLoginURL provides a mock function with given fields: ctx, state
func (*MockIAuthBiz) HasPermission ¶
func (_m *MockIAuthBiz) HasPermission(ctx contextx.Contextx, token string, obj string, act string) (bool, error)
HasPermission provides a mock function with given fields: ctx, token, obj, act
func (*MockIAuthBiz) VerifyToken ¶
VerifyToken provides a mock function with given fields: ctx, token
Click to show internal directories.
Click to hide internal directories.