service

package
v0.0.0-...-8851dd1 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2022 License: GPL-3.0 Imports: 3 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 struct {
	// contains filtered or unexported fields
}

func NewAuthService

func NewAuthService(store store.Store) *AuthService

func (*AuthService) Authenticate

func (s *AuthService) Authenticate(id int) (*model.User, error)

func (*AuthService) Register

func (s *AuthService) Register(req *InputUser) (*model.User, error)

func (*AuthService) SignIn

func (s *AuthService) SignIn(req *InputUser) (*model.User, error)

type InputUser

type InputUser struct {
	Email    string `json:"email"`
	Password string `json:"password"`
}

type ProductService

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

func NewProductService

func NewProductService(store store.Store) *ProductService

func (*ProductService) CreateProduct

func (ps *ProductService) CreateProduct(p *model.Product) error

func (*ProductService) DeleteProduct

func (ps *ProductService) DeleteProduct(productId int, userId int) error

func (*ProductService) GetProductById

func (ps *ProductService) GetProductById(id int) (*model.Product, error)

func (*ProductService) GetProductCategories

func (ps *ProductService) GetProductCategories() ([]*model.Category, error)

func (*ProductService) GetProductMaterials

func (ps *ProductService) GetProductMaterials() ([]*model.Material, error)

func (*ProductService) GetProductsByUserId

func (ps *ProductService) GetProductsByUserId(userId int) ([]*model.Product, error)

func (*ProductService) UpdateProduct

func (ps *ProductService) UpdateProduct(productId int, p *model.Product) error

type Service

type Service struct {
	ProductService *ProductService
	AuthService    *AuthService
}

func NewService

func NewService(store store.Store) *Service

Jump to

Keyboard shortcuts

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