interactor

package
v0.0.0-...-833cb33 Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2020 License: AGPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Author

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

Author business actions

func NewAuthor

func NewAuthor(logger log.Logger, repository domain.AuthorRepository, bus domain.AuthorEventBus) *Author

NewAuthor Create a new author interact

func (*Author) Create

func (u *Author) Create(ctx context.Context, aggregate *domain.AuthorAggregate) (*domain.Author, error)

Create Store a new entity

func (*Author) Delete

func (u *Author) Delete(ctx context.Context, id string) error

Delete Remove an author from the store

func (*Author) Get

func (u *Author) Get(ctx context.Context, id string) (*domain.Author, error)

Get Obtain one author

func (*Author) HardDelete

func (u *Author) HardDelete(ctx context.Context, id string) error

HardDelete Remove an author from the store permanently

func (*Author) List

func (u *Author) List(ctx context.Context, pageToken, pageSize string, filterParams core.FilterParams) (output []*domain.Author, nextToken string, err error)

List Get an author's list

func (*Author) Restore

func (u *Author) Restore(ctx context.Context, id string) error

Restore recover an author from the store

func (*Author) Update

func (u *Author) Update(ctx context.Context, aggregate *domain.AuthorUpdateAggregate) (*domain.Author, error)

Update Update an author dynamically

type AuthorSAGA

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

func NewAuthorSAGA

func NewAuthorSAGA(logger log.Logger, repo domain.AuthorRepository, event domain.AuthorSAGAEventBus, eventBus domain.AuthorEventBus) *AuthorSAGA

func (*AuthorSAGA) Done

func (u *AuthorSAGA) Done(ctx context.Context, rootID, operation string) error

func (*AuthorSAGA) Failed

func (u *AuthorSAGA) Failed(ctx context.Context, rootID, operation, snapshot string) error

Failed Restore or hard delete author for rollback, mostly for SAGA transactions

func (*AuthorSAGA) RemovePicture

func (u *AuthorSAGA) RemovePicture(ctx context.Context, rootID []byte) error

func (*AuthorSAGA) UpdatePicture

func (u *AuthorSAGA) UpdatePicture(ctx context.Context, rootID string, urlJSON []byte) error

func (*AuthorSAGA) Verify

func (u *AuthorSAGA) Verify(ctx context.Context, service string, authorsJSON []byte) error

Jump to

Keyboard shortcuts

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