auth

package
v0.0.0-...-5a72114 Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GrpcClient

type GrpcClient struct {
	// contains filtered or unexported fields
}

func NewGrpcClient

func NewGrpcClient(addr string) (*GrpcClient, error)

func (*GrpcClient) CreateSession

func (c *GrpcClient) CreateSession(userID uuid.UUID) (string, error)

func (*GrpcClient) DeleteSession

func (c *GrpcClient) DeleteSession(sessionID string) error

func (*GrpcClient) GetUserIDBySession

func (c *GrpcClient) GetUserIDBySession(sessionID string) (string, error)

type GrpcServer

type GrpcServer struct {
	authProto.UnimplementedAuthServiceServer
	AuthUC usecase.Auth
}

func NewGrpcServer

func NewGrpcServer(authUC usecase.Auth) *GrpcServer

func (*GrpcServer) CreateSession

func (s *GrpcServer) CreateSession(_ context.Context, in *authProto.User) (*authProto.Session, error)

func (*GrpcServer) DeleteSession

func (s *GrpcServer) DeleteSession(_ context.Context, in *authProto.Session) (*authProto.NoContent, error)

func (*GrpcServer) GetUserIDBySession

func (s *GrpcServer) GetUserIDBySession(_ context.Context, in *authProto.Session) (*authProto.User, error)

func (*GrpcServer) Ping

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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