mw

package
v0.0.0-...-833cb33 Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2020 License: AGPL-3.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WrapCategoryEventObservability

func WrapCategoryEventObservability(svcUnwrap domain.CategoryEventBus, logger log.Logger) domain.CategoryEventBus

HOC-like function to inject observability to the event bus implementation

func WrapCategoryRepoTools

func WrapCategoryRepoTools(svcUnwrap domain.CategoryRepository, redisPool *redis.Client, cfg *config.Kernel) domain.CategoryRepository

Types

type CategoryEventLog

type CategoryEventLog struct {
	Logger log.Logger
	Next   domain.CategoryEventBus
}

func (CategoryEventLog) Created

func (c CategoryEventLog) Created(ctx context.Context, category domain.Category) (err error)

func (CategoryEventLog) HardRemoved

func (c CategoryEventLog) HardRemoved(ctx context.Context, id string) (err error)

func (CategoryEventLog) Removed

func (c CategoryEventLog) Removed(ctx context.Context, id string) (err error)

func (CategoryEventLog) Restored

func (c CategoryEventLog) Restored(ctx context.Context, id string) (err error)

func (CategoryEventLog) Updated

func (c CategoryEventLog) Updated(ctx context.Context, category domain.Category) (err error)

type CategoryEventTracing

type CategoryEventTracing struct {
	Next domain.CategoryEventBus
}

func (CategoryEventTracing) Created

func (c CategoryEventTracing) Created(ctx context.Context, category domain.Category) (err error)

func (CategoryEventTracing) HardRemoved

func (c CategoryEventTracing) HardRemoved(ctx context.Context, id string) (err error)

func (CategoryEventTracing) Removed

func (c CategoryEventTracing) Removed(ctx context.Context, id string) (err error)

func (CategoryEventTracing) Restored

func (c CategoryEventTracing) Restored(ctx context.Context, id string) (err error)

func (CategoryEventTracing) Updated

func (c CategoryEventTracing) Updated(ctx context.Context, category domain.Category) (err error)

type CategoryRepositoryCache

type CategoryRepositoryCache struct {
	Pool *redis.Client
	Cfg  *config.Kernel
	Next domain.CategoryRepository
	Mu   *sync.RWMutex
}

func (CategoryRepositoryCache) Fetch

func (CategoryRepositoryCache) FetchByID

func (c CategoryRepositoryCache) FetchByID(ctx context.Context, id string, activeOnly bool) (category *domain.Category, err error)

func (CategoryRepositoryCache) HardRemove

func (c CategoryRepositoryCache) HardRemove(ctx context.Context, id string) (err error)

func (CategoryRepositoryCache) Remove

func (c CategoryRepositoryCache) Remove(ctx context.Context, id string) (err error)

func (CategoryRepositoryCache) Replace

func (c CategoryRepositoryCache) Replace(ctx context.Context, category domain.Category) (err error)

func (CategoryRepositoryCache) Restore

func (c CategoryRepositoryCache) Restore(ctx context.Context, id string) (err error)

func (CategoryRepositoryCache) Save

type CategoryRepositoryMetric

type CategoryRepositoryMetric struct {
	Next domain.CategoryRepository
}

func (CategoryRepositoryMetric) Fetch

func (c CategoryRepositoryMetric) Fetch(ctx context.Context, params core.PaginationParams,
	filter core.FilterParams) (categories []*domain.Category, err error)

func (CategoryRepositoryMetric) FetchByID

func (c CategoryRepositoryMetric) FetchByID(ctx context.Context, id string, activeOnly bool) (category *domain.Category, err error)

func (CategoryRepositoryMetric) HardRemove

func (c CategoryRepositoryMetric) HardRemove(ctx context.Context, id string) (err error)

func (CategoryRepositoryMetric) Remove

func (c CategoryRepositoryMetric) Remove(ctx context.Context, id string) (err error)

func (CategoryRepositoryMetric) Replace

func (c CategoryRepositoryMetric) Replace(ctx context.Context, category domain.Category) (err error)

func (CategoryRepositoryMetric) Restore

func (c CategoryRepositoryMetric) Restore(ctx context.Context, id string) (err error)

func (CategoryRepositoryMetric) Save

func (c CategoryRepositoryMetric) Save(ctx context.Context, category domain.Category) (err error)

type CategoryRepositoryTracing

type CategoryRepositoryTracing struct {
	Next domain.CategoryRepository
}

func (CategoryRepositoryTracing) Fetch

func (c CategoryRepositoryTracing) Fetch(ctx context.Context, params core.PaginationParams,
	filter core.FilterParams) (categories []*domain.Category, err error)

func (CategoryRepositoryTracing) FetchByID

func (c CategoryRepositoryTracing) FetchByID(ctx context.Context, id string, activeOnly bool) (category *domain.Category, err error)

func (CategoryRepositoryTracing) HardRemove

func (c CategoryRepositoryTracing) HardRemove(ctx context.Context, id string) (err error)

func (CategoryRepositoryTracing) Remove

func (c CategoryRepositoryTracing) Remove(ctx context.Context, id string) (err error)

func (CategoryRepositoryTracing) Replace

func (c CategoryRepositoryTracing) Replace(ctx context.Context, category domain.Category) (err error)

func (CategoryRepositoryTracing) Restore

func (c CategoryRepositoryTracing) Restore(ctx context.Context, id string) (err error)

func (CategoryRepositoryTracing) Save

func (c CategoryRepositoryTracing) Save(ctx context.Context, category domain.Category) (err error)

Jump to

Keyboard shortcuts

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