Documentation
¶
Index ¶
- func GRPCKeyAuth(key string) grpc.ServerOption
- func RegisterAuthServiceServer(server *grpc.Server, config *AuthServiceServerConfig, dbPool *pgxpool.Pool, ...) error
- type AuthServiceServer
- func (s *AuthServiceServer) Auth(ctx context.Context, request *emptypb.Empty) (*pb.ResultReply, error)
- func (s *AuthServiceServer) CreateUser(ctx context.Context, request *pb.CreateUserRequest) (*pb.ResultReply, error)
- func (s *AuthServiceServer) LoadUserAvatar(request *pb.LoadUserAvatarRequest, stream pb.AuthService_LoadUserAvatarServer) error
- func (s *AuthServiceServer) LoadUsers(request *pb.UserId, stream pb.AuthService_LoadUsersServer) error
- func (s *AuthServiceServer) LoadUsersInfo(request *emptypb.Empty, stream pb.AuthService_LoadUsersInfoServer) error
- func (s *AuthServiceServer) RefreshToken(ctx context.Context, request *pb.RefreshTokenRequest) (*pb.RefreshTokenReply, error)
- func (s *AuthServiceServer) ResetPassword(ctx context.Context, request *pb.ResetPasswordRequest) (*pb.ResultReply, error)
- func (s *AuthServiceServer) SaveUserPhoto(ctx context.Context, request *pb.UserPhoto) (*pb.ResultReply, error)
- func (s *AuthServiceServer) SetPassword(ctx context.Context, request *pb.SetPasswordRequest) (*pb.ResultReply, error)
- func (s *AuthServiceServer) SignIn(ctx context.Context, request *pb.SignInRequest) (*pb.AuthInfo, error)
- func (s *AuthServiceServer) SignOut(ctx context.Context, in *emptypb.Empty) (*pb.ResultReply, error)
- func (s *AuthServiceServer) UpdateUser(ctx context.Context, request *pb.UpdateUserRequest) (*pb.ResultReply, error)
- type AuthServiceServerConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GRPCKeyAuth ¶
func GRPCKeyAuth(key string) grpc.ServerOption
GRPCKeyAuth allows to set simple authentication based on string key from configuration. Client should provide per RPC credentials: set authorization key to metadata with value `apikey <KEY>`.
Types ¶
type AuthServiceServer ¶
type AuthServiceServer struct { pb.UnimplementedAuthServiceServer DB *model.Queries DbPool *pgxpool.Pool Log *zerolog.Logger Err *tool.GrpcStatusTool // contains filtered or unexported fields }
func (*AuthServiceServer) Auth ¶
func (s *AuthServiceServer) Auth(ctx context.Context, request *emptypb.Empty) (*pb.ResultReply, error)
func (*AuthServiceServer) CreateUser ¶
func (s *AuthServiceServer) CreateUser(ctx context.Context, request *pb.CreateUserRequest) (*pb.ResultReply, error)
func (*AuthServiceServer) LoadUserAvatar ¶
func (s *AuthServiceServer) LoadUserAvatar(request *pb.LoadUserAvatarRequest, stream pb.AuthService_LoadUserAvatarServer) error
func (*AuthServiceServer) LoadUsers ¶
func (s *AuthServiceServer) LoadUsers(request *pb.UserId, stream pb.AuthService_LoadUsersServer) error
func (*AuthServiceServer) LoadUsersInfo ¶
func (s *AuthServiceServer) LoadUsersInfo(request *emptypb.Empty, stream pb.AuthService_LoadUsersInfoServer) error
func (*AuthServiceServer) RefreshToken ¶
func (s *AuthServiceServer) RefreshToken(ctx context.Context, request *pb.RefreshTokenRequest) (*pb.RefreshTokenReply, error)
func (*AuthServiceServer) ResetPassword ¶
func (s *AuthServiceServer) ResetPassword(ctx context.Context, request *pb.ResetPasswordRequest) (*pb.ResultReply, error)
func (*AuthServiceServer) SaveUserPhoto ¶
func (s *AuthServiceServer) SaveUserPhoto(ctx context.Context, request *pb.UserPhoto) (*pb.ResultReply, error)
func (*AuthServiceServer) SetPassword ¶
func (s *AuthServiceServer) SetPassword(ctx context.Context, request *pb.SetPasswordRequest) (*pb.ResultReply, error)
func (*AuthServiceServer) SignIn ¶
func (s *AuthServiceServer) SignIn(ctx context.Context, request *pb.SignInRequest) (*pb.AuthInfo, error)
func (*AuthServiceServer) SignOut ¶
func (s *AuthServiceServer) SignOut(ctx context.Context, in *emptypb.Empty) (*pb.ResultReply, error)
func (*AuthServiceServer) UpdateUser ¶
func (s *AuthServiceServer) UpdateUser(ctx context.Context, request *pb.UpdateUserRequest) (*pb.ResultReply, error)
type AuthServiceServerConfig ¶
type AuthServiceServerConfig struct {
JwtSecretKey string
}
AuthServiceServerConfig for GRPC API Service.
Click to show internal directories.
Click to hide internal directories.