services

package
v0.0.0-...-60e5973 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2023 License: AGPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrInvalidRegistrationConfig = errors.New("services: invalid registration configuration")

RegistrationConfigs defines the configurations to intialize the service with.

Functions

This section is empty.

Types

type RegistrationConfiguration

type RegistrationConfiguration func(s *RegistrationService) error

RegistrationConfiguration is a function that modifies the service.

func WithMemoryRepositories

func WithMemoryRepositories() RegistrationConfiguration

WithMemoryRepositories attaches in memory repostories to service.

type RegistrationService

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

RegistrationService is a implementation of the RegistrationService.

func NewRegistrationService

func NewRegistrationService() (*RegistrationService, error)

NewRegistrationService accepts configs and returns a new service.

func (*RegistrationService) RegisterUser

func (s *RegistrationService) RegisterUser(name, email string) (entity.Person, error)

RegisterUser registers a user if the email is not already registered.

Jump to

Keyboard shortcuts

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