Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type NameRepositoryFactory ¶
type NameRepositoryFactory struct {
// contains filtered or unexported fields
}
NameRepositoryFactory is a default RepositoryFactoy implementation
func NewNameRepositoryFactory ¶
func NewNameRepositoryFactory(routerBuilder domain.RouterBuilder) NameRepositoryFactory
NewNameRepositoryFactory creates new NameRepositoryFactory with required dependencies
func (NameRepositoryFactory) GetRepositoryForName ¶
func (rep NameRepositoryFactory) GetRepositoryForName(requestedName string) (interface{}, error)
GetRepositoryForName gets a repository for requested type name. The type name is the exact name of the struct whose repository you are looking for
func (NameRepositoryFactory) GetRepositoryForType ¶
func (rep NameRepositoryFactory) GetRepositoryForType(requestedType interface{}) (interface{}, error)
GetRepositoryForType gets a repository for the request type. Normally you put a struct here
type RepositoryFactory ¶
type RepositoryFactory interface { GetRepositoryForType(interface{}) (interface{}, error) GetRepositoryForName(string) (interface{}, error) }
RepositoryFactory stores and let retireve repository implementations without knowing what implementation is in use
Click to show internal directories.
Click to hide internal directories.