biz

package
v0.0.0-...-83711c0 Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2022 License: MIT Imports: 7 Imported by: 0

README

Biz

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrUserNotFound = errors.New("user not found")
)
View Source
var ProviderSet = wire.NewSet(NewUserUseCase)

ProviderSet is biz providers.

Functions

This section is empty.

Types

type User

type User struct {
	Id       string
	Username string
	Password string
	Nickname string
	Gender   v1.Gender
}

type UserRepo

type UserRepo interface {
	CreateUser(ctx context.Context, u *User) (*User, error)
	GetUser(ctx context.Context, id string, username string) (*User, error)
}

type UserUseCase

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

func NewUserUseCase

func NewUserUseCase(repo UserRepo, logger log.Logger) *UserUseCase

func (*UserUseCase) CreateUser

func (uc *UserUseCase) CreateUser(ctx context.Context, in *v1.CreateUserRequest) (*v1.CreateUserReply, error)

func (*UserUseCase) GetUser

func (uc *UserUseCase) GetUser(ctx context.Context, in *v1.GetUserRequest) (*v1.GetUserReply, error)

Jump to

Keyboard shortcuts

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