Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CloseAll ¶ added in v0.2.1
CloseAll closes all repositoriy instances for all registered factories.
func RegisterFactory ¶
RegisterFactory registers provided Factory within the container.
Types ¶
type Controller ¶ added in v0.2.2
type Controller interface {
ModelStruct(model interface{}) (*mapping.ModelStruct, error)
}
Controller gets the model struct from the given model.
type Factory ¶
type Factory interface { // Namer gets the repository name for given factory. DriverName() string // New creates new instance of the Repository for given 'model'. New(c Controller, model *mapping.ModelStruct) (Repository, error) // Close should close all the repository instances for this factory. Close(ctx context.Context, done chan<- interface{}) }
Factory is the interface used for creating the repositories.
func GetFactory ¶
GetFactory gets the factory with given driver 'name'.
Click to show internal directories.
Click to hide internal directories.