topicwriteservice

package
v0.2.80 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2026 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrTopicNotFound    = errors.New("topic not found")
	ErrOwnerMismatch    = errors.New("topic owner mismatch")
	ErrDailyLimit       = errors.New("daily topic limit reached")
	ErrPermissionDenied = errors.New("topic write permission denied")
)

Functions

func UpdateStatus

func UpdateStatus(userID, topicID uint64, nextStatus int8) error

Types

type WriteInput

type WriteInput struct {
	UserID      uint64
	TopicID     uint64
	Title       string
	Content     string
	CategoryIDs []uint64
	Status      int8
	DailyLimit  int
}

type WriteResult

type WriteResult struct {
	ID               uint64
	ModerationStatus string
	TopicStatus      int8
}

func Write

func Write(input WriteInput) (WriteResult, error)

Jump to

Keyboard shortcuts

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