sql

package
v3.13.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 6, 2026 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Overview

Package sql is a GORM-backed appauth manager. App passwords are stored as SHA-256 hashes and looked up directly, without a bcrypt loop, because the tokens carry 256 bits of entropy. last_seen (utime) writes are buffered so every request does not touch the database.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(ctx context.Context, m map[string]any) (appauth.Manager, error)

New returns a GORM-backed appauth manager.

Types

type Config

type Config struct {
	config.Database   `mapstructure:",squash"`
	UtimeFlushSeconds int `mapstructure:"utime_flush_seconds"` // buffer window for last_seen
}

Config holds the store configuration.

func (*Config) ApplyDefaults

func (c *Config) ApplyDefaults()

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL