core

package
v0.0.0-...-932a008 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type App

type App struct {
	EventPublisher eventbus.EventPublisher
	Repository     port.Repository
}

App implements the App. It has access to how its entities are stored and retrieved through its repositories. Additional repositories may be added here to access other entities. Other external clients are also added here so the domain core remains pure and agnostic of any calls over the network, including other microservices that are part of the same application.

func New

func New(eventPublisher eventbus.EventPublisher, userRepo port.Repository) App

func (App) Login

func (a App) Login(email models.EmailAddress, password models.Password) (jwt.Token, error)

func (App) Register

func (a App) Register(email models.EmailAddress, password models.Password) (models.User, error)

Jump to

Keyboard shortcuts

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