Documentation ¶
Index ¶
- Constants
- Variables
- type Config
- func (c *Config) Authorize(w http.ResponseWriter, r *http.Request) bool
- func (db *Config) Close() error
- func (c *Config) Context(base map[string]any) map[string]any
- func (c *Config) CurrentSite() *v1.Site
- func (c *Config) CurrentUser() string
- func (c *Config) Flash(w http.ResponseWriter)
- func (db *Config) HTML(w http.ResponseWriter, t *template.Template, data map[string]any)
- func (db *Config) HTMLCode(code int, w http.ResponseWriter, t *template.Template, data map[string]any)
- func (c *Config) IsLoggedOut(w http.ResponseWriter) bool
- func (c *Config) IsValidCsrf(r *http.Request) bool
- func (db *Config) JSON(w http.ResponseWriter, data any)
- func (db *Config) JSONCode(code int, w http.ResponseWriter, data any)
- func (c *Config) Load(w http.ResponseWriter, r *http.Request)
- func (db *Config) LoadSharedLinkSession(r *http.Request, name string) time.Time
- func (db *Config) Location() *location.Location
- func (db *Config) Logger() *slog.Logger
- func (c *Config) Login(w http.ResponseWriter) string
- func (c *Config) Logout(w http.ResponseWriter)
- func (db *Config) Ops() *ops.Ops
- func (db *Config) PasswordMatch(pwd string) bool
- func (db *Config) Pebble() *pebble.DB
- func (db *Config) ProcessEvent(r *http.Request) error
- func (c *Config) SaveCsrf(w http.ResponseWriter)
- func (c *Config) SaveSession(w http.ResponseWriter)
- func (db *Config) SaveSharedLinkSession(w http.ResponseWriter, name string)
- func (c *Config) SaveSuccessRegister(w http.ResponseWriter, uid uuid.UUID)
- func (c *Config) SessionTimeout(w http.ResponseWriter)
- func (c *Config) SetSite(site *v1.Site)
- func (db *Config) Start(ctx context.Context)
- func (c *Config) Success(msg string)
- func (db *Config) TimeSeries() *timeseries.Timeseries
- func (c *Config) Wrap(kind string) ...
- type Data
- type Flash
- type Request
- type SessionContext
- func (s *SessionContext) FailFlash(m string) *SessionContext
- func (s *SessionContext) Load(r *http.Request) error
- func (s *SessionContext) LoadBase(r *http.Request, name string) ([]byte, error)
- func (s *SessionContext) SaveSharedLink(w http.ResponseWriter, name string) error
- func (s *SessionContext) SuccessFlash(m string) *SessionContext
Constants ¶
View Source
const MaxAge = 60 * 60 * 24 * 365 * 5
Variables ¶
View Source
var (
ErrDrop = errors.New("event dropped")
)
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
// contains filtered or unexported fields
}
func (*Config) CurrentSite ¶
func (*Config) CurrentUser ¶
func (*Config) Flash ¶
func (c *Config) Flash(w http.ResponseWriter)
func (*Config) IsLoggedOut ¶
func (c *Config) IsLoggedOut(w http.ResponseWriter) bool
func (*Config) LoadSharedLinkSession ¶
func (*Config) Logout ¶
func (c *Config) Logout(w http.ResponseWriter)
func (*Config) PasswordMatch ¶ added in v1.3.0
func (*Config) SaveCsrf ¶
func (c *Config) SaveCsrf(w http.ResponseWriter)
func (*Config) SaveSession ¶
func (c *Config) SaveSession(w http.ResponseWriter)
func (*Config) SaveSharedLinkSession ¶
func (db *Config) SaveSharedLinkSession(w http.ResponseWriter, name string)
func (*Config) SaveSuccessRegister ¶
func (c *Config) SaveSuccessRegister(w http.ResponseWriter, uid uuid.UUID)
func (*Config) SessionTimeout ¶
func (c *Config) SessionTimeout(w http.ResponseWriter)
func (*Config) TimeSeries ¶ added in v1.5.1
func (db *Config) TimeSeries() *timeseries.Timeseries
type SessionContext ¶
type SessionContext struct { Data Data // contains filtered or unexported fields }
func (*SessionContext) FailFlash ¶
func (s *SessionContext) FailFlash(m string) *SessionContext
func (*SessionContext) SaveSharedLink ¶
func (s *SessionContext) SaveSharedLink(w http.ResponseWriter, name string) error
func (*SessionContext) SuccessFlash ¶
func (s *SessionContext) SuccessFlash(m string) *SessionContext
Source Files ¶
Click to show internal directories.
Click to hide internal directories.