Documentation ¶
Overview ¶
Package application contains the code declaration of the necessary interfaces which hold the business logic of our application.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Transactional ¶
func Transactional(db DB, todo func(f Application) error) error
Transactional executes the given function in a transaction. If todo returns an error, the transaction is rolled back
Types ¶
type Application ¶
type Application interface { Identities() account.IdentityRepository SpaceResources() space.ResourceRepository Users() account.UserRepository OauthStates() auth.OauthStateReferenceRepository }
An Application stands for a particular implementation of the business logic of our application
type DB ¶
type DB interface { Application BeginTransaction() (Transaction, error) }
A DB stands for a particular database (or a mock/fake thereof). It also includes "Application" for creating transactionless repositories
type Transaction ¶
type Transaction interface { Application Commit() error Rollback() error }
A Transaction abstracts a database transaction. The repositories created for the transaction object make changes inside the the transaction
Directories ¶
Path | Synopsis |
---|---|
Package repository contains interfaces used by our repositories.
|
Package repository contains interfaces used by our repositories. |
Click to show internal directories.
Click to hide internal directories.