domain

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

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

Go to latest
Published: Oct 27, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrCustomerExists   = errors.New("customer already exists")
	ErrCustomerNotFound = errors.New("customer not found")
)
View Source
var ErrSessionNotFound = errors.New("session not found")

Functions

func MustContainLowercase

func MustContainLowercase(password string) error

func MustContainNumber

func MustContainNumber(password string) error

func MustContainSpecialChar

func MustContainSpecialChar(password string) error

func MustContainUppercase

func MustContainUppercase(password string) error

func NewSessionID

func NewSessionID() string

Types

type Customer

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

func NewCustomer

func NewCustomer(email string) *Customer

func (Customer) Email

func (c Customer) Email() string

type PasswordPolicyError

type PasswordPolicyError string

func (PasswordPolicyError) Error

func (e PasswordPolicyError) Error() string

type Session

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

func NewSession

func NewSession(id string, customerID string, expires time.Time) *Session

func (*Session) CustomerID

func (s *Session) CustomerID() string

func (*Session) Expired

func (s *Session) Expired() bool

func (*Session) ExpiresAt

func (s *Session) ExpiresAt() time.Time

func (*Session) ID

func (s *Session) ID() string

func (*Session) Invalidate

func (s *Session) Invalidate()

Jump to

Keyboard shortcuts

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