diff --git a/src/session/session_errors.go b/src/session/session_errors.go new file mode 100644 index 0000000..a128365 --- /dev/null +++ b/src/session/session_errors.go @@ -0,0 +1,7 @@ +package session + +import "errors" + +var ErrSessionNotFound = errors.New("session not found") +var ErrSessionAlreadyExists = errors.New("session already exists") +var ErrSessionExpired = errors.New("session expired") diff --git a/src/session/session_in_memory.go b/src/session/session_in_memory.go index e390dc2..f031356 100644 --- a/src/session/session_in_memory.go +++ b/src/session/session_in_memory.go @@ -1,7 +1,6 @@ package session import ( - "errors" "sync" "time" @@ -9,10 +8,6 @@ import ( "astraltech.xyz/accountmanager/src/worker" ) -var ErrSessionNotFound = errors.New("session not found") -var ErrSessionAlreadyExists = errors.New("session already exists") -var ErrSessionExpired = errors.New("session expired") - type MemoryStore struct { sessions map[string]*SessionData lock sync.RWMutex