sales

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

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

Go to latest
Published: Nov 5, 2024 License: Apache-2.0 Imports: 37 Imported by: 0

Documentation

Overview

Package sales represent the encore application.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Service

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

Service represents the encore service application.

func NewService

func NewService(log *logger.Logger, db *sqlx.DB) (*Service, error)

NewService is called to create a new encore Service.

func (*Service) DelegateHandler

func (s *Service) DelegateHandler(ctx context.Context, data delegate.Data) error

DelegateHandler receives a message from the pubsub system and passes it into the delegate system.

func (*Service) Fallback

func (s *Service) Fallback(w http.ResponseWriter, r *http.Request)

Fallback is called for the debug enpoints.

func (*Service) HomeCreate

func (s *Service) HomeCreate(ctx context.Context, app homeapp.NewHome) (homeapp.Home, error)

func (*Service) HomeDelete

func (s *Service) HomeDelete(ctx context.Context, homeID string) error

func (*Service) HomeQuery

func (s *Service) HomeQuery(ctx context.Context, qp homeapp.QueryParams) (query.Result[homeapp.Home], error)

func (*Service) HomeQueryByID

func (s *Service) HomeQueryByID(ctx context.Context, productID string) (homeapp.Home, error)

func (*Service) HomeUpdate

func (s *Service) HomeUpdate(ctx context.Context, homeID string, app homeapp.UpdateHome) (homeapp.Home, error)

func (*Service) ProductCreate

func (s *Service) ProductCreate(ctx context.Context, app productapp.NewProduct) (productapp.Product, error)

func (*Service) ProductDelete

func (s *Service) ProductDelete(ctx context.Context, productID string) error

func (*Service) ProductQuery

func (*Service) ProductQueryByID

func (s *Service) ProductQueryByID(ctx context.Context, productID string) (productapp.Product, error)

func (*Service) ProductUpdate

func (s *Service) ProductUpdate(ctx context.Context, productID string, app productapp.UpdateProduct) (productapp.Product, error)

func (*Service) Shutdown

func (s *Service) Shutdown(force context.Context)

Shutdown implements a function that will be called by encore when the service is signaled to shutdown.

func (*Service) TranCreate

func (s *Service) TranCreate(ctx context.Context, app tranapp.NewTran) (tranapp.Product, error)

func (*Service) UserCreate

func (s *Service) UserCreate(ctx context.Context, app userapp.NewUser) (userapp.User, error)

func (*Service) UserDelete

func (s *Service) UserDelete(ctx context.Context, userID string) error

func (*Service) UserQuery

func (s *Service) UserQuery(ctx context.Context, qp userapp.QueryParams) (query.Result[userapp.User], error)

func (*Service) UserQueryByID

func (s *Service) UserQueryByID(ctx context.Context, userID string) (userapp.User, error)

func (*Service) UserUpdate

func (s *Service) UserUpdate(ctx context.Context, userID string, app userapp.UpdateUser) (userapp.User, error)

func (*Service) UserUpdateRole

func (s *Service) UserUpdateRole(ctx context.Context, userID string, app userapp.UpdateUserRole) (userapp.User, error)

func (*Service) VProductQuery

Directories

Path Synopsis
tests
apitest
Package apitest contains supporting code for running app layer tests.
Package apitest contains supporting code for running app layer tests.

Jump to

Keyboard shortcuts

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