mocks

package
v0.0.0-...-ceb5cd5 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2020 License: Apache-2.0 Imports: 2 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 (*Enforcer) Enforce

func (_m *Enforcer) Enforce(user string, resource string, action string) (*bool, error)

Enforce provides a mock function with given fields: user, resource, action

func (*Enforcer) FilterAuthorizedResource

func (_m *Enforcer) FilterAuthorizedResource(user string, resources []string, action string) ([]string, error)

FilterAuthorizedResource provides a mock function with given fields: user, resources, action

func (*Enforcer) GetPolicy

func (_m *Enforcer) GetPolicy(policyName string) (*types.Policy, error)

GetPolicy provides a mock function with given fields: policyName

func (*Enforcer) GetRole

func (_m *Enforcer) GetRole(roleName string) (*types.Role, error)

GetRole provides a mock function with given fields: roleName

func (*Enforcer) UpsertPolicy

func (_m *Enforcer) UpsertPolicy(policyName string, roles []string, users []string, resources []string, actions []string) (*types.Policy, error)

UpsertPolicy provides a mock function with given fields: policyName, roles, users, resources, actions

func (*Enforcer) UpsertRole

func (_m *Enforcer) UpsertRole(roleName string, users []string) (*types.Role, error)

UpsertRole provides a mock function with given fields: roleName, users

Jump to

Keyboard shortcuts

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