当前位置: 首页 > 工具软件 > Gorilla > 使用案例 >

Go实战--Gorilla web toolkit使用之gorilla/sessions(iris+sessions)

巫马望
2023-12-01

生命不止,继续go go go!!!
昨天介绍了:
Go实战–Gorilla web toolkit使用之gorilla/context

今天介绍gorilla/sessions:
Package sessions provides cookie and filesystem sessions and infrastructure for custom session backends.

特性:
* Simple API: use it as an easy way to set signed (and optionally
encrypted) cookies.
* Built-in backends to store sessions in cookies or the filesystem.
* Flash messages: session values that last until read.
* Convenient way to switch session persistency (aka “remember me”) and set
other attributes.
* Mechanism to rotate authentication and encryption keys.
* Multiple sessions per request, even using different backends.
* Interfaces and infrastructure for custom session backends: sessions from
different stores can be retrieved and batch-sav

 类似资料: