persistence

package
v1.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 4, 2019 License: GPL-2.0 Imports: 9 Imported by: 0

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL