biz

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2023 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(NewGreeterLogic)

ProviderSet is biz providers.

Functions

This section is empty.

Types

type Greeter

type Greeter struct {
	Hello string
}

Greeter is a Greeter model.

type GreeterLogic

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

GreeterLogic is a Greeter logic.

func NewGreeterLogic

func NewGreeterLogic(repo GreeterRepo, logger log.Logger) *GreeterLogic

NewGreeterLogic new a Greeter logic.

func (*GreeterLogic) CreateGreeter

func (uc *GreeterLogic) CreateGreeter(ctx context.Context, g *Greeter) (*Greeter, error)

CreateGreeter creates a Greeter, and returns the new Greeter.

type GreeterRepo

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

GreeterRepo is a Greater repo.

type Transaction added in v1.0.2

type Transaction interface {
	InTx(context.Context, func(ctx context.Context) error) error
}

Jump to

Keyboard shortcuts

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