Documentation ¶
Index ¶
- type Server
- type Service
- func (s *Service) CreateProduct(ctx context.Context, req *services.CreateProductRequest) (*resources.Empty, error)
- func (s *Service) DeductProductQty(ctx context.Context, req *services.DeductProductQtyRequest) (*empty.Empty, error)
- func (s *Service) GetProduct(ctx context.Context, req *services.GetProductRequest) (*services.GetProductResponse, error)
- func (s *Service) ListProducts(ctx context.Context, req *services.ListProductsRequest) (*services.ListProductsResponse, error)
- func (s *Service) UpdateProduct(ctx context.Context, req *services.UpdateProductRequest) (*resources.Empty, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Server ¶
type Server struct { Name string `envconfig:"NAME" default:"product"` Host string `envconfig:"HOST" default:"0.0.0.0"` Port int `envconfig:"PORT" default:"10011"` DBDriver string `envconfig:"DB_DRIVER" default:"mysql"` DBUrl string `envconfig:"DB_URL" default:"root:sa@tcp(127.0.0.1:3306)/sandbox?parseTime=True"` PigeonStorageDriver string `envconfig:"PIGEON_STORAGE_DRIVER" default:"mysql"` PigeonStorageURL string `envconfig:"PIGEON_STORAGE_URL" default:"root:sa@tcp(127.0.0.1:3306)/sandbox?parseTime=True"` PigeonBrokerURL string `envconfig:"PIGEON_BROKER_URL" default:"nats://127.0.0.1:4222"` // contains filtered or unexported fields }
func (*Server) Error ¶
func (s *Server) Error() grpc.UnaryServerInterceptor
func (*Server) Logging ¶
func (s *Server) Logging() grpc.UnaryServerInterceptor
func (*Server) Recovery ¶
func (s *Server) Recovery() grpc.UnaryServerInterceptor
type Service ¶
func (*Service) CreateProduct ¶
func (*Service) DeductProductQty ¶
func (*Service) GetProduct ¶
func (s *Service) GetProduct(ctx context.Context, req *services.GetProductRequest) (*services.GetProductResponse, error)
func (*Service) ListProducts ¶
func (s *Service) ListProducts(ctx context.Context, req *services.ListProductsRequest) (*services.ListProductsResponse, error)
func (*Service) UpdateProduct ¶
Click to show internal directories.
Click to hide internal directories.