users

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2026 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type User

type User struct {
	ID        uuid.UUID `gorm:"primaryKey;type:uuid;default:gen_random_uuid()"`
	Email     string    `gorm:"not null;unique"`
	Name      string    `gorm:"not null"`
	CreatedAt time.Time `gorm:"autoCreateTime"`
	UpdatedAt time.Time `gorm:"autoUpdateTime"`
}

type UsersHandler

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

func NewUsersHandler

func NewUsersHandler(service service) *UsersHandler

func (*UsersHandler) DeleteUser

func (h *UsersHandler) DeleteUser(c *echo.Context) error

func (*UsersHandler) GetUserByID

func (h *UsersHandler) GetUserByID(c *echo.Context) error

func (*UsersHandler) UpdateUser

func (h *UsersHandler) UpdateUser(c *echo.Context) error

type UsersRepository

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

func NewUsersRepository

func NewUsersRepository(db *gorm.DB) *UsersRepository

func (*UsersRepository) Create

func (r *UsersRepository) Create(ctx context.Context, user User) (User, error)

func (*UsersRepository) Delete

func (r *UsersRepository) Delete(ctx context.Context, id uuid.UUID) error

func (*UsersRepository) FindByEmail

func (r *UsersRepository) FindByEmail(ctx context.Context, email string) (User, error)

func (*UsersRepository) FindByID

func (r *UsersRepository) FindByID(ctx context.Context, id uuid.UUID) (User, error)

func (*UsersRepository) Update

func (r *UsersRepository) Update(ctx context.Context, user User) (User, error)

type UsersService

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

func NewUsersService

func NewUsersService(repository repository) *UsersService

func (*UsersService) Create

func (s *UsersService) Create(ctx context.Context, user User) (User, error)

func (*UsersService) Delete

func (s *UsersService) Delete(ctx context.Context, id uuid.UUID) error

func (*UsersService) Update

func (s *UsersService) Update(ctx context.Context, user User) (User, error)

Jump to

Keyboard shortcuts

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