sql

package
v3.15.3 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2026 License: Apache-2.0 Imports: 25 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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