You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

store.go 509B

1234567891011121314151617181920212223
  1. // Copyright 2020 The Gitea Authors. All rights reserved.
  2. // SPDX-License-Identifier: MIT
  3. package session
  4. import (
  5. "net/http"
  6. "gitea.com/go-chi/session"
  7. )
  8. // Store represents a session store
  9. type Store interface {
  10. Get(any) any
  11. Set(any, any) error
  12. Delete(any) error
  13. }
  14. // RegenerateSession regenerates the underlying session and returns the new store
  15. func RegenerateSession(resp http.ResponseWriter, req *http.Request) (Store, error) {
  16. s, err := session.RegenerateSession(resp, req)
  17. return s, err
  18. }