Help us shape the future of Go! Take the 2026 Go Developer Survey

comment

package
v0.12.18 Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AuditKeyCreate = "comment.create"

	DefaultCommentsOrderBy = "created_at"
)

Variables

View Source
var (
	ErrEmptyCommentParentType = errors.New("parent type can't be empty")
	ErrEmptyCommentParentID   = errors.New("parent ID can't be empty")
	ErrEmptyCommentCreator    = errors.New("comment creator (\"created_by\") can't be empty")
	ErrEmptyCommentBody       = errors.New("comment can't be empty")
)

Functions

This section is empty.

Types

type Service

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

func NewService

func NewService(deps ServiceDeps) *Service

func (*Service) Create

func (s *Service) Create(ctx context.Context, c *domain.Comment) error

func (*Service) List

func (s *Service) List(ctx context.Context, filter domain.ListCommentsFilter) ([]*domain.Comment, error)

type ServiceDeps

type ServiceDeps struct {
	Repository repository

	Logger      log.Logger
	AuditLogger audit.AuditLogger
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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