service

package
v0.0.0-...-75e3f49 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2024 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Hasher

type Hasher interface {
	Hash(baseString string) (string, error)
	NewUID(userLogin string) (string, error)
	NewJWT(ctx context.Context, req *pb.NewJWTReq) (string, error)
	DecodeJWT(ctx context.Context, req *pb.DecodeJWTReq) (*model.User, error)
	GenerateJWTPair(ctx context.Context, req *pb.GenerateJWTPairReq) (*pb.GenerateJWTPairRes, error)
}

type HasherService

type HasherService struct{}

func NewHasherService

func NewHasherService() *HasherService

func (*HasherService) DecodeJWT

func (s *HasherService) DecodeJWT(ctx context.Context, req *pb.DecodeJWTReq) (*model.User, error)

func (*HasherService) GenerateJWTPair

func (s *HasherService) GenerateJWTPair(ctx context.Context, req *pb.GenerateJWTPairReq) (*pb.GenerateJWTPairRes, error)

func (*HasherService) Hash

func (s *HasherService) Hash(baseString string) (string, error)

func (*HasherService) NewJWT

func (s *HasherService) NewJWT(ctx context.Context, req *pb.NewJWTReq) (string, error)

func (*HasherService) NewUID

func (s *HasherService) NewUID(userLogin string) (string, error)

type Service

type Service struct {
	Hasher
}

func New

func New() *Service

Jump to

Keyboard shortcuts

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