access

package
v1.15.0 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Gate

type Gate struct {
	mock.Mock
}

Gate is an autogenerated mock type for the Gate type

func NewGate

func NewGate(t interface {
	mock.TestingT
	Cleanup(func())
}) *Gate

NewGate creates a new instance of Gate. 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 (*Gate) After

func (_m *Gate) After(callback func(context.Context, string, map[string]interface{}, access.Response) access.Response)

After provides a mock function with given fields: callback

func (*Gate) Allows

func (_m *Gate) Allows(ability string, arguments map[string]interface{}) bool

Allows provides a mock function with given fields: ability, arguments

func (*Gate) Any

func (_m *Gate) Any(abilities []string, arguments map[string]interface{}) bool

Any provides a mock function with given fields: abilities, arguments

func (*Gate) Before

func (_m *Gate) Before(callback func(context.Context, string, map[string]interface{}) access.Response)

Before provides a mock function with given fields: callback

func (*Gate) Define

func (_m *Gate) Define(ability string, callback func(context.Context, map[string]interface{}) access.Response)

Define provides a mock function with given fields: ability, callback

func (*Gate) Denies

func (_m *Gate) Denies(ability string, arguments map[string]interface{}) bool

Denies provides a mock function with given fields: ability, arguments

func (*Gate) EXPECT

func (_m *Gate) EXPECT() *Gate_Expecter

func (*Gate) Inspect

func (_m *Gate) Inspect(ability string, arguments map[string]interface{}) access.Response

Inspect provides a mock function with given fields: ability, arguments

func (*Gate) None

func (_m *Gate) None(abilities []string, arguments map[string]interface{}) bool

None provides a mock function with given fields: abilities, arguments

func (*Gate) WithContext

func (_m *Gate) WithContext(ctx context.Context) access.Gate

WithContext provides a mock function with given fields: ctx

type Gate_After_Call

type Gate_After_Call struct {
	*mock.Call
}

Gate_After_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'After'

func (*Gate_After_Call) Return

func (_c *Gate_After_Call) Return() *Gate_After_Call

func (*Gate_After_Call) Run

func (_c *Gate_After_Call) Run(run func(callback func(context.Context, string, map[string]interface{}, access.Response) access.Response)) *Gate_After_Call

func (*Gate_After_Call) RunAndReturn

func (_c *Gate_After_Call) RunAndReturn(run func(func(context.Context, string, map[string]interface{}, access.Response) access.Response)) *Gate_After_Call

type Gate_Allows_Call

type Gate_Allows_Call struct {
	*mock.Call
}

Gate_Allows_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Allows'

func (*Gate_Allows_Call) Return

func (_c *Gate_Allows_Call) Return(_a0 bool) *Gate_Allows_Call

func (*Gate_Allows_Call) Run

func (_c *Gate_Allows_Call) Run(run func(ability string, arguments map[string]interface{})) *Gate_Allows_Call

func (*Gate_Allows_Call) RunAndReturn

func (_c *Gate_Allows_Call) RunAndReturn(run func(string, map[string]interface{}) bool) *Gate_Allows_Call

type Gate_Any_Call

type Gate_Any_Call struct {
	*mock.Call
}

Gate_Any_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Any'

func (*Gate_Any_Call) Return

func (_c *Gate_Any_Call) Return(_a0 bool) *Gate_Any_Call

func (*Gate_Any_Call) Run

func (_c *Gate_Any_Call) Run(run func(abilities []string, arguments map[string]interface{})) *Gate_Any_Call

func (*Gate_Any_Call) RunAndReturn

func (_c *Gate_Any_Call) RunAndReturn(run func([]string, map[string]interface{}) bool) *Gate_Any_Call

type Gate_Before_Call

type Gate_Before_Call struct {
	*mock.Call
}

Gate_Before_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Before'

func (*Gate_Before_Call) Return

func (_c *Gate_Before_Call) Return() *Gate_Before_Call

func (*Gate_Before_Call) Run

func (_c *Gate_Before_Call) Run(run func(callback func(context.Context, string, map[string]interface{}) access.Response)) *Gate_Before_Call

func (*Gate_Before_Call) RunAndReturn

func (_c *Gate_Before_Call) RunAndReturn(run func(func(context.Context, string, map[string]interface{}) access.Response)) *Gate_Before_Call

type Gate_Define_Call

type Gate_Define_Call struct {
	*mock.Call
}

Gate_Define_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Define'

func (*Gate_Define_Call) Return

func (_c *Gate_Define_Call) Return() *Gate_Define_Call

func (*Gate_Define_Call) Run

func (_c *Gate_Define_Call) Run(run func(ability string, callback func(context.Context, map[string]interface{}) access.Response)) *Gate_Define_Call

func (*Gate_Define_Call) RunAndReturn

func (_c *Gate_Define_Call) RunAndReturn(run func(string, func(context.Context, map[string]interface{}) access.Response)) *Gate_Define_Call

type Gate_Denies_Call

type Gate_Denies_Call struct {
	*mock.Call
}

Gate_Denies_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Denies'

func (*Gate_Denies_Call) Return

func (_c *Gate_Denies_Call) Return(_a0 bool) *Gate_Denies_Call

func (*Gate_Denies_Call) Run

func (_c *Gate_Denies_Call) Run(run func(ability string, arguments map[string]interface{})) *Gate_Denies_Call

func (*Gate_Denies_Call) RunAndReturn

