biz

package
v0.0.0-...-b88f85f Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2022 License: MIT Imports: 5 Imported by: 0

README

Biz

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrUserNotFound is user not found.
	ErrUserNotFound = errors.NotFound(v1.ErrorReason_USER_NOT_FOUND.String(), "user not found")
)
View Source
var ProviderSet = wire.NewSet(NewUserUsecase)

ProviderSet is biz providers.

Functions

This section is empty.

Types

type Realworld

type Realworld struct {
	Hello string
}

Realworld is a Realworld model.

type UserRepo

type UserRepo interface {
	Save(context.Context, *Realworld) (*Realworld, error)
	Update(context.Context, *Realworld) (*Realworld, error)
	FindByID(context.Context, int64) (*Realworld, error)
	ListByHello(context.Context, string) ([]*Realworld, error)
	ListAll(context.Context) ([]*Realworld, error)
}

UserRepo is a Greater repo.

type UserUsecase

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

UserUsecase is a Greeter usecase.

func NewUserUsecase

func NewUserUsecase(repo UserRepo, logger log.Logger) *UserUsecase

NewUserUsecase new a Greeter usecase.

func (*UserUsecase) CreateUser

func (uc *UserUsecase) CreateUser(ctx context.Context, g *Realworld) (*Realworld, error)

CreateUser creates a User, and returns the new user.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