object

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: 5 Imported by: 1

Documentation

Index

Constants

View Source
const (
	UploaderIDKey   = "uploader_id"
	NameKey         = "name"
	OriginalNameKey = "original_name"
	SignedURLKey    = "signed_url"
	MimePrefixKey   = "mime_prefix"
	IsTemporaryKey  = "is_temporary"
	FullQualityKey  = "full_quality"
	EmbeddingKey    = "embedding"
)
View Source
const (
	CaptionKey = "caption"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Comp

type Comp struct {
	Caption *plotembedding.PlotEmbedding `json:"caption" validate:"nnpt,nz"`
}

func (*Comp) GetCaption added in v0.0.167

func (c *Comp) GetCaption() plotembedding.PlotEmbedding

func (*Comp) SetCaption added in v0.0.167

func (c *Comp) SetCaption(x plotembedding.PlotEmbedding)

type Core

type Core struct {
	owner.Owner  `bson:",inline" validate:"recurse"`
	Embedding    *plotembedding.PlotEmbedding `json:"embedding" validate:"nnpt,nz"`
	UploaderID   *contract.ID                 `json:"uploader_id" validate:"nnpt,nz"`
	Name         *string                      `json:"name" conform:"trim" validate:"nnpt,nz"`
	MimePrefix   *string                      `json:"mime_prefix" validate:"nnpt,nz"`
	OriginalName *string                      `json:"original_name" conform:"trim" validate:"nnpt"`
	FullQuality  *bool                        `json:"full_quality" validate:"nnpt"`
	SignedURL    *string                      `json:"signed_url,omitempty"`
	IsTemporary  *bool                        `json:"is_temporary,omitempty"`
}

func ApplyCore

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

func (*Core) GetEmbedding added in v0.0.154

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

func (*Core) GetFullQuality added in v0.0.95

func (c *Core) GetFullQuality() bool

func (*Core) GetIsTemporary added in v0.0.90

func (c *Core) GetIsTemporary() bool

func (*Core) GetMimePrefix

func (c *Core) GetMimePrefix() string

func (*Core) GetName

func (c *Core) GetName() string

func (*Core) GetOriginalName

func (c *Core) GetOriginalName() string

func (*Core) GetSignedURL

func (c *Core) GetSignedURL() string

func (*Core) GetUploaderID

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

func (*Core) SetEmbedding added in v0.0.154

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

func (*Core) SetFullQuality added in v0.0.95

func (c *Core) SetFullQuality(x bool)

func (*Core) SetIsTemporary added in v0.0.90

func (c *Core) SetIsTemporary(x bool)

func (*Core) SetMimePrefix

func (c *Core) SetMimePrefix(x string)

func (*Core) SetName

func (c *Core) SetName(x string)

func (*Core) SetOriginalName

func (c *Core) SetOriginalName(x string)

func (*Core) SetSignedURL

func (c *Core) SetSignedURL(x string)

func (*Core) SetUploaderID

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

type CoreOption

type CoreOption = contracti.CoreOption[Core]

func WithEmbedding added in v0.0.154

func WithEmbedding(x plotembedding.PlotEmbedding) CoreOption

func WithFullQuality added in v0.0.95

func WithFullQuality(x bool) CoreOption

func WithIsTemporary added in v0.0.90

func WithIsTemporary(x bool) CoreOption

func WithMimePrefix

func WithMimePrefix(x string) CoreOption

func WithName

func WithName(x string) CoreOption

func WithOriginalName

func WithOriginalName(x string) CoreOption

func WithOwner

func WithOwner(x owner.Owner) CoreOption

func WithSignedURL

func WithSignedURL(x string) CoreOption

func WithUploaderID

func WithUploaderID(x contract.ID) CoreOption

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

type Object

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

Object represents the details of a storage object.

func Mock

func Mock(o owner.Owner) *Object

func New

func New(m Meta, cr Core) *Object

Jump to

Keyboard shortcuts

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