Documentation
¶
Index ¶
Constants ¶
View Source
const ContentCommandType command.Type = "command.creating.Content"
Variables ¶
This section is empty.
Functions ¶
func MakeHandler ¶
func NewService ¶
func NewService(contentRepository cr.ContentRepository, eventBus event.Bus) *service
Types ¶
type ContentCommand ¶
type ContentCommand struct {
// contains filtered or unexported fields
}
ContentCommand is the command dispatched to create a new Content.
func NewContentCommand ¶
func NewContentCommand(id string, title string, description string, contentType string, categories []string, tags []string, author string, publicationDate time.Time, contentUrl string, duration *int, language string, coverImage string, metadata Metadata, status string, source string, visibility string) ContentCommand
NewContentCommand creates a new ContentCommand.
func (ContentCommand) Type ¶
func (c ContentCommand) Type() command.Type
type ContentCommandHandler ¶
type ContentCommandHandler struct {
// contains filtered or unexported fields
}
ContentCommandHandler is the command handler responsible for creating Contents.
func NewContentCommandHandler ¶
func NewContentCommandHandler(service Service) ContentCommandHandler
NewContentCommandHandler initializes a new ContentCommandHandler.
type IncreaseContentsCounterOnContentCreated ¶
type IncreaseContentsCounterOnContentCreated struct {
// contains filtered or unexported fields
}
func NewIncreaseContentsCounterOnContentCreated ¶
func NewIncreaseContentsCounterOnContentCreated(increaserService increasing.ContentCounterService) IncreaseContentsCounterOnContentCreated
type Service ¶
type Service interface {
CreateContent(ctx context.Context, uuid string, title string, description string, contentType string, categories []string, tags []string, author string, publicationDate time.Time, contentURL string, duration *int, language string, coverImage string, metadata cr.Metadata, status string, source string, visibility string) error
}
Click to show internal directories.
Click to hide internal directories.