memory

package
v0.0.0-...-61e3c9a Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2024 License: AGPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MemoryUserRepository

type MemoryUserRepository struct {
	sync.Mutex
	// contains filtered or unexported fields
}

MemoryUserRepository is an in-memory user repository.

func NewMemoryUserRepository

func NewMemoryUserRepository() *MemoryUserRepository

NewMemoryUserRepository intializes an in-memory user repository.

func (*MemoryUserRepository) Add

func (r *MemoryUserRepository) Add(p *user.User) error

Add stores a new user in the repository.

func (*MemoryUserRepository) GetByEmail

func (r *MemoryUserRepository) GetByEmail(email string) (*user.User, error)

Get retrieves a user by ID.

func (*MemoryUserRepository) Update

func (r *MemoryUserRepository) Update(p *user.User) error

Update appends changes to user in the repository.

Jump to

Keyboard shortcuts

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