func (_c *Gate_Denies_Call) RunAndReturn(run func(string, map[string]interface{}) bool) *Gate_Denies_Call

type Gate_Expecter

type Gate_Expecter struct {
	// contains filtered or unexported fields
}

func (*Gate_Expecter) After

func (_e *Gate_Expecter) After(callback interface{}) *Gate_After_Call

After is a helper method to define mock.On call

  • callback func(context.Context , string , map[string]interface{} , access.Response) access.Response

func (*Gate_Expecter) Allows

func (_e *Gate_Expecter) Allows(ability interface{}, arguments interface{}) *Gate_Allows_Call

Allows is a helper method to define mock.On call

  • ability string
  • arguments map[string]interface{}

func (*Gate_Expecter) Any

func (_e *Gate_Expecter) Any(abilities interface{}, arguments interface{}) *Gate_Any_Call

Any is a helper method to define mock.On call

  • abilities []string
  • arguments map[string]interface{}

func (*Gate_Expecter) Before

func (_e *Gate_Expecter) Before(callback interface{}) *Gate_Before_Call

Before is a helper method to define mock.On call

  • callback func(context.Context , string , map[string]interface{}) access.Response

func (*Gate_Expecter) Define

func (_e *Gate_Expecter) Define(ability interface{}, callback interface{}) *Gate_Define_Call

Define is a helper method to define mock.On call

  • ability string
  • callback func(context.Context , map[string]interface{}) access.Response

func (*Gate_Expecter) Denies

func (_e *Gate_Expecter) Denies(ability interface{}, arguments interface{}) *Gate_Denies_Call

Denies is a helper method to define mock.On call

  • ability string
  • arguments map[string]interface{}

func (*Gate_Expecter) Inspect

func (_e *Gate_Expecter) Inspect(ability interface{}, arguments interface{}) *Gate_Inspect_Call

Inspect is a helper method to define mock.On call

  • ability string
  • arguments map[string]interface{}

func (*Gate_Expecter) None

func (_e *Gate_Expecter) None(abilities interface{}, arguments interface{}) *Gate_None_Call

None is a helper method to define mock.On call

  • abilities []string
  • arguments map[string]interface{}

func (*Gate_Expecter) WithContext

func (_e *Gate_Expecter) WithContext(ctx interface{}) *Gate_WithContext_Call

WithContext is a helper method to define mock.On call

  • ctx context.Context

type Gate_Inspect_Call

type Gate_Inspect_Call struct {
	*mock.Call
}

Gate_Inspect_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Inspect'

func (*Gate_Inspect_Call) Return

func (*Gate_Inspect_Call) Run

func (_c *Gate_Inspect_Call) Run(run func(ability string, arguments map[string]interface{})) *Gate_Inspect_Call

func (*Gate_Inspect_Call) RunAndReturn

func (_c *Gate_Inspect_Call) RunAndReturn(run func(string, map[string]interface{}) access.Response) *Gate_Inspect_Call

type Gate_None_Call

type Gate_None_Call struct {
	*mock.Call
}

Gate_None_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'None'

func (*Gate_None_Call) Return

func (_c *Gate_None_Call) Return(_a0 bool) *Gate_None_Call

func (*Gate_None_Call) Run

func (_c *Gate_None_Call) Run(run func(abilities []string, arguments map[string]interface{})) *Gate_None_Call

func (*Gate_None_Call) RunAndReturn

func (_c *Gate_None_Call) RunAndReturn(run func([]string, map[string]interface{}) bool) *Gate_None_Call

type Gate_WithContext_Call

type Gate_WithContext_Call struct {
	*mock.Call
}

Gate_WithContext_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WithContext'

func (*Gate_WithContext_Call) Return

func (*Gate_WithContext_Call) Run

func (*Gate_WithContext_Call) RunAndReturn

type Response

type Response struct {
	mock.Mock
}

Response is an autogenerated mock type for the Response type

func NewResponse

func NewResponse(t interface {
	mock.TestingT
	Cleanup(func())
}) *Response

NewResponse creates a new instance of Response. 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 (*Response) Allowed

func (_m *Response) Allowed() bool

Allowed provides a mock function with given fields:

func (*Response) EXPECT

func (_m *Response) EXPECT() *Response_Expecter

func (*Response) Message

func (_m *Response) Message() string

Message provides a mock function with given fields:

type Response_Allowed_Call

type Response_Allowed_Call struct {
	*mock.Call
}

Response_Allowed_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Allowed'

func (*Response_Allowed_Call) Return

func (*Response_Allowed_Call) Run

func (_c *Response_Allowed_Call) Run(run func()) *Response_Allowed_Call

func (*Response_Allowed_Call) RunAndReturn

func (_c *Response_Allowed_Call) RunAndReturn(run func() bool) *Response_Allowed_Call

type Response_Expecter

type Response_Expecter struct {
	// contains filtered or unexported fields
}

func (*Response_Expecter) Allowed

Allowed is a helper method to define mock.On call

func (*Response_Expecter) Message

Message is a helper method to define mock.On call

type Response_Message_Call

type Response_Message_Call struct {
	*mock.Call
}

Response_Message_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Message'

func (*Response_Message_Call) Return

func (*Response_Message_Call) Run

func (_c *Response_Message_Call) Run(run func()) *Response_Message_Call

func (*Response_Message_Call) RunAndReturn

func (_c *Response_Message_Call) RunAndReturn(run func() string) *Response_Message_Call

Jump to

Keyboard shortcuts

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