pin

package
v0.0.0-...-5a21396 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2024 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type InMemoryPINService

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

func (*InMemoryPINService) CurrentPIN

func (s *InMemoryPINService) CurrentPIN() (string, error)

func (*InMemoryPINService) Generate

func (s *InMemoryPINService) Generate() (string, error)

func (*InMemoryPINService) IsCorrect

func (s *InMemoryPINService) IsCorrect(pin string) (bool, error)

type PINService

type PINService interface {
	CurrentPIN() (string, error)
	IsCorrect(pin string) (bool, error)
	Generate() (string, error)
}

func NewInMemoryPINService

func NewInMemoryPINService() PINService

func NewRedisPINService

func NewRedisPINService(addr string, key string) (PINService, error)

type RedisPINService

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

func (*RedisPINService) CurrentPIN

func (s *RedisPINService) CurrentPIN() (string, error)

func (*RedisPINService) Generate

func (s *RedisPINService) Generate() (string, error)

func (*RedisPINService) IsCorrect

func (s *RedisPINService) IsCorrect(pin string) (bool, error)

Jump to

Keyboard shortcuts

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