mock

package
v0.0.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockContext

type MockContext struct {
	*fasthttp.RequestCtx
	CtxFn               func() context.Context
	SetCtxFn            func(ctx context.Context)
	ConfigFn            func() *raiden.Config
	SendJsonFn          func(data any) error
	SendErrorFn         func(err string) error
	SendErrorWithCodeFn func(statusCode int, err error) error
	RequestContextFn    func() *fasthttp.RequestCtx
	SendRpcFn           func(rpc raiden.Rpc) error
	ExecuteRpcFn        func(rpc raiden.Rpc) (any, error)
	SpanFn              func() trace.Span
	SetSpanFn           func(span trace.Span)
	TracerFn            func() trace.Tracer
	NewJobCtxFn         func() (raiden.JobContext, error)
	WriteFn             func(data []byte)
	WriteErrorFn        func(err error)
	SetFn               func(key string, value any)
	GetFn               func(key string) any
	Data                map[string]any
}

func (*MockContext) Config

func (c *MockContext) Config() *raiden.Config

func (*MockContext) Ctx

func (c *MockContext) Ctx() context.Context

func (*MockContext) ExecuteRpc

func (c *MockContext) ExecuteRpc(rpc raiden.Rpc) (any, error)

func (*MockContext) Get

func (c *MockContext) Get(key string) any

func (*MockContext) NewJobCtx

func (c *MockContext) NewJobCtx() (raiden.JobContext, error)

func (*MockContext) RequestContext

func (c *MockContext) RequestContext() *fasthttp.RequestCtx

func (*MockContext) SendError

func (c *MockContext) SendError(message string) error

func (*MockContext) SendErrorWithCode

func (c *MockContext) SendErrorWithCode(statusCode int, err error) error

func (*MockContext) SendJson

func (c *MockContext) SendJson(data any) error

func (*MockContext) SendRpc

func (c *MockContext) SendRpc(rpc raiden.Rpc) error

func (*MockContext) Set

func (c *MockContext) Set(key string, value any)

func (*MockContext) SetCtx

func (c *MockContext) SetCtx(ctx context.Context)

func (*MockContext) SetSpan

func (c *MockContext) SetSpan(span trace.Span)

func (*MockContext) Span

func (c *MockContext) Span() trace.Span

func (*MockContext) Tracer

func (c *MockContext) Tracer() trace.Tracer

func (*MockContext) Write

func (c *MockContext) Write(data []byte)

func (*MockContext) WriteError

func (c *MockContext) WriteError(err error)

type MockSupabase

type MockSupabase struct {
	Cfg *raiden.Config
}

func (*MockSupabase) Activate

func (m *MockSupabase) Activate()

func (*MockSupabase) Deactivate

func (m *MockSupabase) Deactivate()

func (*MockSupabase) MockAdminUpdateUserDataWithExpectedResponse

func (m *MockSupabase) MockAdminUpdateUserDataWithExpectedResponse(httpCode int, user objects.User) error

func (*MockSupabase) MockCreateBucketsWithExpectedResponse

func (m *MockSupabase) MockCreateBucketsWithExpectedResponse(httpCode int, data interface{}) error

func (*MockSupabase) MockCreateFunctionWithExpectedResponse

func (m *MockSupabase) MockCreateFunctionWithExpectedResponse(httpCode int, function objects.Function) error

func (*MockSupabase) MockCreatePolicyWithExpectedResponse

func (m *MockSupabase) MockCreatePolicyWithExpectedResponse(httpCode int, policy objects.Policy) error

func (*MockSupabase) MockCreateRoleWithExpectedResponse

func (m *MockSupabase) MockCreateRoleWithExpectedResponse(httpCode int, role objects.Role) error

func (*MockSupabase) MockCreateTableWithExpectedResponse

func (m *MockSupabase) MockCreateTableWithExpectedResponse(httpCode int, table objects.Table) error

func (*MockSupabase) MockDeleteBucketsWithExpectedResponse

func (m *MockSupabase) MockDeleteBucketsWithExpectedResponse(httpCode int) error

func (*MockSupabase) MockDeleteFunctionWithExpectedResponse

func (m *MockSupabase) MockDeleteFunctionWithExpectedResponse(httpCode int) error

func (*MockSupabase) MockDeletePolicyWithExpectedResponse

func (m *MockSupabase) MockDeletePolicyWithExpectedResponse(httpCode int) error

func (*MockSupabase) MockDeleteRoleWithExpectedResponse

func (m *MockSupabase) MockDeleteRoleWithExpectedResponse(httpCode int) error

func (*MockSupabase) MockDeleteTableWithExpectedResponse

func (m *MockSupabase) MockDeleteTableWithExpectedResponse(httpCode int) error

func (*MockSupabase) MockExecuteRpcWithExpectedResponse

func (m *MockSupabase) MockExecuteRpcWithExpectedResponse(httpCode int, rpcName string, data interface{}) error

func (*MockSupabase) MockFindProjectWithExpectedResponse

func (m *MockSupabase) MockFindProjectWithExpectedResponse(httpCode int, project objects.Project) error

func (*MockSupabase) MockGetBucketByNameWithExpectedResponse

func (m *MockSupabase) MockGetBucketByNameWithExpectedResponse(httpCode int, bucket objects.Bucket) error

func (*MockSupabase) MockGetBucketsWithExpectedResponse

func (m *MockSupabase) MockGetBucketsWithExpectedResponse(httpCode int, data interface{}) error

func (*MockSupabase) MockGetFunctionByNameWithExpectedResponse

func (m *MockSupabase) MockGetFunctionByNameWithExpectedResponse(httpCode int, function objects.Function) error

func (*MockSupabase) MockGetFunctionsWithExpectedResponse

func (m *MockSupabase) MockGetFunctionsWithExpectedResponse(httpCode int, functions []objects.Function) error

func (*MockSupabase) MockGetPoliciesWithExpectedResponse

func (m *MockSupabase) MockGetPoliciesWithExpectedResponse(httpCode int, policies []objects.Policy) error

func (*MockSupabase) MockGetPolicyByNameWithExpectedResponse

func (m *MockSupabase) MockGetPolicyByNameWithExpectedResponse(httpCode int, policy objects.Policy) error

func (*MockSupabase) MockGetRoleByNameWithExpectedResponse

func (m *MockSupabase) MockGetRoleByNameWithExpectedResponse(httpCode int, role objects.Role) error

func (*MockSupabase) MockGetRolesWithExpectedResponse

func (m *MockSupabase) MockGetRolesWithExpectedResponse(httpCode int, roles []objects.Role) error

func (*MockSupabase) MockGetTableByNameWithExpectedResponse

func (m *MockSupabase) MockGetTableByNameWithExpectedResponse(httpCode int, table objects.Table) error

func (*MockSupabase) MockGetTablesWithExpectedResponse

func (m *MockSupabase) MockGetTablesWithExpectedResponse(httpCode int, tables []objects.Table) error

func (*MockSupabase) MockUpdateFunctionWithExpectedResponse

func (m *MockSupabase) MockUpdateFunctionWithExpectedResponse(httpCode int) error

func (*MockSupabase) MockUpdatePolicyWithExpectedResponse

func (m *MockSupabase) MockUpdatePolicyWithExpectedResponse(httpCode int) error

func (*MockSupabase) MockUpdateRoleWithExpectedResponse

func (m *MockSupabase) MockUpdateRoleWithExpectedResponse(httpCode int) error

func (*MockSupabase) MockUpdateTableWithExpectedResponse

func (m *MockSupabase) MockUpdateTableWithExpectedResponse(httpCode int) error

Jump to

Keyboard shortcuts

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