repository

package
v1.8.2 Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MapperCommon

type MapperCommon interface {
	MapDomainToModels() ModelsCommon
	MapModelsToDomain(entityStruct interface{})
}

MapperCommon template for common mapper models

type ModelsCommon

type ModelsCommon interface {
	GetTableName() string
	GetModels() interface{}
	GetModelsMap() map[string]interface{}
	GetColumns() []string
	GetValStruct(arrColumn []string) []interface{}
}

ModelsCommon template for common models repository

type NgetesRepository

type NgetesRepository interface {
	Get(ctx context.Context, query utils.QueryBuilderInteractor) (*entity.Ngetes, error)
	GetList(ctx context.Context, query utils.QueryBuilderInteractor) ([]*entity.Ngetes, error)
	GetCount(ctx context.Context, query utils.QueryBuilderInteractor) (int, error)
	Save(ctx context.Context, data *entity.Ngetes) error
	Update(ctx context.Context, id string, data *entity.Ngetes) error
}

NgetesRepository ngetes repository template

type SqlTx

type SqlTx interface {
	BeginTx(ctx context.Context, operation func(ctx context.Context, repo *Wrapper) error) error
	Session() *database.TX
	Wrapper() *Wrapper
	DB() *sql.DB
}

SqlTx template for common transaction repository

type TesBaruRepository

type TesBaruRepository interface {
	Get(ctx context.Context, query utils.QueryBuilderInteractor) (*entity.TesBaru, error)
	GetList(ctx context.Context, query utils.QueryBuilderInteractor) ([]*entity.TesBaru, error)
	GetCount(ctx context.Context, query utils.QueryBuilderInteractor) (int, error)
	Save(ctx context.Context, data *entity.TesBaru) error
	Update(ctx context.Context, id string, data *entity.TesBaru) error
	Delete(ctx context.Context, id string) error
}

TesBaruRepository tes baru repository template

type Wrapper

type Wrapper struct {
	TesBaruRepo TesBaruRepository
	NgetesRepo  NgetesRepository
	SqlTx
}

Jump to

Keyboard shortcuts

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