irepo

package
v0.0.0-...-cca628e Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2022 License: MIT Imports: 2 Imported by: 0

README

repository interface

the repositories are the abstractions for resources

mysql, rpc, kafka, redis are all resources

but cache is not, cache is a cross-cutting concern

https://stackoverflow.com/questions/7009306/is-caching-a-repository-domain-or-application-concern

if you use redis as cache, it'll also be a cross-cutting concern.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CustomerRepo

type CustomerRepo interface {
	UpdateEmail(email string) error // UpdateEmail update customer's email
	RelocateTo(addr string) error
}

CustomerRepo is for customer irepo

type OrderRepo

type OrderRepo interface {
	DeleteOrderByID(ctx context.Context, orderID int) error
	GetOrderHistoryByCustomerID(customerID int64) []entity.Order
	PlaceOrder(ctx context.Context, info entity.OrderCreateInfo) error
}

OrderRepo is for order irepo

Jump to

Keyboard shortcuts

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