example

package module
v0.0.0-...-0d6ed6e Latest Latest
Warning

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

Go to latest
Published: May 1, 2026 License: MIT Imports: 6 Imported by: 1

README

Dogma Example Application

An example Dogma application, which implements the features of a simple bank.

Build Status Code Coverage

Documentation

Overview

Package example is an example Dogma application with the features of a simple bank.

Index

Constants

View Source
const AppKey = "22028264-0bca-43e1-8d9d-cd094efb10b7"

AppKey is the example application's identity key.

Variables

This section is empty.

Functions

This section is empty.

Types

type App

type App struct {
	AccountAggregate         domain.AccountHandler
	CustomerAggregate        domain.CustomerHandler
	DailyDebitLimitAggregate domain.DailyDebitLimitHandler
	TransactionAggregate     domain.TransactionHandler

	DepositProcess                   domain.DepositProcessHandler
	OpenAccountForNewCustomerProcess domain.OpenAccountForNewCustomerProcessHandler
	TransferProcess                  domain.TransferProcessHandler
	WithdrawalProcess                domain.WithdrawalProcessHandler

	ThirdPartyBank integrations.ThirdPartyBankIntegrationHandler

	ReadDB             *sql.DB
	AccountProjection  projections.AccountProjectionHandler
	CustomerProjection projections.CustomerProjectionHandler
}

App is a dogma.Application implementation for the example "bank" domain.

func (*App) Configure

func (a *App) Configure(c dogma.ApplicationConfigurer)

Configure configures the Dogma engine for this application.

Directories

Path Synopsis
cmd
bank command
Package main is the entry-point for the banking example application.
Package main is the entry-point for the banking example application.
Package database provides functions for initializating the SQLite database used to store projection data.
Package database provides functions for initializating the SQLite database used to store projection data.
Package domain contains the business logic for the banking application.
Package domain contains the business logic for the banking application.
Package integrations implements Dogma integration handlers that communicate with external systems on behalf of the application.
Package integrations implements Dogma integration handlers that communicate with external systems on behalf of the application.
Package messages contains extra types used by the application's message definitions.
Package messages contains extra types used by the application's message definitions.
commands
Package commands contains the application's command message definitions.
Package commands contains the application's command message definitions.
events
Package events contains the application's event message definitions.
Package events contains the application's event message definitions.
internal/validation
Package validation contains some message validation helpers.
Package validation contains some message validation helpers.
Package projections implements Dogma projection handlers that build the read-models used to query the application state.
Package projections implements Dogma projection handlers that build the read-models used to query the application state.

Jump to

Keyboard shortcuts

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