model

package
v0.0.19 Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2026 License: MPL-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CardTextboxElementDecorationUnderline     = CardTextboxElementDecoration("underline")
	CardTextboxElementDecorationStrikethrough = CardTextboxElementDecoration("strikethrough")
)
View Source
const (
	ResourceVisibilityPrivate = iota
	ResourceVisibilityHidden
	ResourceVisibilityPublic
)

Variables

This section is empty.

Functions

This section is empty.

Types

type CardCanvasTheme

type CardCanvasTheme struct {
	CardContentElementTheme
	OutlineColor string `json:"outline_color,omitempty"`
}

type CardContentElementTheme

type CardContentElementTheme struct {
	FillColor string `json:"fill_color,omitempty"`
	MaskColor string `json:"mask_color,omitempty"`
}

type CardContentFace

type CardContentFace struct {
	Theme   *CardFaceTheme      `json:"theme,omitempty"`
	Content CardContentNodeList `json:"content"`
}

type CardContentNode

type CardContentNode interface {
	CardContentNodeType() string
}

type CardContentNodeBase

type CardContentNodeBase struct {
	Type string `json:"type"`
}

type CardContentNodeList

type CardContentNodeList []CardContentNode

func (CardContentNodeList) MarshalJSON

func (list CardContentNodeList) MarshalJSON() ([]byte, error)

func (*CardContentNodeList) UnmarshalJSON

func (list *CardContentNodeList) UnmarshalJSON(data []byte) (err error)

type CardFaceTheme

type CardFaceTheme struct {
	Card         *CardCanvasTheme         `json:"card,omitempty"`
	Interactives *CardContentElementTheme `json:"interactives,omitempty"`
}

type CardImageNode

type CardImageNode struct {
	CardContentNodeBase
	MediaID string `json:"media_id,omitempty"`
}

func (*CardImageNode) CardContentNodeType

func (image *CardImageNode) CardContentNodeType() string

type CardNode added in v0.0.8

type CardNode struct {
	ID    uuid.UUID       `json:"id"`
	Front CardContentFace `json:"front"`
	Back  CardContentFace `json:"back"`
}

type CardPollNode

type CardPollNode struct {
	CardContentNodeBase
	IsQuiz  bool                 `json:"is_quiz,omitempty"`
	Content []CardPollNodeOption `json:"content"`
}

func (*CardPollNode) CardContentNodeType

func (poll *CardPollNode) CardContentNodeType() string

func (*CardPollNode) IsReallyQuiz

func (poll *CardPollNode) IsReallyQuiz() bool

type CardPollNodeOption

type CardPollNodeOption struct {
	Value    string `json:"value"`
	IsAnswer bool   `json:"is_answer,omitempty"`
}

type CardTextBoxNode

type CardTextBoxNode struct {
	CardContentNodeBase
	Content CardTextboxNodeList `json:"content"`
}

func (*CardTextBoxNode) CardContentNodeType

func (elem *CardTextBoxNode) CardContentNodeType() string

type CardTextboxElementDecoration

type CardTextboxElementDecoration string

type CardTextboxElementTextHighlight

type CardTextboxElementTextHighlight struct {
	TextColor string `json:"text_color,omitempty"`
	FillColor string `json:"fill_color,omitempty"`
}

type CardTextboxElementTheme

type CardTextboxElementTheme struct {
	Highlight  *CardTextboxElementTextHighlight `json:"highlight,omitempty"`
	Bold       bool                             `json:"bold,omitempty"`
	Italic     bool                             `json:"italic,omitempty"`
	Decoration CardTextboxElementDecoration     `json:"decoration,omitempty"`
}

type CardTextboxNewlineNode

type CardTextboxNewlineNode struct {
	CardContentNodeBase
}

func (*CardTextboxNewlineNode) CardTextboxNodeType

func (newline *CardTextboxNewlineNode) CardTextboxNodeType() string

type CardTextboxNode

type CardTextboxNode interface {
	CardTextboxNodeType() string
}

type CardTextboxNodeList

type CardTextboxNodeList []CardTextboxNode

func (CardTextboxNodeList) MarshalJSON

func (list CardTextboxNodeList) MarshalJSON() ([]byte, error)

func (*CardTextboxNodeList) UnmarshalJSON

func (list *CardTextboxNodeList) UnmarshalJSON(data []byte) (err error)

type CardTextboxTextNode

type CardTextboxTextNode struct {
	CardContentNodeBase
	Content string                   `json:"content"`
	Theme   *CardTextboxElementTheme `json:"theme,omitempty"`
}

func (*CardTextboxTextNode) CardTextboxNodeType

func (text *CardTextboxTextNode) CardTextboxNodeType() string

type CardTitleNode

type CardTitleNode struct {
	CardContentNodeBase
	Content string `json:"content"`
}

func (*CardTitleNode) CardContentNodeType

func (elem *CardTitleNode) CardContentNodeType() string

type DeckVersionContent added in v0.0.8

type DeckVersionContent struct {
	Cards []CardNode `json:"cards"`
}

func (*DeckVersionContent) Scan added in v0.0.8

func (content *DeckVersionContent) Scan(src any) error

func (DeckVersionContent) Value added in v0.0.8

func (content DeckVersionContent) Value() (driver.Value, error)

type NullUserPermissions

type NullUserPermissions struct {
	Permissions UserPermissions
	Valid       bool
}

func (*NullUserPermissions) Scan

func (perms *NullUserPermissions) Scan(src any) error

func (NullUserPermissions) Value

func (perms NullUserPermissions) Value() (driver.Value, error)

type ResourceVisibilities

type ResourceVisibilities []ResourceVisibility

func (*ResourceVisibilities) Scan

func (rvset *ResourceVisibilities) Scan(src any) error

func (*ResourceVisibilities) ScanJSON added in v0.0.8

func (rvset *ResourceVisibilities) ScanJSON(data []byte) error

func (ResourceVisibilities) Value

func (rvset ResourceVisibilities) Value() (driver.Value, error)

type ResourceVisibility

type ResourceVisibility byte

func (ResourceVisibility) MarshalText

func (visibility ResourceVisibility) MarshalText() ([]byte, error)

func (*ResourceVisibility) Scan

func (visibility *ResourceVisibility) Scan(src any) error

func (ResourceVisibility) String

func (visibility ResourceVisibility) String() string

func (*ResourceVisibility) UnmarshalEnum

func (visibility *ResourceVisibility) UnmarshalEnum(val byte) error

func (*ResourceVisibility) UnmarshalText

func (visibility *ResourceVisibility) UnmarshalText(data []byte) error

func (ResourceVisibility) Value

func (visibility ResourceVisibility) Value() (driver.Value, error)

type UserPermissions

type UserPermissions struct {
	TeamMember  bool `json:"team_member,omitempty"`
	ContentEdit bool `json:"content_edit,omitempty"`
}

func (*UserPermissions) Scan

func (perms *UserPermissions) Scan(src any) error

func (UserPermissions) Value

func (perms UserPermissions) Value() (driver.Value, error)

Jump to

Keyboard shortcuts

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