mock

package
v0.0.26 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2021 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FakeAuth

type FakeAuth struct {
	// CheckPemissionsFn ...
	CheckPemissionsFn func(subject string, input profileutils.PermissionInput) (bool, error)
	// CheckAuthorizationFn ...
	CheckAuthorizationFn func(subject string, permission profileutils.PermissionInput) (bool, error)
	// IsAuthorizedFn ...
	IsAuthorizedFn func(user *profileutils.UserInfo, permission profileutils.PermissionInput) (bool, error)
}

FakeAuth ...

func (*FakeAuth) CheckAuthorization

func (a *FakeAuth) CheckAuthorization(subject string, permission profileutils.PermissionInput) (bool, error)

CheckAuthorization is a mock version of the original function

func (*FakeAuth) CheckPemissions

func (a *FakeAuth) CheckPemissions(subject string, input profileutils.PermissionInput) (bool, error)

CheckPemissions is a mock version of the original function

func (*FakeAuth) IsAuthorized

func (a *FakeAuth) IsAuthorized(user *profileutils.UserInfo, permission profileutils.PermissionInput) (bool, error)

IsAuthorized is a mock version of the original function

Jump to

Keyboard shortcuts

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