repository

package
v0.0.0-...-eecab09 Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ErrorCodeDatasource = domainerrors.ErrorCodeInfraRepo + domainerrors.ErrorCodeInfraRepoCRUD + iota
	ErrorCodeRepoTransform
	ErrorCodeRepoBackToDomain
	ErrorCodeRepoCast
	ErrorCodeRepoCreate
	ErrorCodeRepoDelete
	ErrorCodeRepoUpdate
	ErrorCodeRepoUpdateWithFields
	ErrorCodeRepoGet
	ErrorCodeRepoGetAll
	ErrorCodeRepoSet
	ErrorCodeRepoCreateTx
	ErrorCodeRepoDeleteTx
	ErrorCodeRepoUpdateTx
	ErrorCodeRepoUpdateWithFieldsTx
	ErrorCodeRepoParseMap
)

Variables

View Source
var (
	ErrCastTypeFailed = errors.New("repo transform failed")
)

Functions

This section is empty.

Types

type CRUDImpl

type CRUDImpl struct {
	DB        datasource.IDataSource
	Redis     datasource.ICacheDataSource
	Cache     datasource.ICacheDataSource
	DTOEntity dto.IRepoEntity
}

CRUDImpl -.

func NewCRUDImpl

NewCRUDImpl -.

func (*CRUDImpl) Create

func (r *CRUDImpl) Create(ctx context.Context, e domain.IEntity) (domain.IEntity, error)

Create -.

func (*CRUDImpl) CreateTx

CreateTx -.

func (*CRUDImpl) Delete

func (r *CRUDImpl) Delete(ctx context.Context, e domain.IEntity) (domain.IEntity, error)

Delete -.

func (*CRUDImpl) DeleteTx

DeleteTx -.

func (*CRUDImpl) GetAll

func (r *CRUDImpl) GetAll(ctx context.Context, sq *domain.SearchQuery, e domain.IEntity) (*domain.List, error)

GetAll -.

func (*CRUDImpl) GetByID

func (r *CRUDImpl) GetByID(ctx context.Context, e domain.IEntity) (domain.IEntity, error)

GetByID -.

func (*CRUDImpl) Update

func (r *CRUDImpl) Update(ctx context.Context, e domain.IEntity) (domain.IEntity, error)

Update -.

func (*CRUDImpl) UpdateTx

func (*CRUDImpl) UpdateWithFields

func (r *CRUDImpl) UpdateWithFields(ctx context.Context, e domain.IEntity, keys []string) (domain.IEntity, error)

func (*CRUDImpl) UpdateWithFieldsTx

func (r *CRUDImpl) UpdateWithFieldsTx(ctx context.Context, e domain.IEntity, keys []string, tx domain.ITransactionEvent) (domain.IEntity, error)

type TransactionRunRepoImpl

type TransactionRunRepoImpl struct {
	// contains filtered or unexported fields
}

func NewTransactionRunRepoImpl

func NewTransactionRunRepoImpl(tr datasource.ITransactionRun) *TransactionRunRepoImpl

NewTransactionRunRepoImpl -.

func (*TransactionRunRepoImpl) RunTransaction

RunTransaction -.

Jump to

Keyboard shortcuts

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