package
module
Version:
v0.0.0-...-dbdc49b
Opens a new window with list of versions in this module.
Published: Mar 17, 2021
License: MIT
Opens a new window with license information.
Imports: 6
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
README
¶
Backlog
- COULD add a
rb.decoder
for the bind package that support decoding the session
- COULD make sure there is 100% test coverage
- COULD create a cookiestore that uses the new fs package
- COULD add a way to decode/bind data from the session into a request/page struct using mitchell mapstructure
- SHOULD add middleware that make session easily available in controller
- SHOULD add middleware that automatically saves session before returning response
- COULD add CSRF functionality
- SHOULD add flash message utilities
- COULD add a template helper that allows reading session data directly.
Documentation
¶
NewCookieStore inits a cookie store
type Conf struct {
KeyPairs []string `env:"RB_SESS_KEY_PAIRS" envSeparator:","`
CookiePath string `env:"RB_SESS_COOKIE_PATH" envDefault:"/"`
CookieMaxAgeSeconds int `env:"RB_SESS_COOKIE_MAX_AGE_SECONDS" envDefault:"2592000"`
CookieDomain string `env:"RB_SESS_COOKIE_DOMAIN"`
CookieHTTPOnly bool `env:"RB_SESS_COOKIE_HTTP_ONLY"`
Secure bool `env:"RB_SESS_SECURE"`
CookieSameSite int `env:"RB_SESS_COOKIE_SAME_SITE"`
}
Conf configures the session store
ParseConf parses the environment into the session configuration
Source Files
¶
Click to show internal directories.
Click to hide internal directories.