aboutsummaryrefslogtreecommitdiff
path: root/middleware
diff options
context:
space:
mode:
authorAlexander NeonXP Kiryukhin <i@neonxp.ru>2024-07-21 19:26:56 +0300
committerAlexander NeonXP Kiryukhin <i@neonxp.ru>2024-07-21 19:28:56 +0300
commitce3111b0efe91e275ce070f9511b5b1b9801a46d (patch)
tree09fa4f10dfb1e17761339c798eefa73c6b18484f /middleware
parente9a64f3b41b5eae47dec7c0ecfd1caae83136abc (diff)
Множество улучшенийv0.0.2
Diffstat (limited to 'middleware')
-rw-r--r--middleware/session/store.go30
1 files changed, 30 insertions, 0 deletions
diff --git a/middleware/session/store.go b/middleware/session/store.go
new file mode 100644
index 0000000..f22c64d
--- /dev/null
+++ b/middleware/session/store.go
@@ -0,0 +1,30 @@
+package session
+
+import (
+ "net/http"
+
+ "github.com/gorilla/sessions"
+ "github.com/uptrace/bun"
+)
+
+type SessionStore struct {
+ orm *bun.DB
+}
+
+// Get should return a cached session.
+func (s *SessionStore) Get(r *http.Request, name string) (*sessions.Session, error) {
+ panic("not implemented") // TODO: Implement
+}
+
+// New should create and return a new session.
+//
+// Note that New should never return a nil session, even in the case of
+// an error if using the Registry infrastructure to cache the session.
+func (s *SessionStore) New(r *http.Request, name string) (*sessions.Session, error) {
+ panic("not implemented") // TODO: Implement
+}
+
+// Save should persist session to the underlying store implementation.
+func (s *SessionStore) Save(r *http.Request, w http.ResponseWriter, ss *sessions.Session) error {
+ panic("not implemented") // TODO: Implement
+}