mocks

package
v1.12.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 8, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Enforcer

type Enforcer struct {
	mock.Mock
}

Enforcer is an autogenerated mock type for the Enforcer type

func NewEnforcer added in v1.10.0

func NewEnforcer(t interface {
	mock.TestingT
	Cleanup(func())
}) *Enforcer

NewEnforcer creates a new instance of Enforcer. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*Enforcer) GetRoleMembers added in v1.10.0

func (_m *Enforcer) GetRoleMembers(ctx context.Context, role string) ([]string, error)

GetRoleMembers provides a mock function with given fields: ctx, role

func (*Enforcer) GetRolePermissions added in v1.10.0

func (_m *Enforcer) GetRolePermissions(ctx context.Context, role string) ([]string, error)

GetRolePermissions provides a mock function with given fields: ctx, role

func (*Enforcer) GetUserPermissions added in v1.10.0

func (_m *Enforcer) GetUserPermissions(ctx context.Context, user string) ([]string, error)

GetUserPermissions provides a mock function with given fields: ctx, user

func (*Enforcer) GetUserRoles added in v1.10.0

func (_m *Enforcer) GetUserRoles(ctx context.Context, user string) ([]string, error)

GetUserRoles provides a mock function with given fields: ctx, user

func (*Enforcer) IsUserGrantedPermission added in v1.10.0

func (_m *Enforcer) IsUserGrantedPermission(ctx context.Context, user string, permission string) (bool, error)

IsUserGrantedPermission provides a mock function with given fields: ctx, user, permission

func (*Enforcer) UpdateAuthorization added in v1.10.0

func (_m *Enforcer) UpdateAuthorization(ctx context.Context, updateRequest enforcer.AuthorizationUpdateRequest) error

UpdateAuthorization provides a mock function with given fields: ctx, updateRequest

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL