service

package
v0.0.0-...-c015bec Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2023 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateCustomerRequest

type CreateCustomerRequest struct {
	Name   string
	Amount decimal.Decimal
}

type ReserveCreditRequest

type ReserveCreditRequest struct {
	OrderID    uuid.UUID
	CustomerID uuid.UUID
	Amount     decimal.Decimal
}

type Service

type Service interface {
	CreateCustomer(ctx context.Context, req CreateCustomerRequest) (uuid.UUID, error)
	ReserveCredit(ctx context.Context, req ReserveCreditRequest) error
}

func New

func New(cfg config.Config, repo repository.Repository, logger log.Logger, timeout time.Duration) Service

Jump to

Keyboard shortcuts

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