Documentation
¶
Index ¶
- type AuthZReq
- type FakeAuthorizer
- func (a *FakeAuthorizer) Authorize(ctx context.Context, principal *models.Principal, verb string, ...) error
- func (a *FakeAuthorizer) AuthorizeSilent(ctx context.Context, principal *models.Principal, verb string, ...) error
- func (a *FakeAuthorizer) Calls() []AuthZReq
- func (a *FakeAuthorizer) FilterAuthorizedResources(ctx context.Context, principal *models.Principal, verb string, ...) ([]string, error)
- func (a *FakeAuthorizer) SetErr(err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FakeAuthorizer ¶
type FakeAuthorizer struct {
// contains filtered or unexported fields
}
func NewMockAuthorizer ¶
func NewMockAuthorizer() *FakeAuthorizer
func (*FakeAuthorizer) Authorize ¶
func (a *FakeAuthorizer) Authorize(ctx context.Context, principal *models.Principal, verb string, resources ...string) error
Authorize provides a mock function with given fields: principal, verb, resource
func (*FakeAuthorizer) AuthorizeSilent ¶ added in v1.28.5
func (*FakeAuthorizer) Calls ¶
func (a *FakeAuthorizer) Calls() []AuthZReq
func (*FakeAuthorizer) FilterAuthorizedResources ¶ added in v1.28.5
func (*FakeAuthorizer) SetErr ¶
func (a *FakeAuthorizer) SetErr(err error)
Click to show internal directories.
Click to hide internal directories.