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 { New(structer ModelStructer, model *mapping.ModelStruct) (Repository, error) Namer FactoryCloser }
Factory is the interface used for creating the repositories
type FactoryCloser ¶ added in v0.1.4
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
type Namer ¶ added in v0.1.4
type Namer interface {
RepositoryName() string
}
Namer is the interface that defines the repository name
type Repository ¶
Repository is the interface that defines the basic neuron Repository it may be extended by the interfaces from the scope package
func GetRepository ¶
func GetRepository(structer ModelStructer, model interface{}) (Repository, error)
GetRepository gets the repository instance for the provided model
Click to show internal directories.
Click to hide internal directories.