added the couchbase provider template

This commit is contained in:
manoj
2022-10-10 00:24:14 +05:30
parent 820d294130
commit 5f30b159fa
15 changed files with 413 additions and 6 deletions

View File

@@ -0,0 +1,25 @@
package couchbase
import (
"context"
"time"
"github.com/authorizerdev/authorizer/server/db/models"
"github.com/google/uuid"
)
// AddSession to save session information in database
func (p *provider) AddSession(ctx context.Context, session models.Session) error {
if session.ID == "" {
session.ID = uuid.New().String()
}
session.CreatedAt = time.Now().Unix()
session.UpdatedAt = time.Now().Unix()
return nil
}
// DeleteSession to delete session information from database
func (p *provider) DeleteSession(ctx context.Context, userId string) error {
return nil
}