Documentation
¶
Index ¶
- func ListenReturnStream[T proto.Message, U proto.Message](con common.NatsConn, panicRecovery bool, subList *sync.Map, subject string, ...) error
- type Auth
- type Endpoints
- type MockAuth
- type MockAuth_Expecter
- type MockAuth_authForNamedWorkflow_Call
- func (_c *MockAuth_authForNamedWorkflow_Call) Return(_a0 context.Context, _a1 error) *MockAuth_authForNamedWorkflow_Call
- func (_c *MockAuth_authForNamedWorkflow_Call) Run(run func(ctx context.Context, name string)) *MockAuth_authForNamedWorkflow_Call
- func (_c *MockAuth_authForNamedWorkflow_Call) RunAndReturn(run func(context.Context, string) (context.Context, error)) *MockAuth_authForNamedWorkflow_Call
- type MockAuth_authForNonWorkflow_Call
- func (_c *MockAuth_authForNonWorkflow_Call) Return(_a0 context.Context, _a1 error) *MockAuth_authForNonWorkflow_Call
- func (_c *MockAuth_authForNonWorkflow_Call) Run(run func(ctx context.Context)) *MockAuth_authForNonWorkflow_Call
- func (_c *MockAuth_authForNonWorkflow_Call) RunAndReturn(run func(context.Context) (context.Context, error)) *MockAuth_authForNonWorkflow_Call
- type MockAuth_authForWorkflowId_Call
- func (_c *MockAuth_authForWorkflowId_Call) Return(_a0 context.Context, _a1 error) *MockAuth_authForWorkflowId_Call
- func (_c *MockAuth_authForWorkflowId_Call) Run(run func(ctx context.Context, workflowId string)) *MockAuth_authForWorkflowId_Call
- func (_c *MockAuth_authForWorkflowId_Call) RunAndReturn(run func(context.Context, string) (context.Context, error)) *MockAuth_authForWorkflowId_Call
- type MockAuth_authFromExecutionID_Call
- func (_c *MockAuth_authFromExecutionID_Call) Return(_a0 context.Context, _a1 *model.Execution, _a2 error) *MockAuth_authFromExecutionID_Call
- func (_c *MockAuth_authFromExecutionID_Call) Run(run func(ctx context.Context, executionID string)) *MockAuth_authFromExecutionID_Call
- func (_c *MockAuth_authFromExecutionID_Call) RunAndReturn(run func(context.Context, string) (context.Context, *model.Execution, error)) *MockAuth_authFromExecutionID_Call
- type MockAuth_authFromJobID_Call
- func (_c *MockAuth_authFromJobID_Call) Return(_a0 context.Context, _a1 *model.WorkflowState, _a2 error) *MockAuth_authFromJobID_Call
- func (_c *MockAuth_authFromJobID_Call) Run(run func(ctx context.Context, trackingID string)) *MockAuth_authFromJobID_Call
- func (_c *MockAuth_authFromJobID_Call) RunAndReturn(...) *MockAuth_authFromJobID_Call
- type MockAuth_authFromProcessInstanceID_Call
- func (_c *MockAuth_authFromProcessInstanceID_Call) Return(_a0 context.Context, _a1 *model.ProcessInstance, _a2 error) *MockAuth_authFromProcessInstanceID_Call
- func (_c *MockAuth_authFromProcessInstanceID_Call) Run(run func(ctx context.Context, instanceID string)) *MockAuth_authFromProcessInstanceID_Call
- func (_c *MockAuth_authFromProcessInstanceID_Call) RunAndReturn(...) *MockAuth_authFromProcessInstanceID_Call
- type MockAuth_authenticate_Call
- func (_c *MockAuth_authenticate_Call) Return(_a0 context.Context, _a1 header.Values, _a2 error) *MockAuth_authenticate_Call
- func (_c *MockAuth_authenticate_Call) Run(run func(ctx context.Context)) *MockAuth_authenticate_Call
- func (_c *MockAuth_authenticate_Call) RunAndReturn(run func(context.Context) (context.Context, header.Values, error)) *MockAuth_authenticate_Call
- type MockAuth_authorize_Call
- func (_c *MockAuth_authorize_Call) Return(_a0 context.Context, _a1 error) *MockAuth_authorize_Call
- func (_c *MockAuth_authorize_Call) Run(run func(ctx context.Context, workflowName string)) *MockAuth_authorize_Call
- func (_c *MockAuth_authorize_Call) RunAndReturn(run func(context.Context, string) (context.Context, error)) *MockAuth_authorize_Call
- type SharAuth
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ListenReturnStream ¶ added in v1.1.1032
func ListenReturnStream[T proto.Message, U proto.Message](con common.NatsConn, panicRecovery bool, subList *sync.Map, subject string, receiveAPIMiddleware []middleware.Receive, req T, fn func(ctx context.Context, req T, res chan<- U, errs chan<- error)) error
ListenReturnStream is a function that sets up a NATS subscription to handle streaming reply messages. It executes the provided function to process the request and send the response messages. The function runs in a separate goroutine that continuously listens for return messages and error messages, and publishes them to the reply inbox. the function exits when an error or cancellation occurs.
Types ¶
type Auth ¶ added in v1.1.1377
type Auth interface {
// contains filtered or unexported methods
}
Auth is a struct with various methods to provide authentication and authorisation capabilities for the api
type Endpoints ¶ added in v1.1.1131
type Endpoints struct {
// contains filtered or unexported fields
}
Endpoints provides API endpoints for SHAR
func New ¶
func New(operations workflow.Ops, nc *natz.NatsConnConfiguration, auth Auth, options *option.ServerOptions) (*Endpoints, error)
New creates a new instance of the SHAR API server
type MockAuth ¶ added in v1.1.1404
MockAuth is an autogenerated mock type for the Auth type
func NewMockAuth ¶ added in v1.1.1404
NewMockAuth creates a new instance of MockAuth. 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 (*MockAuth) EXPECT ¶ added in v1.1.1404
func (_m *MockAuth) EXPECT() *MockAuth_Expecter
type MockAuth_Expecter ¶ added in v1.1.1404
type MockAuth_Expecter struct {
// contains filtered or unexported fields
}
type MockAuth_authForNamedWorkflow_Call ¶ added in v1.1.1404
MockAuth_authForNamedWorkflow_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'authForNamedWorkflow'
func (*MockAuth_authForNamedWorkflow_Call) Return ¶ added in v1.1.1404
func (_c *MockAuth_authForNamedWorkflow_Call) Return(_a0 context.Context, _a1 error) *MockAuth_authForNamedWorkflow_Call
func (*MockAuth_authForNamedWorkflow_Call) Run ¶ added in v1.1.1404
func (_c *MockAuth_authForNamedWorkflow_Call) Run(run func(ctx context.Context, name string)) *MockAuth_authForNamedWorkflow_Call
func (*MockAuth_authForNamedWorkflow_Call) RunAndReturn ¶ added in v1.1.1404
func (_c *MockAuth_authForNamedWorkflow_Call) RunAndReturn(run func(context.Context, string) (context.Context, error)) *MockAuth_authForNamedWorkflow_Call
type MockAuth_authForNonWorkflow_Call ¶ added in v1.1.1404
MockAuth_authForNonWorkflow_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'authForNonWorkflow'
func (*MockAuth_authForNonWorkflow_Call) Return ¶ added in v1.1.1404
func (_c *MockAuth_authForNonWorkflow_Call) Return(_a0 context.Context, _a1 error) *MockAuth_authForNonWorkflow_Call
func (*MockAuth_authForNonWorkflow_Call) Run ¶ added in v1.1.1404
func (_c *MockAuth_authForNonWorkflow_Call) Run(run func(ctx context.Context)) *MockAuth_authForNonWorkflow_Call
func (*MockAuth_authForNonWorkflow_Call) RunAndReturn ¶ added in v1.1.1404
func (_c *MockAuth_authForNonWorkflow_Call) RunAndReturn(run func(context.Context) (context.Context, error)) *MockAuth_authForNonWorkflow_Call
type MockAuth_authForWorkflowId_Call ¶ added in v1.1.1404
MockAuth_authForWorkflowId_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'authForWorkflowId'
func (*MockAuth_authForWorkflowId_Call) Return ¶ added in v1.1.1404
func (_c *MockAuth_authForWorkflowId_Call) Return(_a0 context.Context, _a1 error) *MockAuth_authForWorkflowId_Call
func (*MockAuth_authForWorkflowId_Call) Run ¶ added in v1.1.1404
func (_c *MockAuth_authForWorkflowId_Call) Run(run func(ctx context.Context, workflowId string)) *MockAuth_authForWorkflowId_Call
func (*MockAuth_authForWorkflowId_Call) RunAndReturn ¶ added in v1.1.1404
func (_c *MockAuth_authForWorkflowId_Call) RunAndReturn(run func(context.Context, string) (context.Context, error)) *MockAuth_authForWorkflowId_Call
type MockAuth_authFromExecutionID_Call ¶ added in v1.1.1404
MockAuth_authFromExecutionID_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'authFromExecutionID'
func (*MockAuth_authFromExecutionID_Call) Return ¶ added in v1.1.1404
func (_c *MockAuth_authFromExecutionID_Call) Return(_a0 context.Context, _a1 *model.Execution, _a2 error) *MockAuth_authFromExecutionID_Call
func (*MockAuth_authFromExecutionID_Call) Run ¶ added in v1.1.1404
func (_c *MockAuth_authFromExecutionID_Call) Run(run func(ctx context.Context, executionID string)) *MockAuth_authFromExecutionID_Call
func (*MockAuth_authFromExecutionID_Call) RunAndReturn ¶ added in v1.1.1404
func (_c *MockAuth_authFromExecutionID_Call) RunAndReturn(run func(context.Context, string) (context.Context, *model.Execution, error)) *MockAuth_authFromExecutionID_Call
type MockAuth_authFromJobID_Call ¶ added in v1.1.1404
MockAuth_authFromJobID_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'authFromJobID'
func (*MockAuth_authFromJobID_Call) Return ¶ added in v1.1.1404
func (_c *MockAuth_authFromJobID_Call) Return(_a0 context.Context, _a1 *model.WorkflowState, _a2 error) *MockAuth_authFromJobID_Call
func (*MockAuth_authFromJobID_Call) Run ¶ added in v1.1.1404
func (_c *MockAuth_authFromJobID_Call) Run(run func(ctx context.Context, trackingID string)) *MockAuth_authFromJobID_Call
func (*MockAuth_authFromJobID_Call) RunAndReturn ¶ added in v1.1.1404
func (_c *MockAuth_authFromJobID_Call) RunAndReturn(run func(context.Context, string) (context.Context, *model.WorkflowState, error)) *MockAuth_authFromJobID_Call
type MockAuth_authFromProcessInstanceID_Call ¶ added in v1.1.1404
MockAuth_authFromProcessInstanceID_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'authFromProcessInstanceID'
func (*MockAuth_authFromProcessInstanceID_Call) Return ¶ added in v1.1.1404
func (_c *MockAuth_authFromProcessInstanceID_Call) Return(_a0 context.Context, _a1 *model.ProcessInstance, _a2 error) *MockAuth_authFromProcessInstanceID_Call
func (*MockAuth_authFromProcessInstanceID_Call) Run ¶ added in v1.1.1404
func (_c *MockAuth_authFromProcessInstanceID_Call) Run(run func(ctx context.Context, instanceID string)) *MockAuth_authFromProcessInstanceID_Call
func (*MockAuth_authFromProcessInstanceID_Call) RunAndReturn ¶ added in v1.1.1404
func (_c *MockAuth_authFromProcessInstanceID_Call) RunAndReturn(run func(context.Context, string) (context.Context, *model.ProcessInstance, error)) *MockAuth_authFromProcessInstanceID_Call
type MockAuth_authenticate_Call ¶ added in v1.1.1404
MockAuth_authenticate_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'authenticate'
func (*MockAuth_authenticate_Call) Return ¶ added in v1.1.1404
func (_c *MockAuth_authenticate_Call) Return(_a0 context.Context, _a1 header.Values, _a2 error) *MockAuth_authenticate_Call
func (*MockAuth_authenticate_Call) Run ¶ added in v1.1.1404
func (_c *MockAuth_authenticate_Call) Run(run func(ctx context.Context)) *MockAuth_authenticate_Call
func (*MockAuth_authenticate_Call) RunAndReturn ¶ added in v1.1.1404
func (_c *MockAuth_authenticate_Call) RunAndReturn(run func(context.Context) (context.Context, header.Values, error)) *MockAuth_authenticate_Call
type MockAuth_authorize_Call ¶ added in v1.1.1404
type MockAuth_authorize_Call struct {
}
MockAuth_authorize_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'authorize'
func (*MockAuth_authorize_Call) Return ¶ added in v1.1.1404
func (_c *MockAuth_authorize_Call) Return(_a0 context.Context, _a1 error) *MockAuth_authorize_Call
func (*MockAuth_authorize_Call) Run ¶ added in v1.1.1404
func (_c *MockAuth_authorize_Call) Run(run func(ctx context.Context, workflowName string)) *MockAuth_authorize_Call
func (*MockAuth_authorize_Call) RunAndReturn ¶ added in v1.1.1404
func (_c *MockAuth_authorize_Call) RunAndReturn(run func(context.Context, string) (context.Context, error)) *MockAuth_authorize_Call