nonce

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package nonce handles the logic of a nonce.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Repository

type Repository interface {
	Generate(ctx context.Context) (string, error)
	IsValid(ctx context.Context, nonce string) (bool, error)
}

Repository defines the nonce methods.

func NewRepository

func NewRepository(db *sql.DB) Repository

NewRepository wraps around a SQL database to execute the nonce methods.

Jump to

Keyboard shortcuts

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