service

package
v0.0.0-...-8f6881d Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2022 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthService

type AuthService interface {
	Login(context.Context, model.LoginRequest) (*model.LoginResponse, error)
}

func NewAuthService

func NewAuthService(us UserService, JWTSecret string) AuthService

type ProductService

type ProductService interface {
	Read(context.Context) ([]model.Product, error)
	Create(ctx context.Context, product model.ProductRequest) error
	Update(ctx context.Context, product model.ProductRequest) error
	Delete(ctx context.Context, id int64) error
	ReadByID(ctx context.Context, productID int64) (*model.Product, error)
}

func NewProductService

func NewProductService(repo repository.ProductRepository, timeout time.Duration) ProductService

type TransactionService

type TransactionService interface {
	Checkout(ctx context.Context, request model.CreateTransactionRequest) (*model.Transaction, error)
}

func NewTransactionService

func NewTransactionService(transactionRepo repository.TransactionRepository, productRepo repository.ProductRepository, timeout time.Duration) TransactionService

type UserService

type UserService interface {
	Create(context.Context, model.User) error
	Read(ctx context.Context) (users []model.User, err error)
	ReadByUsername(ctx context.Context, username string) (*model.User, error)
}

func NewUserService

func NewUserService(urepo repository.UserRepository, timeout time.Duration) UserService

Jump to

Keyboard shortcuts

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