Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterFactory ¶
RegisterFactory registers provided Factory within the container.
Types ¶
type Factory ¶
type Factory interface { FactoryCloser // Namer gets the repository name for given factory. DriverName() string // New creates new instance of the Repository for given 'model'. New(structer ModelStructer, model *mapping.ModelStruct) (Repository, error) }
Factory is the interface used for creating the repositories. It implements FactoryCloser and Namer interface.
func GetFactory ¶
GetFactory gets the factory with given driver 'name'.
type FactoryCloser ¶ added in v0.2.1
FactoryCloser is the interface used to close the connections.
type ModelStructer ¶
type ModelStructer interface {
ModelStruct(model interface{}) (*mapping.ModelStruct, error)
}
ModelStructer gets the model struct from the given model.
Click to show internal directories.
Click to hide internal directories.