auth/internal/session/repository.go
Maxim Lebedev c7bd73c63a
♻️ Drop HTTP delivery framework
replaced 'valyala/fasthttp' to native 'net/http' package, close #4
2023-01-16 06:43:07 +06:00

17 lines
431 B
Go

package session
import (
"context"
"source.toby3d.me/toby3d/auth/internal/domain"
)
type Repository interface {
Get(ctx context.Context, code string) (*domain.Session, error)
Create(ctx context.Context, session domain.Session) error
GetAndDelete(ctx context.Context, code string) (*domain.Session, error)
GC()
}
var ErrNotExist error = domain.NewError(domain.ErrorCodeServerError, "session with this code not exist", "")