adapter

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: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewInMemoryAuthStorage

func NewInMemoryAuthStorage() *inMemory

NewInMemoryAuthStorage creates a new in-memory storage for auth it's used for testing purposes

func NewInMemorySessionStorage

func NewInMemorySessionStorage() *inMemorySessionStorage

func NewPostgresAuthStorage

func NewPostgresAuthStorage(db *sql.DB) authStoragePostgres

func NewPostgresSessionStorage

func NewPostgresSessionStorage(db *sql.DB) sessionStorage

Types

type Customer

type Customer struct {
	Username     string
	PasswordHash string
}

we don't create a domain.Customer here because we don't want to expose the password hash it's too low level detail for the domain. The Customer is treat as a DTO (Data Transfer Object) here and after the password hash is verified, we can create a domain.Customer

Jump to

Keyboard shortcuts

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