added auth service to go backend
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
package repository
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
E "github.com/IBM/fp-go/either"
|
||||
)
|
||||
|
||||
type AuthRepository interface {
|
||||
GenerateToken(ctx context.Context) func(userID string) E.Either[error, string]
|
||||
ValidateToken(ctx context.Context) func(userID string) E.Either[error, string]
|
||||
RevokeToken(ctx context.Context) func(userID string) E.Either[error, string]
|
||||
}
|
||||
Reference in New Issue
Block a user