service

package
v0.0.0-...-4383a04 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2017 License: MIT Imports: 9 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AspectService

type AspectService interface {
	Service
	Insert(*model.Aspect) error
	Get(int64) (*model.Aspect, error)
	Count() (int64, error)
	Find(int, int) (*model.Aspect, error)
	Create(int, int) (*model.Aspect, error)
	FindOrCreate(int, int) (*model.Aspect, error)
	FindIn([]int64) ([]*model.Aspect, error)
}

type CoverPartialService

type CoverPartialService interface {
	Service
	Get(int64) (*model.CoverPartial, error)
	Insert(*model.CoverPartial) error
	BulkInsert([]*model.CoverPartial) (int64, error)
	Count(*model.Cover) (int64, error)
	Update(*model.CoverPartial) error
	Delete(*model.CoverPartial) error
	FindAll(int64, string) ([]*model.CoverPartial, error)
}

type CoverService

type CoverService interface {
	Service
	Get(int64) (*model.Cover, error)
	Insert(*model.Cover) error
	Update(*model.Cover) error
	Delete(*model.Cover) error
	GetOneBy(string, ...interface{}) (*model.Cover, error)
	FindAll(string) ([]*model.Cover, error)
}

type GidxPartialService

type GidxPartialService interface {
	Service
	Insert(*model.GidxPartial) error
	BulkInsert([]*model.GidxPartial) (int64, error)
	Update(*model.GidxPartial) error
	Delete(*model.GidxPartial) error
	Get(int64) (*model.GidxPartial, error)
	GetOneBy(string, interface{}) (*model.GidxPartial, error)
	ExistsBy(string, ...interface{}) (bool, error)
	Count() (int64, error)
	CountBy(string, ...interface{}) (int64, error)
	CountForMacro(*model.Macro) (int64, error)
	Find(*model.Gidx, *model.Aspect) (*model.GidxPartial, error)
	Create(*model.Gidx, *model.Aspect) (*model.GidxPartial, error)
	FindOrCreate(*model.Gidx, *model.Aspect) (*model.GidxPartial, error)
	FindMissing(*model.Aspect, string, int, int) ([]*model.Gidx, error)
	CountMissing([]*model.Aspect) (int64, error)
}

type GidxService

type GidxService interface {
	Service
	Insert(*model.Gidx) error
	Update(*model.Gidx) (int64, error)
	Delete(*model.Gidx) (int64, error)
	Get(int64) (*model.Gidx, error)
	GetOneBy(string, interface{}) (*model.Gidx, error)
	ExistsBy(string, interface{}) (bool, error)
	Count() (int64, error)
	CountBy(string, interface{}) (int64, error)
	FindAll(string, int, int) ([]*model.Gidx, error)
}

type MacroPartialService

type MacroPartialService interface {
	Service
	Insert(*model.MacroPartial) error
	Update(*model.MacroPartial) error
	Delete(*model.MacroPartial) error
	Get(int64) (*model.MacroPartial, error)
	GetOneBy(string, interface{}) (*model.MacroPartial, error)
	ExistsBy(string, interface{}) (bool, error)
	Count(*model.Macro) (int64, error)
	FindAll(string, int, int, string, ...interface{}) ([]*model.MacroPartial, error)
	Find(*model.Macro, *model.CoverPartial) (*model.MacroPartial, error)
	Create(*model.Macro, *model.CoverPartial) (*model.MacroPartial, error)
	FindOrCreate(*model.Macro, *model.CoverPartial) (*model.MacroPartial, error)
	CountMissing(*model.Macro) (int64, error)
	FindMissing(*model.Macro, string, int, int) ([]*model.CoverPartial, error)
	AspectIds(int64) ([]int64, error)
}

type MacroService

type MacroService interface {
	Service
	Get(int64) (*model.Macro, error)
	Insert(*model.Macro) error
	Update(*model.Macro) error
	Delete(*model.Macro) error
	GetOneBy(string, ...interface{}) (*model.Macro, error)
	ExistsBy(string, ...interface{}) (bool, error)
	FindAll(string) ([]*model.Macro, error)
}

type MosaicPartialService

type MosaicPartialService interface {
	Service
	Get(int64) (*model.MosaicPartial, error)
	Insert(*model.MosaicPartial) error
	Count(*model.Mosaic) (int64, error)
	CountMissing(*model.Mosaic) (int64, error)
	GetMissing(*model.Mosaic) (*model.MacroPartial, error)
	GetRandomMissing(*model.Mosaic) (*model.MacroPartial, error)
	FindAllPartialViews(*model.Mosaic, string, int, int) ([]*model.MosaicPartialView, error)
	FindRepeats(*model.Mosaic, int) ([]int64, error)
}

