Documentation
¶
Index ¶
- type AppInteractor
- func (ai *AppInteractor) Create(app domain.App) (string, error)
- func (ai *AppInteractor) CreateBatch(apps []domain.App) ([]string, error)
- func (ai *AppInteractor) Delete(id string) (string, error)
- func (ai *AppInteractor) DeleteBatch(ids []string) ([]string, error)
- func (ai *AppInteractor) Get(id string) (domain.App, error)
- func (ai *AppInteractor) Search(id string) ([]domain.App, error)
- type IRepository
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AppInteractor ¶
type AppInteractor struct {
AppRepository IRepository
}
func NewAppInteractor ¶
func NewAppInteractor(appRepository IRepository) *AppInteractor
NewAppInteractor allows to create new AppInteractor object.
func (*AppInteractor) Create ¶
func (ai *AppInteractor) Create(app domain.App) (string, error)
Create allows to persist an App Object. It returns the persisted App Object identifier if App was persisted properly. It returns an error if something went wrong during the persist operation. Implements IAppInteractor interface.
func (*AppInteractor) CreateBatch ¶
func (ai *AppInteractor) CreateBatch(apps []domain.App) ([]string, error)
CreateBatch allows to persist multiple App Objects. It returns the persisted objects identifiers if Apps were persisted properly. It returns an error if something went wrong during the persist operation. Implements IAppInteractor interface.
func (*AppInteractor) Delete ¶
func (ai *AppInteractor) Delete(id string) (string, error)
Delete allows to delete an App Object. It returns the deleted App Object identifier if App was deleted properly. It returns an error if something went wrong during the delete operation. Implements IAppInteractor interface.
func (*AppInteractor) DeleteBatch ¶
func (ai *AppInteractor) DeleteBatch(ids []string) ([]string, error)
DeleteBatch allows to delete multiple App Objects. It returns the deleted App Object identifiers if App were deleted properly. It returns an error if something went wrong during the delete operation. Implements IAppInteractor interface.