factories

package
v0.0.0-...-d389d3b Latest Latest
Warning

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

Go to latest
Published: Dec 14, 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 EntityFactory

type EntityFactory[T common.EntityConstraint, U fakers.EntityFaker[T]] interface {
	Any() (*T, error)
	Many(numberOfEntities int) ([]T, error)
	Given(entity T) (*T, error) // TODO, pass faker?
}

type UserFactory

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

func NewUserFactory

func NewUserFactory(userRepository pUser.UserRepository) *UserFactory

func (UserFactory) Any

func (u UserFactory) Any() (*entities.User, error)

func (UserFactory) Given

func (u UserFactory) Given(user entities.User) (*entities.User, error)

func (UserFactory) Many

func (u UserFactory) Many(numberOfEntities int) (users []entities.User, err error)

Jump to

Keyboard shortcuts

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