Help us shape the future of Go! Take the 2026 Go Developer Survey

postgres

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2026 License: MPL-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Store

type Store struct {
	// contains filtered or unexported fields
}

func Open

func Open(ctx context.Context, url string) (*Store, error)

func (*Store) AddCredential

func (s *Store) AddCredential(ctx context.Context, credential store.Credential, limit int, now int64) error

func (*Store) Close

func (s *Store) Close() error

func (*Store) CreateSession

func (s *Store) CreateSession(ctx context.Context, hash []byte, userID string, expires, now int64) error

func (*Store) CreateUser

func (s *Store) CreateUser(ctx context.Context, credential store.Credential, recoveryMAC []byte, now int64) error

func (*Store) Credentials

func (s *Store) Credentials(ctx context.Context, userID string) ([]store.Credential, error)

func (*Store) DeleteSession

func (s *Store) DeleteSession(ctx context.Context, hash []byte, now int64) error

func (*Store) DeleteSessions

func (s *Store) DeleteSessions(ctx context.Context, userID string, now int64) error

func (*Store) DeleteUser

func (s *Store) DeleteUser(ctx context.Context, userID string, now int64) error

func (*Store) Enroll

func (s *Store) Enroll(ctx context.Context, credential store.Credential, tokenHash, recoveryMAC []byte, now int64) error

func (*Store) ExtendSession

func (s *Store) ExtendSession(ctx context.Context, hash []byte, expires, now int64) error

func (*Store) PutChallenge

func (s *Store) PutChallenge(ctx context.Context, slot string, data []byte, expires, now int64) error

func (*Store) RemoveCredential

func (s *Store) RemoveCredential(ctx context.Context, userID string, credentialID []byte, now int64) error

func (*Store) ReplaceRecovery

func (s *Store) ReplaceRecovery(ctx context.Context, userID string, oldMAC, newMAC []byte, now int64) error

func (*Store) Reset

func (s *Store) Reset(ctx context.Context, userID string, tokenHash []byte, until, now int64) error

func (*Store) RotateRecovery

func (s *Store) RotateRecovery(ctx context.Context, userID string, newMAC []byte, now int64) error

func (*Store) Session

func (s *Store) Session(ctx context.Context, hash []byte, now int64) (string, int64, error)

func (*Store) TakeChallenge

func (s *Store) TakeChallenge(ctx context.Context, slot string, now int64) ([]byte, error)

func (*Store) UpdateCredential

func (s *Store) UpdateCredential(ctx context.Context, id, data []byte, now int64) error

func (*Store) User

func (s *Store) User(ctx context.Context, id string, now int64) (store.User, error)

Jump to

Keyboard shortcuts

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