package
0.0.0-20250103125711-f7811a13a557
Repository: https://github.com/webkimru/go-keeper.git
Documentation: pkg.go.dev
# Packages
Package middleware is a collection of gRPC middleware:
auth controls authorization by info.FullMethod and set context.Value to userID from a user token
logger logging all gRPC requests and responses
# How to use:
serverOptions := []grpc.ServerOption{
grpc.ChainUnaryInterceptor(
// advanced logging with http://github.com/grpc-ecosystem/go-grpc-middleware/v2/interceptors/logging
logging.UnaryServerInterceptor(middleware.InterceptorLogger(l)),
// custom auth
interceptor.UnaryAuthInterceptor, // interceptor := middleware.NewAuthInterceptor(jwtManager)
),
}
srv, err := grpcserver.New(cfg.GRPC.Address, serverOptions...)
*/.
Package mocks is a generated GoMock package.
No description provided by the author
# Functions
New returns a new gRPC server.
NewKeyValueServer returns a new data server.
NewUserServer returns a new authentication server.
# Structs
KeyValueServer is the server for data.
UserServer is the server for the authentication.
# Interfaces
KeyValueService is an interface to store data.
UserService is an interface to store users.