Documentation ¶
Overview ¶
Package validation provides a repository decorator that provides in-memory validation before calling the decorated repository.
This decorator does not provide a ForeignKey-like functionality. This should be provided by business logic (or other decorator).
Usage:
repo, err := mongodb.New(config) repo, _ = validation.New(repo)
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func New ¶
func New(backend model.IRepository, val model.Validator) (model.IRepository, error)
New returns an IRepository that performs validation before calling the actual repository.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.