repo

package
v0.0.0-...-aef14cd Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2024 License: Unlicense Imports: 11 Imported by: 0

Documentation

Overview

Package repo TODO.

Package repo TODO.

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrBadPool = fmt.Errorf("bad Database pool")
)
View Source
var (
	ErrNotFound = fmt.Errorf("not found in cache")
)

Functions

func GetAssetPostgresCachedRepo

func GetAssetPostgresCachedRepo(prop env.Properties) domain.Repo[*entity.Asset]

func GetAssetTxPostgres

func GetAssetTxPostgres(prop env.Properties) domain.Dft[*entity.Asset]

func GetAssetTypePostgresCachedRepo

func GetAssetTypePostgresCachedRepo(prop env.Properties) domain.Repo[*entity.AssetType]

func GetAssetTypePostgresRepo

func GetAssetTypePostgresRepo(prop env.Properties) domain.Repo[*entity.AssetType]

func GetFavoritesDeletedPostgresRepo

func GetFavoritesDeletedPostgresRepo(prop env.Properties) domain.Repo[*entity.FavoritesDeleted]

func GetFavoritesPostgresCachedRepo

func GetFavoritesPostgresCachedRepo(prop env.Properties) domain.Repo[*entity.Favorites]

func GetFavoritesTxPostgres

func GetFavoritesTxPostgres(prop env.Properties) domain.Dft[*entity.Favorites]

func GetUserPostgresCachedRepo

func GetUserPostgresCachedRepo(prop env.Properties) domain.Repo[*entity.User]

func GetUserPostgresRepo

func GetUserPostgresRepo(prop env.Properties) domain.Repo[*entity.User]

Types

type CachedPostgres

type CachedPostgres[E domain.Entity] struct {
	// contains filtered or unexported fields
}

func (*CachedPostgres[E]) Delete

func (p *CachedPostgres[E]) Delete(ctx context.Context, entity E, scan func(domain.Scanner)) (E, error)

func (*CachedPostgres[E]) Get

func (p *CachedPostgres[E]) Get(ctx context.Context, entity E, scan func(domain.Scanner)) (e E, err error)

func (*CachedPostgres[E]) GetByFilter

func (p *CachedPostgres[E]) GetByFilter(ctx context.Context, entity E, scan func(domain.Scanner) E) ([]E, error)

func (*CachedPostgres[E]) Insert

func (p *CachedPostgres[E]) Insert(ctx context.Context, entity E, scan func(domain.Scanner)) (E, error)

func (*CachedPostgres[E]) Update

func (p *CachedPostgres[E]) Update(ctx context.Context, entity E, scan func(domain.Scanner)) (E, error)

type Postgres

type Postgres[E domain.Entity] struct {
	// contains filtered or unexported fields
}

func (*Postgres[E]) Delete

func (p *Postgres[E]) Delete(ctx context.Context, entity E, scan func(domain.Scanner)) (E, error)

func (*Postgres[E]) Get

func (p *Postgres[E]) Get(ctx context.Context, entity E, scan func(domain.Scanner)) (E, error)

func (*Postgres[E]) GetByFilter

func (p *Postgres[E]) GetByFilter(ctx context.Context, entity E, scan func(domain.Scanner) E) ([]E, error)

func (*Postgres[E]) Insert

func (p *Postgres[E]) Insert(ctx context.Context, entity E, scan func(domain.Scanner)) (E, error)

func (*Postgres[E]) Update

func (p *Postgres[E]) Update(ctx context.Context, entity E, scan func(domain.Scanner)) (E, error)

type TxPostgres

type TxPostgres[S domain.Suite] struct {
	// contains filtered or unexported fields
}

func (*TxPostgres[S]) DoDelete

func (p *TxPostgres[S]) DoDelete(ctx context.Context, entity S, scan func(domain.Scanner)) (err error)

func (*TxPostgres[S]) DoUpsert

func (p *TxPostgres[S]) DoUpsert(ctx context.Context, entity S, scan func(domain.Scanner)) (err error)

Jump to

Keyboard shortcuts

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