feedobject

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 (
	SignedURLKey  = "signed_url"
	MimePrefixKey = "mime_prefix"
	EmbeddingKey  = "embedding"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Comp

type Comp struct{}

type Core

type Core struct {
	SignedURL  *string                      `json:"signed_url" validate:"nnpt,nz"`
	MimePrefix *string                      `json:"mime_prefix" validate:"nnpt,nz"`
	Embedding  *plotembedding.PlotEmbedding `json:"embedding" validate:"nnpt,nz"`
}

func ApplyCore

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

func (*Core) GetEmbedding

func (c *Core) GetEmbedding() plotembedding.PlotEmbedding

func (*Core) GetMimePrefix

func (c *Core) GetMimePrefix() string

func (*Core) GetSignedURL

func (c *Core) GetSignedURL() string

func (*Core) SetEmbedding

func (c *Core) SetEmbedding(x plotembedding.PlotEmbedding)

func (*Core) SetMimePrefix

func (c *Core) SetMimePrefix(x string)

func (*Core) SetSignedURL

func (c *Core) SetSignedURL(x string)

type CoreOption

type CoreOption = contracti.CoreOption[Core]

func WithMimePrefix

func WithMimePrefix(x string) CoreOption

func WithSignedURL

func WithSignedURL(x string) CoreOption

type FeedObject

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

FeedObject contains the denormalized content of the objects of a feed post.

func Mock

func Mock() *FeedObject

func New

func New(m Meta, cr Core) *FeedObject

type Meta

type Meta struct{}

func ApplyMeta

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

type MetaOption

type MetaOption = contract.MetaOption[Meta]

Jump to

Keyboard shortcuts

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