domain

package
v0.0.0-...-bdc88ad Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2023 License: MIT Imports: 0 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          int    `json:"id"`
	FirstName   string `json:"firstName"`
	LastName    string `json:"lastName"`
	DateOfBirth string `json:"dateOfBirth"` // ISO 8601
	Active      bool   `json:"active"`
	Email       string `json:"email"`
}

type UserParams

type UserParams struct {
	FirstName   string `json:"firstName"`
	LastName    string `json:"lastName"`
	DateOfBirth string `json:"dateOfBirth"` // ISO 8601
	Email       string `json:"email"`
	Password    string `json:"password"`
}

type UserRepository

type UserRepository interface {
	Insert(user UserParams) (User, error)
}

type UserService

type UserService interface {
	RegisterNewUser(userParams UserParams) (User, error)
	UpdateUser(userParams UserParams) (User, error)
	DeactivateUser(userParams UserParams) (User, error)
	GetUser(userParams UserParams) (User, error)
	GetUsers(userParams UserParams) ([]User, error)
}

SOLID [I]: Interface Segregation Principle

Jump to

Keyboard shortcuts

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