authpf

package
v0.3.0-rc2 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2026 License: BSD-3-Clause Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AnchorsDB

type AnchorsDB map[string]*AuthPFAnchor

Map of AuthPFAnchors

func New

func New() *AnchorsDB

func (*AnchorsDB) Add

func (a *AnchorsDB) Add(r *AuthPFAnchor)

func (*AnchorsDB) Flush

func (a *AnchorsDB) Flush()

Clear DB

func (*AnchorsDB) IsActivated

func (a *AnchorsDB) IsActivated(username string) bool

func (*AnchorsDB) Remove

func (a *AnchorsDB) Remove(username string) error

type AuthPFAnchor

type AuthPFAnchor struct {
	Username  string    `json:"username"`
	Timeout   string    `json:"timeout,omitempty"`
	UserIP    string    `json:"user_ip"`
	UserID    int       `json:"user_id"`
	ExpiresAt time.Time `json:"expire_at"`
}

AuthPFAnchor represents an anchor to store in anchorsDB

func SetAnchor

func SetAnchor(username string, timeout string, userIp string, userId int, expireAt time.Time) (*AuthPFAnchor, error)

Jump to

Keyboard shortcuts

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