bundle

package
v1.41.0 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var IgnoreFieldMismatch = datastore.IgnoreFieldMismatch

Functions

func Query

Query returns a datastore query for bundles.

Types

type Bundle

type Bundle struct {
	mixin.Model[Bundle]

	// Unique human readable identifier
	Slug string `json:"slug"`

	// Name of bundle
	Name string `json:"name"`

	// Description of bundle
	Description string `datastore:",noindex" json:"description"`

	// Image/Video/Other Media to show in a gallery
	Media []Media `json:"media"`

	// Is the bundle available
	Available bool `json:"available"`

	// Is product hidden from users
	Hidden bool `json:"hidden"`

	// Range in which bundle is available. If active, it takes precedent
	// over Available bool.
	Availability Availability `json:"availability"`

	// Show this on store?
	Published bool `json:"published"`

	// Is this a preorder?
	Preorder bool `json:"preorder"`

	// Lists of products or specific product variants that are part of this
	// bundle
	ProductIds []string `json:"productIds"`
	VariantIds []string `json:"variantIds"`
}

A bundle of Products/Variants to be listed on a store

func New

func New(db *datastore.Datastore) *Bundle

New creates a new Bundle wired to the given datastore.

func (Bundle) DisplayTitle

func (c Bundle) DisplayTitle() string

func (Bundle) GetDescriptionParagraphs

func (c Bundle) GetDescriptionParagraphs() []string

func (*Bundle) Validator

func (c *Bundle) Validator() *val.Validator

Jump to

Keyboard shortcuts

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