repository

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: May 26, 2019 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterFactory

func RegisterFactory(f Factory) error

RegisterFactory registers provided Factory within the container

Types

type Factory

type Factory interface {
	New(structer ModelStructer, model *mapping.ModelStruct) (Repository, error)
	Repository
}

Factory is the interface used for creating the repositories

func GetFactory

func GetFactory(name string) Factory

GetFactory gets the repository factory

type ModelStructer

type ModelStructer interface {
	ModelStruct(model interface{}) (*mapping.ModelStruct, error)
}

ModelStructer gets the model struct

type Repository

type Repository interface {
	RepositoryName() string
}

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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