creating

package
v0.0.0-...-7acbd13 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2026 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const ContentCommandType command.Type = "command.creating.Content"

Variables

This section is empty.

Functions

func MakeHandler

func MakeHandler(b command.Bus, logger kitlog.Logger) gin.HandlerFunc

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.

func (ContentCommandHandler) Handle

Handle implements the command.Handler interface.

type IncreaseContentsCounterOnContentCreated

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

func NewIncreaseContentsCounterOnContentCreated

func NewIncreaseContentsCounterOnContentCreated(increaserService increasing.ContentCounterService) IncreaseContentsCounterOnContentCreated

func (IncreaseContentsCounterOnContentCreated) Handle

type Metadata

type Metadata struct {
	Views    int
	Likes    int
	Comments int
}

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
}

Jump to

Keyboard shortcuts

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