repo

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2022 License: MIT Imports: 4 Imported by: 0

README

repo

repo层是数据持久层,像数据库存取,缓存的处理应该都在这一层做掉

异常处理

把 repository 层的数据库相关错误吞掉,返回业务错误码

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ProvideSet = wire.NewSet(NewUserRepo)

ProvideSet is repo providers.

Functions

func NewUserRepo

func NewUserRepo(logger *zap.Logger) domain.UserRepo

Types

type UserRepo

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

func (*UserRepo) GetUserById

func (u *UserRepo) GetUserById(ctx context.Context, id int64) (*domain.User, error)

Jump to

Keyboard shortcuts

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