server

package
v0.0.0-...-f4c426e Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package server implements the gRPC server for the authentication service.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

type Server struct {
	pb.UnimplementedProductServiceServer
	DB     *db.Queries
	Logger *zap.Logger
}

Server represents the gRPC server for authentication.

func NewServer

func NewServer(logger *zap.Logger, pool *pgxpool.Pool) *Server

NewServer creates a new instance of the authentication server.

func (*Server) CreateProduct

func (s *Server) CreateProduct(ctx context.Context, req *pb.CreateProductRequest) (*pb.CreateProductResponse, error)

func (*Server) GetProduct

func (s *Server) GetProduct(ctx context.Context, req *pb.GetProductRequest) (*pb.GetProductResponse, error)

func (*Server) ListProducts

func (s *Server) ListProducts(ctx context.Context, req *pb.ListProductsRequest) (*pb.ListProductsResponse, error)

Jump to

Keyboard shortcuts

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