SessionStore 将登录 session 持久化到 PostgreSQL。
| 10 | |
| 11 | // SessionStore 将登录 session 持久化到 PostgreSQL。 |
| 12 | type SessionStore struct { |
| 13 | db *pgxpool.Pool |
| 14 | } |
| 15 | |
| 16 | func (s *SessionStore) Create(token, username string) error { |
| 17 | return sqlcgen.New(s.db).UpsertSession(context.Background(), sqlcgen.UpsertSessionParams{ |
nothing calls this directly
no outgoing calls
no test coverage detected