commands

package
v0.0.0-...-c86e3d9 Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateArticleCommand

type CreateArticleCommand struct {
	Title       string
	Description string
}

CreateArticleCommand Command to create an article

type CreateArticleCommandHandler

type CreateArticleCommandHandler struct {
	RabbitRepo rabbit.RabbitRepository
}

CreateArticleCommandHandler allows to create an article

func NewCreateArticleCommandHandler

func NewCreateArticleCommandHandler(repo rabbit.RabbitRepository) *CreateArticleCommandHandler

NewCreateArticleCommandHandler Creates an instance

func (CreateArticleCommandHandler) Handle

func (cHandler CreateArticleCommandHandler) Handle(command cqrs.Command) error

Handle Creates a new article

type UpdateArticleCommand

type UpdateArticleCommand struct {
	AggregateArticleID string
	Title              string
	Description        string
}

UpdateArticleCommand Command to create an article

type UpdateArticleCommandHandler

type UpdateArticleCommandHandler struct {
	RabbitRepo rabbit.RabbitRepository
}

UpdateArticleCommandHandler allows to update an article

func NewUpdateArticleCommandHandler

func NewUpdateArticleCommandHandler(repo rabbit.RabbitRepository) *UpdateArticleCommandHandler

NewUpdateArticleCommandHandler Creates an instance

func (UpdateArticleCommandHandler) Handle

func (cHandler UpdateArticleCommandHandler) Handle(command cqrs.Command) error

Handle Updates a new article

Jump to

Keyboard shortcuts

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