nonce

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNotFound = fmt.Errorf("nonce not found")
)

Functions

func Configure

func Configure()

Types

type CreateCommand

type CreateCommand struct {
	TTL time.Duration
}

type Nonce

type Nonce struct {
	ID        string
	Bucket    string
	Key       string
	ExpiresAt time.Time
}

func Create

func Create(ctx context.Context, bucket, key string, cmd CreateCommand) (*Nonce, error)

func Get

func Get(ctx context.Context, id string) (*Nonce, error)

func GetAndInvalidate

func GetAndInvalidate(ctx context.Context, id string) (*Nonce, error)

Jump to

Keyboard shortcuts

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