biz

package
v0.0.0-...-3a46aa3 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2024 License: MIT Imports: 3 Imported by: 0

README

Biz

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ProviderSet = wire.NewSet(NewUserUseCase)

ProviderSet is biz providers.

Functions

This section is empty.

Types

type CardRepo

type CardRepo interface {
	CreateCard(ctx context.Context, id int64) (string, error)
}

type Transaction

type Transaction interface {
	StartSession(ctx context.Context) (sessionCtx context.Context, endSession func(ctx context.Context), err error)
	ExecTx(sessionCtx context.Context, cmd func(ctx context.Context) error) error
}

type User

type User struct {
	Name  string
	Email string
}

type UserRepo

type UserRepo interface {
	CreateUser(ctx context.Context, a *User) (int64, error)
}

type UserUseCase

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

func NewUserUseCase

func NewUserUseCase(user UserRepo, card CardRepo, txn Transaction, logger log.Logger) *UserUseCase

func (*UserUseCase) CreateUser

func (u *UserUseCase) CreateUser(ctx context.Context, user *User) (int, error)

Jump to

Keyboard shortcuts

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