feedview

package
v0.0.310 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PostIDKey = "post_id"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Comp

type Comp struct{}

type Core

type Core struct {
	owner.Owner `bson:",inline" validate:"recurse"`
	PostID      *contract.ID `json:"post_id" validate:"nnpt,nz"`
}

func ApplyCore

func ApplyCore(c *Core, modifiers ...CoreOption) Core

func (*Core) GetPostID

func (c *Core) GetPostID() contract.ID

func (*Core) SetPostID

func (c *Core) SetPostID(x contract.ID)

type CoreOption

type CoreOption = contracti.CoreOption[Core]

func WithOwner

func WithOwner(x owner.Owner) CoreOption

func WithPostID

func WithPostID(x contract.ID) CoreOption

type FeedView

type FeedView struct {
	Meta `bson:",inline" validate:"recurse"`
	Comp `bson:",inline" validate:"recurse"`
	Core `bson:",inline" validate:"recurse"`
}

FeedView represents a view of a post.

func Mock

func Mock(o owner.Owner) *FeedView

func New

func New(m Meta, cr Core) *FeedView

type Meta

type Meta struct {
	common.Common `bson:",inline" validate:"recurse"`
}

func ApplyMeta

func ApplyMeta(m *Meta, modifiers ...MetaOption) Meta

type MetaOption

type MetaOption = contract.MetaOption[Meta]

func WithCommon

func WithCommon(x common.Common) MetaOption

Jump to

Keyboard shortcuts

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