Documentation
¶
Index ¶
- func Delete(c fiber.Ctx, key string)
- func Destroy(c fiber.Ctx)
- func Get[T any](c fiber.Ctx, key string) T
- func GetID(c fiber.Ctx) string
- func GetOnce[T any](c fiber.Ctx, key string) T
- func Init(sessionConfig *Config, dsn string)
- func Set[T any](c fiber.Ctx, key string, value T)
- func TryGet[T any](c fiber.Ctx, key string) (T, bool)
- func TryGetOnce[T any](c fiber.Ctx, key string) (T, bool)
- type Config
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Get ¶
Get fetches a value from the session as T. If the session doesn't contain a T then the zero value of T is returned.
func GetOnce ¶
GetOnce fetches a value from the session as T, then deletes it. If the session doesn't contain a T then the zero value of T is returned.
func Set ¶
Set stores a value in the session. If T is a custom type then it may need to be registered with gob.Register first.
Types ¶
Click to show internal directories.
Click to hide internal directories.