type MosaicService

type MosaicService interface {
	Service
	Get(int64) (*model.Mosaic, error)
	Insert(*model.Mosaic) error
	Update(*model.Mosaic) (int64, error)
	GetOneBy(string, ...interface{}) (*model.Mosaic, error)
	ExistsBy(string, ...interface{}) (bool, error)
	FindAll(string) ([]*model.Mosaic, error)
}

type PartialComparisonService

type PartialComparisonService interface {
	Service
	Insert(*model.PartialComparison) error
	BulkInsert([]*model.PartialComparison) (int64, error)
	Update(*model.PartialComparison) error
	Delete(*model.PartialComparison) error
	DeleteBy(string, ...interface{}) error
	DeleteFrom(*model.Macro) error
	Get(int64) (*model.PartialComparison, error)
	GetOneBy(string, ...interface{}) (*model.PartialComparison, error)
	ExistsBy(string, ...interface{}) (bool, error)
	Count() (int64, error)
	CountBy(string, ...interface{}) (int64, error)
	FindAll(string, int, int, string, ...interface{}) ([]*model.PartialComparison, error)
	Find(*model.MacroPartial, *model.GidxPartial) (*model.PartialComparison, error)
	Create(*model.MacroPartial, *model.GidxPartial) (*model.PartialComparison, error)
	FindOrCreate(*model.MacroPartial, *model.GidxPartial) (*model.PartialComparison, error)
	CountMissing(macro *model.Macro) (int64, error)
	FindMissing(*model.Macro, int) ([]*model.MacroGidxView, error)
	CreateFromView(*model.MacroGidxView) (*model.PartialComparison, error)
	GetClosest(*model.MacroPartial) (int64, error)
	GetClosestMax(*model.MacroPartial, *model.Mosaic, int) (int64, error)
	GetBestAvailable(*model.Mosaic) (*model.PartialComparison, error)
	GetBestAvailableMax(*model.Mosaic, int) (*model.PartialComparison, error)
}

type ProjectService

type ProjectService interface {
	Service
	Get(int64) (*model.Project, error)
	Insert(*model.Project) error
	Update(*model.Project) (int64, error)
	GetOneBy(string, ...interface{}) (*model.Project, error)
	ExistsBy(string, ...interface{}) (bool, error)
	FindAll(string) ([]*model.Project, error)
}

type QuadDistService

type QuadDistService interface {
	Service
	Get(int64) (*model.QuadDist, error)
	Insert(*model.QuadDist) error
	GetWorst(*model.Macro, int, int) (*model.CoverPartialQuadView, error)
}

type Service

type Service interface {
	Register() error
	Close() error
}

type ServiceFactory

type ServiceFactory interface {
	Close() error

	GidxService() (GidxService, error)
	AspectService() (AspectService, error)
	GidxPartialService() (GidxPartialService, error)
	CoverService() (CoverService, error)
	CoverPartialService() (CoverPartialService, error)
	MacroService() (MacroService, error)
	MacroPartialService() (MacroPartialService, error)
	PartialComparisonService() (PartialComparisonService, error)
	MosaicService() (MosaicService, error)
	MosaicPartialService() (MosaicPartialService, error)
	QuadDistService() (QuadDistService, error)
	ProjectService() (ProjectService, error)

	MustGidxService() GidxService
	MustAspectService() AspectService
	MustGidxPartialService() GidxPartialService
	MustCoverService() CoverService
	MustCoverPartialService() CoverPartialService
	MustMacroService() MacroService
	MustMacroPartialService() MacroPartialService
	MustPartialComparisonService() PartialComparisonService
	MustMosaicService() MosaicService
	MustMosaicPartialService() MosaicPartialService
	MustQuadDistService() QuadDistService
	MustProjectService() ProjectService
}

func NewServiceFactory

func NewServiceFactory(dsn string) (ServiceFactory, error)

type ServiceName

type ServiceName uint8
const (
	GidxServiceName ServiceName = iota
	AspectServiceName
	GidxPartialServiceName
	CoverServiceName
	CoverPartialServiceName
	MacroServiceName
	MacroPartialServiceName
	PartialComparisonServiceName
	MosaicServiceName
	MosaicPartialServiceName
	QuadDistServiceName
	ProjectServiceName
)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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