mock

package
v0.0.0-...-ac49759 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AffirmationRepository

type AffirmationRepository struct {
	GetAffirmationFn    func(ctx context.Context, id ulid.ULID) (*domain.Affirmation, error)
	GetAffirmationsFn   func(ctx context.Context) ([]*domain.Affirmation, int, error)
	CreateAffirmationFn func(ctx context.Context, au *domain.CreateAffirmationCommand) error
	UpdateAffirmationFn func(ctx context.Context, id ulid.ULID, au *domain.UpdateAffirmationCommand) error
	DeleteAffirmationFn func(ctx context.Context, id ulid.ULID) error
}

func (*AffirmationRepository) CreateAffirmation

func (*AffirmationRepository) DeleteAffirmation

func (r *AffirmationRepository) DeleteAffirmation(ctx context.Context, id ulid.ULID) error

func (*AffirmationRepository) GetAffirmation

func (r *AffirmationRepository) GetAffirmation(ctx context.Context, id ulid.ULID) (*domain.Affirmation, error)

func (*AffirmationRepository) GetAffirmations

func (r *AffirmationRepository) GetAffirmations(ctx context.Context) ([]*domain.Affirmation, int, error)

func (*AffirmationRepository) UpdateAffirmation

func (r *AffirmationRepository) UpdateAffirmation(ctx context.Context, id ulid.ULID, uac *domain.UpdateAffirmationCommand) error

type CategoryRepository

type CategoryRepository struct {
	GetCategoryFn    func(ctx context.Context, id ulid.ULID) (*domain.Category, error)
	GetCategoriesFn  func(ctx context.Context) ([]*domain.Category, int, error)
	CreateCategoryFn func(ctx context.Context, au *domain.CreateCategoryCommand) error
	UpdateCategoryFn func(ctx context.Context, id ulid.ULID, au *domain.UpdateCategoryCommand) error
	DeleteCategoryFn func(ctx context.Context, id ulid.ULID) error
}

func (*CategoryRepository) CreateCategory

func (r *CategoryRepository) CreateCategory(ctx context.Context, cac *domain.CreateCategoryCommand) error

func (*CategoryRepository) DeleteCategory

func (r *CategoryRepository) DeleteCategory(ctx context.Context, id ulid.ULID) error

func (*CategoryRepository) GetCategories

func (r *CategoryRepository) GetCategories(ctx context.Context) ([]*domain.Category, int, error)

func (*CategoryRepository) GetCategory

func (r *CategoryRepository) GetCategory(ctx context.Context, id ulid.ULID) (*domain.Category, error)

func (*CategoryRepository) UpdateCategory

func (r *CategoryRepository) UpdateCategory(ctx context.Context, id ulid.ULID, uac *domain.UpdateCategoryCommand) error

type RandomAffirmationRepository

type RandomAffirmationRepository struct {
	GetRandomAffirmationsFn func(ctx context.Context, categoryIds []ulid.ULID) ([]*domain.RandomAffirmation, error)
}

func (*RandomAffirmationRepository) GetRandomAffirmations

func (r *RandomAffirmationRepository) GetRandomAffirmations(ctx context.Context, categoryIds []ulid.ULID) ([]*domain.RandomAffirmation, error)

Jump to

Keyboard shortcuts

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