cqrs

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2024 License: Apache-2.0 Imports: 2 Imported by: 22

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

type Handler[TParams any, TResponse any] interface {
	Handle(context.Context, TParams) (TResponse, *i18np.Error)
}

Handler is the interface that must be implemented by a command or query handler It is used to execute a command or query The first parameter is the context The second parameter is the command or query The return value is the response and an error The error is an i18np.Error The error is nil if the command or query is executed successfully The error is not nil if the command or query is not executed successfully

type HandlerFunc

type HandlerFunc[TParams any, TResponse any] func(context.Context, TParams) (TResponse, *i18np.Error)

HandlerFunc is a function that can be used as a Handler It is used to convert a function to a Handler

Jump to

Keyboard shortcuts

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