Documentation ¶
Overview ¶
Package command implements application layer command wrappers
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( // ErrNotAuthorizedToArchiveAccount signals that the caller is not authorized to perform ArchiveAccount ErrNotAuthorizedToArchiveAccount = errors.NewAuthorizationError("ErrNotAuthorizedToArchiveAccount") // ErrArchiveAccountHasNoTarget signals that ArchiveAccount's target was not distinguishable ErrArchiveAccountHasNoTarget = errors.NewTargetIdentificationError("ErrArchiveAccountHasNoTarget") // ErrArchiveAccountLoadingFailed signals that ArchiveAccount storage failed to load the entity ErrArchiveAccountLoadingFailed = errors.NewStorageLoadingError("ErrArchiveAccountLoadingFailed") // ErrArchiveAccountSavingFailed signals that ArchiveAccount failed to save the entity ErrArchiveAccountSavingFailed = errors.NewStorageSavingError("ErrArchiveAccountSavingFailed") // ErrArchiveAccountFailedInDomain signals that ArchiveAccount failed in the domain layer ErrArchiveAccountFailedInDomain = errors.NewDomainError("ErrArchiveAccountFailedInDomain") )
var ( // ErrNotAuthorizedToBlockAccount signals that the caller is not authorized to perform BlockAccount ErrNotAuthorizedToBlockAccount = errors.NewAuthorizationError("ErrNotAuthorizedToBlockAccount") // ErrBlockAccountHasNoTarget signals that BlockAccount's target was not distinguishable ErrBlockAccountHasNoTarget = errors.NewTargetIdentificationError("ErrBlockAccountHasNoTarget") // ErrBlockAccountLoadingFailed signals that BlockAccount storage failed to load the entity ErrBlockAccountLoadingFailed = errors.NewStorageLoadingError("ErrBlockAccountLoadingFailed") // ErrBlockAccountSavingFailed signals that BlockAccount failed to save the entity ErrBlockAccountSavingFailed = errors.NewStorageSavingError("ErrBlockAccountSavingFailed") // ErrBlockAccountFailedInDomain signals that BlockAccount failed in the domain layer ErrBlockAccountFailedInDomain = errors.NewDomainError("ErrBlockAccountFailedInDomain") )
var ( // ErrNotAuthorizedToMakeNewAccount signals that the caller is not authorized to perform MakeNewAccount ErrNotAuthorizedToMakeNewAccount = errors.NewAuthorizationError("ErrNotAuthorizedToMakeNewAccount") // ErrMakeNewAccountHasNoTarget signals that MakeNewAccount's target was not distinguishable ErrMakeNewAccountHasNoTarget = errors.NewTargetIdentificationError("ErrMakeNewAccountHasNoTarget") // ErrMakeNewAccountLoadingFailed signals that MakeNewAccount storage failed to load the entity ErrMakeNewAccountLoadingFailed = errors.NewStorageLoadingError("ErrMakeNewAccountLoadingFailed") // ErrMakeNewAccountSavingFailed signals that MakeNewAccount failed to save the entity ErrMakeNewAccountSavingFailed = errors.NewStorageSavingError("ErrMakeNewAccountSavingFailed") // ErrMakeNewAccountFailedInDomain signals that MakeNewAccount failed in the domain layer ErrMakeNewAccountFailedInDomain = errors.NewDomainError("ErrMakeNewAccountFailedInDomain") )
var ( // ErrNotAuthorizedToMakeNewAccountQuick signals that the caller is not authorized to perform MakeNewAccountQuick ErrNotAuthorizedToMakeNewAccountQuick = errors.NewAuthorizationError("ErrNotAuthorizedToMakeNewAccountQuick") // ErrMakeNewAccountQuickHasNoTarget signals that MakeNewAccountQuick's target was not distinguishable ErrMakeNewAccountQuickHasNoTarget = errors.NewTargetIdentificationError("ErrMakeNewAccountQuickHasNoTarget") // ErrMakeNewAccountQuickLoadingFailed signals that MakeNewAccountQuick storage failed to load the entity ErrMakeNewAccountQuickLoadingFailed = errors.NewStorageLoadingError("ErrMakeNewAccountQuickLoadingFailed") // ErrMakeNewAccountQuickSavingFailed signals that MakeNewAccountQuick failed to save the entity ErrMakeNewAccountQuickSavingFailed = errors.NewStorageSavingError("ErrMakeNewAccountQuickSavingFailed") // ErrMakeNewAccountQuickFailedInDomain signals that MakeNewAccountQuick failed in the domain layer ErrMakeNewAccountQuickFailedInDomain = errors.NewDomainError("ErrMakeNewAccountQuickFailedInDomain") )
var ( // ErrNotAuthorizedToModifyBalanceFromSvc signals that the caller is not authorized to perform ModifyBalanceFromSvc ErrNotAuthorizedToModifyBalanceFromSvc = errors.NewAuthorizationError("ErrNotAuthorizedToModifyBalanceFromSvc") // ErrModifyBalanceFromSvcHasNoTarget signals that ModifyBalanceFromSvc's target was not distinguishable ErrModifyBalanceFromSvcHasNoTarget = errors.NewTargetIdentificationError("ErrModifyBalanceFromSvcHasNoTarget") // ErrModifyBalanceFromSvcLoadingFailed signals that ModifyBalanceFromSvc storage failed to load the entity ErrModifyBalanceFromSvcLoadingFailed = errors.NewStorageLoadingError("ErrModifyBalanceFromSvcLoadingFailed") // ErrModifyBalanceFromSvcSavingFailed signals that ModifyBalanceFromSvc failed to save the entity ErrModifyBalanceFromSvcSavingFailed = errors.NewStorageSavingError("ErrModifyBalanceFromSvcSavingFailed") // ErrModifyBalanceFromSvcFailedInDomain signals that ModifyBalanceFromSvc failed in the domain layer ErrModifyBalanceFromSvcFailedInDomain = errors.NewDomainError("ErrModifyBalanceFromSvcFailedInDomain") )
var ( // ErrNotAuthorizedToModifyBalance signals that the caller is not authorized to perform ModifyBalance ErrNotAuthorizedToModifyBalance = errors.NewAuthorizationError("ErrNotAuthorizedToModifyBalance") // ErrModifyBalanceHasNoTarget signals that ModifyBalance's target was not distinguishable ErrModifyBalanceHasNoTarget = errors.NewTargetIdentificationError("ErrModifyBalanceHasNoTarget") // ErrModifyBalanceLoadingFailed signals that ModifyBalance storage failed to load the entity ErrModifyBalanceLoadingFailed = errors.NewStorageLoadingError("ErrModifyBalanceLoadingFailed") // ErrModifyBalanceSavingFailed signals that ModifyBalance failed to save the entity ErrModifyBalanceSavingFailed = errors.NewStorageSavingError("ErrModifyBalanceSavingFailed") // ErrModifyBalanceFailedInDomain signals that ModifyBalance failed in the domain layer ErrModifyBalanceFailedInDomain = errors.NewDomainError("ErrModifyBalanceFailedInDomain") )
var ( // ErrValidateHolderHasNoTarget signals that ValidateHolder's target was not distinguishable ErrValidateHolderHasNoTarget = errors.NewTargetIdentificationError("ErrValidateHolderHasNoTarget") // ErrValidateHolderLoadingFailed signals that ValidateHolder storage failed to load the entity ErrValidateHolderLoadingFailed = errors.NewStorageLoadingError("ErrValidateHolderLoadingFailed") // ErrValidateHolderSavingFailed signals that ValidateHolder failed to save the entity ErrValidateHolderSavingFailed = errors.NewStorageSavingError("ErrValidateHolderSavingFailed") // ErrValidateHolderFailedInDomain signals that ValidateHolder failed in the domain layer ErrValidateHolderFailedInDomain = errors.NewDomainError("ErrValidateHolderFailedInDomain") )
Functions ¶
This section is empty.
Types ¶
type ArchiveAccountHandlerWrapper ¶
type ArchiveAccountHandlerWrapper struct {
// contains filtered or unexported fields
}
ArchiveAccountHandlerWrapper knows how to perform ArchiveAccount
func NewArchiveAccountHandlerWrapper ¶
func NewArchiveAccountHandlerWrapper(rw app.RequiresStorageWriterReader, p app.RequiresPolicer) *ArchiveAccountHandlerWrapper
NewArchiveAccountHandlerWrapper returns ArchiveAccountHandlerWrapper
func (ArchiveAccountHandlerWrapper) Handle ¶
func (h ArchiveAccountHandlerWrapper) Handle(ctx context.Context, aa domain.ArchiveAccount, actor app.OffersAuthorizable, target app.OffersDistinguishable) error
Handle generically performs ArchiveAccount
type BlockAccountHandlerWrapper ¶
type BlockAccountHandlerWrapper struct {
// contains filtered or unexported fields
}
BlockAccountHandlerWrapper knows how to perform BlockAccount
func NewBlockAccountHandlerWrapper ¶
func NewBlockAccountHandlerWrapper(rw app.RequiresStorageWriterReader, p app.RequiresPolicer) *BlockAccountHandlerWrapper
NewBlockAccountHandlerWrapper returns BlockAccountHandlerWrapper
func (BlockAccountHandlerWrapper) Handle ¶
func (h BlockAccountHandlerWrapper) Handle(ctx context.Context, ba domain.BlockAccount, actor app.OffersAuthorizable, target app.OffersDistinguishable) error
Handle generically performs BlockAccount
type Commands ¶
type Commands struct { MakeNewAccount MakeNewAccountHandlerWrapper `` MakeNewAccountQuick MakeNewAccountQuckHandlerWrapper `command:"topic,account"` ArchiveAccount ArchiveAccountHandlerWrapper `` BlockAccount BlockAccountHandlerWrapper `` ValidateHolder BlockAccountHandlerWrapper `command:"w/o policy"` ModifyBalance ModifyBalanceHandlerWrapper `` ModifyBalanceFromSvc ModifyBalanceHandlerWrapper `command:"topic,balance; adapters,svc:github.com/xoe-labs/ddd-gen/internal/test-svc/app/ifaces.Balancer"` }
type MakeNewAccountHandlerWrapper ¶
type MakeNewAccountHandlerWrapper struct {
// contains filtered or unexported fields
}
MakeNewAccountHandlerWrapper knows how to perform MakeNewAccount
func NewMakeNewAccountHandlerWrapper ¶
func NewMakeNewAccountHandlerWrapper(rw app.RequiresStorageWriterReader, p app.RequiresPolicer) *MakeNewAccountHandlerWrapper
NewMakeNewAccountHandlerWrapper returns MakeNewAccountHandlerWrapper
func (MakeNewAccountHandlerWrapper) Handle ¶
func (h MakeNewAccountHandlerWrapper) Handle(ctx context.Context, mna domain.MakeNewAccount, actor app.OffersAuthorizable, target app.OffersDistinguishable) error
Handle generically performs MakeNewAccount
type MakeNewAccountQuickHandlerWrapper ¶
type MakeNewAccountQuickHandlerWrapper struct {
// contains filtered or unexported fields
}
MakeNewAccountQuickHandlerWrapper knows how to perform MakeNewAccountQuick
func NewMakeNewAccountQuickHandlerWrapper ¶
func NewMakeNewAccountQuickHandlerWrapper(rw app.RequiresStorageWriterReader, p app.RequiresPolicer) *MakeNewAccountQuickHandlerWrapper
NewMakeNewAccountQuickHandlerWrapper returns MakeNewAccountQuickHandlerWrapper
func (MakeNewAccountQuickHandlerWrapper) Handle ¶
func (h MakeNewAccountQuickHandlerWrapper) Handle(ctx context.Context, mnaq domain.MakeNewAccountQuick, actor app.OffersAuthorizable, target app.OffersDistinguishable) error
Handle generically performs MakeNewAccountQuick
type ModifyBalanceFromSvcHandlerWrapper ¶
type ModifyBalanceFromSvcHandlerWrapper struct {
// contains filtered or unexported fields
}
ModifyBalanceFromSvcHandlerWrapper knows how to perform ModifyBalanceFromSvc
func NewModifyBalanceFromSvcHandlerWrapper ¶
func NewModifyBalanceFromSvcHandlerWrapper(svc ifaces.Balancer, rw app.RequiresStorageWriterReader, p app.RequiresPolicer) *ModifyBalanceFromSvcHandlerWrapper
NewModifyBalanceFromSvcHandlerWrapper returns ModifyBalanceFromSvcHandlerWrapper
func (ModifyBalanceFromSvcHandlerWrapper) Handle ¶
func (h ModifyBalanceFromSvcHandlerWrapper) Handle(ctx context.Context, mbfs domain.ModifyBalanceFromSvc, actor app.OffersAuthorizable, target app.OffersDistinguishable) error
Handle generically performs ModifyBalanceFromSvc
type ModifyBalanceHandlerWrapper ¶
type ModifyBalanceHandlerWrapper struct {
// contains filtered or unexported fields
}
ModifyBalanceHandlerWrapper knows how to perform ModifyBalance
func NewModifyBalanceHandlerWrapper ¶
func NewModifyBalanceHandlerWrapper(rw app.RequiresStorageWriterReader, p app.RequiresPolicer) *ModifyBalanceHandlerWrapper
NewModifyBalanceHandlerWrapper returns ModifyBalanceHandlerWrapper
func (ModifyBalanceHandlerWrapper) Handle ¶
func (h ModifyBalanceHandlerWrapper) Handle(ctx context.Context, mb domain.ModifyBalance, actor app.OffersAuthorizable, target app.OffersDistinguishable) error
Handle generically performs ModifyBalance
type ValidateHolderHandlerWrapper ¶
type ValidateHolderHandlerWrapper struct {
// contains filtered or unexported fields
}
ValidateHolderHandlerWrapper knows how to perform ValidateHolder
func NewValidateHolderHandlerWrapper ¶
func NewValidateHolderHandlerWrapper(rw app.RequiresStorageWriterReader) *ValidateHolderHandlerWrapper
NewValidateHolderHandlerWrapper returns ValidateHolderHandlerWrapper
func (ValidateHolderHandlerWrapper) Handle ¶
func (h ValidateHolderHandlerWrapper) Handle(ctx context.Context, vh domain.ValidateHolder, actor app.OffersAuthorizable, target app.OffersDistinguishable) error
Handle generically performs ValidateHolder