types

package
v0.0.0-...-2873e01 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2024 License: Apache-2.0 Imports: 20 Imported by: 1

Documentation

Index

Constants

View Source
const (
	PageAttachment      string = "page"
	IconAttachment      string = "icon"
	RecordAttachment    string = "record"
	NamespaceAttachment string = "namespace"
)
View Source
const (
	ChartResourceTranslationType       = "compose:chart"
	ModuleResourceTranslationType      = "compose:module"
	ModuleFieldResourceTranslationType = "compose:module-field"
	NamespaceResourceTranslationType   = "compose:namespace"
	PageResourceTranslationType        = "compose:page"
	PageLayoutResourceTranslationType  = "compose:page-layout"
)

Types and stuff

View Source
const (
	AttachmentResourceType     = "corteza::compose:attachment"
	ChartResourceType          = "corteza::compose:chart"
	ModuleResourceType         = "corteza::compose:module"
	ModuleFieldResourceType    = "corteza::compose:module-field"
	NamespaceResourceType      = "corteza::compose:namespace"
	PageResourceType           = "corteza::compose:page"
	PageLayoutResourceType     = "corteza::compose:page-layout"
	RecordResourceType         = "corteza::compose:record"
	RecordRevisionResourceType = "corteza::compose:record-revision"
	ComponentResourceType      = "corteza::compose"
)

Variables

View Source
var (
	// @todo can we remove LocaleKey struct for string constant?
	LocaleKeyChartYAxisLabel                                = LocaleKey{Path: "yAxis.label"}
	LocaleKeyChartMetricsMetricIDLabel                      = LocaleKey{Path: "metrics.{{metricID}}.label"}
	LocaleKeyChartDimensionsDimensionIDMetaStepsStepIDLabel = LocaleKey{Path: "dimensions.{{dimensionID}}.meta.steps.{{stepID}}.label"}
	LocaleKeyModuleName                                     = LocaleKey{Path: "name"}
	LocaleKeyModuleFieldLabel                               = LocaleKey{Path: "label"}
	LocaleKeyModuleFieldMetaDescriptionView                 = LocaleKey{Path: "meta.description.view"}
	LocaleKeyModuleFieldMetaDescriptionEdit                 = LocaleKey{Path: "meta.description.edit"}
	LocaleKeyModuleFieldMetaHintView                        = LocaleKey{Path: "meta.hint.view"}
	LocaleKeyModuleFieldMetaHintEdit                        = LocaleKey{Path: "meta.hint.edit"}
	LocaleKeyModuleFieldExpressionValidatorValidatorIDError = LocaleKey{Path: "expression.validator.{{validatorID}}.error"}
	LocaleKeyModuleFieldMetaOptionsValueText                = LocaleKey{Path: "meta.options.{{value}}.text"}
	LocaleKeyModuleFieldMetaBoolValueLabel                  = LocaleKey{Path: "meta.bool.{{value}}.label"}
	LocaleKeyNamespaceName                                  = LocaleKey{Path: "name"}
	LocaleKeyNamespaceMetaSubtitle                          = LocaleKey{Path: "meta.subtitle"}
	LocaleKeyNamespaceMetaDescription                       = LocaleKey{Path: "meta.description"}
	LocaleKeyPageTitle                                      = LocaleKey{Path: "title"}
	LocaleKeyPageDescription                                = LocaleKey{Path: "description"}
	LocaleKeyPagePageBlockBlockIDTitle                      = LocaleKey{Path: "pageBlock.{{blockID}}.title"}
	LocaleKeyPagePageBlockBlockIDDescription                = LocaleKey{Path: "pageBlock.{{blockID}}.description"}
	LocaleKeyPagePageBlockBlockIDButtonButtonIDLabel        = LocaleKey{Path: "pageBlock.{{blockID}}.button.{{buttonID}}.label"}
	LocaleKeyPagePageBlockBlockIDContentBody                = LocaleKey{Path: "pageBlock.{{blockID}}.content.body"}
	LocaleKeyPageLayoutMetaTitle                            = LocaleKey{Path: "meta.title"}
	LocaleKeyPageLayoutMetaDescription                      = LocaleKey{Path: "meta.description"}
	LocaleKeyPageLayoutConfigButtonsNewLabel                = LocaleKey{Path: "config.buttons.new.label"}
	LocaleKeyPageLayoutConfigButtonsEditLabel               = LocaleKey{Path: "config.buttons.edit.label"}
	LocaleKeyPageLayoutConfigButtonsSubmitLabel             = LocaleKey{Path: "config.buttons.submit.label"}
	LocaleKeyPageLayoutConfigButtonsDeleteLabel             = LocaleKey{Path: "config.buttons.delete.label"}
	LocaleKeyPageLayoutConfigButtonsCloneLabel              = LocaleKey{Path: "config.buttons.clone.label"}
	LocaleKeyPageLayoutConfigButtonsBackLabel               = LocaleKey{Path: "config.buttons.back.label"}
	LocaleKeyPageLayoutConfigActionsActionIDMetaLabel       = LocaleKey{Path: "config.actions.{{actionID}}.meta.label"}
)

Functions

func ChartRbacResource

func ChartRbacResource(namespaceID uint64, id uint64) string

ChartRbacResource returns string representation of RBAC resource for Chart

RBAC resource is in the corteza::compose:chart/... format

This function is auto-generated

func ChartRbacResourceTpl

func ChartRbacResourceTpl() string

func ChartResourceTranslation

func ChartResourceTranslation(NamespaceID uint64, ID uint64) string

ChartResourceTranslation returns string representation of Locale resource for Chart

Locale resource is in the compose:chart/... format

This function is auto-generated

func ChartResourceTranslationTpl

func ChartResourceTranslationTpl() string

func ComponentRbacResource

func ComponentRbacResource() string

ComponentRbacResource returns string representation of RBAC resource for Component

RBAC resource is in the corteza::compose/ format

This function is auto-generated

func ComponentRbacResourceTpl

func ComponentRbacResourceTpl() string

func DeDup

func DeDup() *deDup

func ModuleFieldRbacResource

func ModuleFieldRbacResource(namespaceID uint64, moduleID uint64, id uint64) string

ModuleFieldRbacResource returns string representation of RBAC resource for ModuleField

RBAC resource is in the corteza::compose:module-field/... format

This function is auto-generated

func ModuleFieldRbacResourceTpl

func ModuleFieldRbacResourceTpl() string

func ModuleFieldResourceTranslation

func ModuleFieldResourceTranslation(NamespaceID uint64, ModuleID uint64, ID uint64) string

ModuleFieldResourceTranslation returns string representation of Locale resource for ModuleField

Locale resource is in the compose:module-field/... format

This function is auto-generated

func ModuleFieldResourceTranslationTpl

func ModuleFieldResourceTranslationTpl() string

func ModuleRbacResource

func ModuleRbacResource(namespaceID uint64, id uint64) string

ModuleRbacResource returns string representation of RBAC resource for Module

RBAC resource is in the corteza::compose:module/... format

This function is auto-generated

func ModuleRbacResourceTpl

func ModuleRbacResourceTpl() string

func ModuleResourceTranslation

func ModuleResourceTranslation(NamespaceID uint64, ID uint64) string

ModuleResourceTranslation returns string representation of Locale resource for Module

Locale resource is in the compose:module/... format

This function is auto-generated

func ModuleResourceTranslationTpl

func ModuleResourceTranslationTpl() string

func NamespaceRbacResource

func NamespaceRbacResource(id uint64) string

NamespaceRbacResource returns string representation of RBAC resource for Namespace

RBAC resource is in the corteza::compose:namespace/... format

This function is auto-generated

func NamespaceRbacResourceTpl

func NamespaceRbacResourceTpl() string

func NamespaceResourceTranslation

func NamespaceResourceTranslation(ID uint64) string

NamespaceResourceTranslation returns string representation of Locale resource for Namespace

Locale resource is in the compose:namespace/... format

This function is auto-generated

func NamespaceResourceTranslationTpl

func NamespaceResourceTranslationTpl() string

func PageLayoutRbacResource

func PageLayoutRbacResource(namespaceID uint64, pageID uint64, id uint64) string

PageLayoutRbacResource returns string representation of RBAC resource for PageLayout

RBAC resource is in the corteza::compose:page-layout/... format

This function is auto-generated

func PageLayoutRbacResourceTpl

func PageLayoutRbacResourceTpl() string

func PageLayoutResourceTranslation

func PageLayoutResourceTranslation(NamespaceID uint64, PageID uint64, ID uint64) string

PageLayoutResourceTranslation returns string representation of Locale resource for PageLayout

Locale resource is in the compose:page-layout/... format

This function is auto-generated

func PageLayoutResourceTranslationTpl

func PageLayoutResourceTranslationTpl() string

func PageRbacResource

func PageRbacResource(namespaceID uint64, id uint64) string

PageRbacResource returns string representation of RBAC resource for Page

RBAC resource is in the corteza::compose:page/... format

This function is auto-generated

func PageRbacResourceTpl

func PageRbacResourceTpl() string

func PageResourceTranslation

func PageResourceTranslation(NamespaceID uint64, ID uint64) string

PageResourceTranslation returns string representation of Locale resource for Page

Locale resource is in the compose:page/... format

This function is auto-generated

func PageResourceTranslationTpl

func PageResourceTranslationTpl() string

func RecordRbacResource

func RecordRbacResource(namespaceID uint64, moduleID uint64, id uint64) string

RecordRbacResource returns string representation of RBAC resource for Record

RBAC resource is in the corteza::compose:record/... format

This function is auto-generated

func RecordRbacResourceTpl

func RecordRbacResourceTpl() string

Types

type Attachment

type Attachment struct {
	ID         uint64         `json:"attachmentID,string"`
	OwnerID    uint64         `json:"ownerID,string"`
	Kind       string         `json:"-"`
	Url        string         `json:"url,omitempty"`
	PreviewUrl string         `json:"previewUrl,omitempty"`
	Name       string         `json:"name,omitempty"`
	Meta       AttachmentMeta `json:"meta"`

	NamespaceID uint64 `json:"namespaceID,string"`

	CreatedAt time.Time  `json:"createdAt,omitempty"`
	UpdatedAt *time.Time `json:"updatedAt,omitempty"`
	DeletedAt *time.Time `json:"deletedAt,omitempty"`
}

func (Attachment) GetID

func (r Attachment) GetID() uint64

func (*Attachment) GetValue

func (r *Attachment) GetValue(name string, pos uint) (any, error)

func (*Attachment) SetOriginalImageMeta

func (a *Attachment) SetOriginalImageMeta(width, height int, animated bool) *AttachmentFileMeta

func (*Attachment) SetPreviewImageMeta

func (a *Attachment) SetPreviewImageMeta(width, height int, animated bool) *AttachmentFileMeta

func (*Attachment) SetValue

func (r *Attachment) SetValue(name string, pos uint, value any) (err error)

type AttachmentFileMeta

type AttachmentFileMeta struct {
	Size      int64                `json:"size"`
	Extension string               `json:"ext"`
	Mimetype  string               `json:"mimetype"`
	Image     *AttachmentImageMeta `json:"image,omitempty"`
}

type AttachmentFilter

type AttachmentFilter struct {
	NamespaceID uint64 `json:"namespaceID,string"`
	Kind        string `json:"kind,omitempty"`
	PageID      uint64 `json:"pageID,string,omitempty"`
	RecordID    uint64 `json:"recordID,string,omitempty"`
	ModuleID    uint64 `json:"moduleID,string,omitempty"`
	FieldName   string `json:"fieldName,omitempty"`
	Filter      string `json:"filter"`

	Deleted filter.State `json:"deleted"`

	// Check fn is called by store backend for each resource found function can
	// modify the resource and return false if store should not return it
	//
	// Store then loads additional resources to satisfy the paging parameters
	Check func(*Attachment) (bool, error)

	// Standard helpers for paging and sorting
	filter.Sorting
	filter.Paging
}

AttachmentFilter is used for filtering and as a return value from Find

type AttachmentIconMeta

type AttachmentIconMeta struct {
	Name    string `json:"name"`
	Library string `json:"library"`
}

type AttachmentIconSvgMeta

type AttachmentIconSvgMeta struct {
	Src string `json:"src"`
}

type AttachmentImageMeta

type AttachmentImageMeta struct {
	Width    int  `json:"width,omitempty"`
	Height   int  `json:"height,omitempty"`
	Animated bool `json:"animated"`
}

type AttachmentMeta

type AttachmentMeta struct {
	Original AttachmentFileMeta  `json:"original"`
	Preview  *AttachmentFileMeta `json:"preview,omitempty"`

	Icon    *AttachmentIconMeta    `json:"icon,omitempty"`
	IconSvg *AttachmentIconSvgMeta `json:"iconSvg,omitempty"`
}

func (*AttachmentMeta) Scan

func (meta *AttachmentMeta) Scan(src any) error

func (AttachmentMeta) Value

func (meta AttachmentMeta) Value() (driver.Value, error)

type AttachmentSet

type AttachmentSet []*Attachment

AttachmentSet slice of Attachment

This type is auto-generated.

func (AttachmentSet) Filter

func (set AttachmentSet) Filter(f func(*Attachment) (bool, error)) (out AttachmentSet, err error)

Filter iterates through every slice item, calls f(Attachment) (bool, err) and return filtered slice

This function is auto-generated.

func (AttachmentSet) FindByID

func (set AttachmentSet) FindByID(ID uint64) *Attachment

FindByID finds items from slice by its ID property

This function is auto-generated.

func (AttachmentSet) IDs

func (set AttachmentSet) IDs() (IDs []uint64)

IDs returns a slice of uint64s from all items in the set

This function is auto-generated.

func (AttachmentSet) Walk

func (set AttachmentSet) Walk(w func(*Attachment) error) (err error)

Walk iterates through every slice item and calls w(Attachment) err

This function is auto-generated.

type Chart

type Chart struct {
	ID     uint64      `json:"chartID,string"`
	Handle string      `json:"handle"`
	Name   string      `json:"name"`
	Config ChartConfig `json:"config"`

	Labels map[string]string `json:"labels,omitempty"`

	NamespaceID uint64 `json:"namespaceID,string"`

	CreatedAt time.Time  `json:"createdAt,omitempty"`
	UpdatedAt *time.Time `json:"updatedAt,omitempty"`
	DeletedAt *time.Time `json:"deletedAt,omitempty"`
}

func (*Chart) DecodeTranslations

func (r *Chart) DecodeTranslations(tt locale.ResourceTranslationIndex)

func (*Chart) EncodeTranslations

func (r *Chart) EncodeTranslations() (out locale.ResourceTranslationSet)

func (Chart) GetID

func (r Chart) GetID() uint64

func (Chart) GetLabels

func (m Chart) GetLabels() map[string]string

GetLabels adds new label to label map

func (*Chart) GetValue

func (r *Chart) GetValue(name string, pos uint) (any, error)

func (Chart) LabelResourceID

func (m Chart) LabelResourceID() uint64

GetLabels adds new label to label map

func (Chart) LabelResourceKind

func (Chart) LabelResourceKind() string

GetLabels adds new label to label map

func (Chart) RbacResource

func (r Chart) RbacResource() string

RbacResource returns string representation of RBAC resource for Chart by calling ChartRbacResource fn

RBAC resource is in the corteza::compose:chart/... format

This function is auto-generated

func (Chart) ResourceTranslation

func (r Chart) ResourceTranslation() string

ResourceTranslation returns string representation of Locale resource for Chart by calling ChartResourceTranslation fn

Locale resource is in "compose:chart/..." format

This function is auto-generated

func (*Chart) SetLabel

func (m *Chart) SetLabel(key string, value string)

SetLabel adds new label to label map

func (*Chart) SetValue

func (r *Chart) SetValue(name string, pos uint, value any) (err error)

type ChartConfig

type ChartConfig struct {
	Reports     []*ChartConfigReport   `json:"reports,omitempty"`
	ColorScheme string                 `json:"colorScheme,omitempty"`
	NoAnimation bool                   `json:"noAnimation,omitempty"`
	Toolbox     map[string]interface{} `json:"toolbox,omitempty"`
}

func (*ChartConfig) GenerateIDs

func (c *ChartConfig) GenerateIDs(nextID func() uint64)

func (*ChartConfig) Scan

func (cc *ChartConfig) Scan(src any) error

func (ChartConfig) Value

func (cc ChartConfig) Value() (driver.Value, error)

type ChartConfigReport

type ChartConfigReport struct {
	ReportID   uint64                   `json:"reportID,string,omitempty"`
	Filter     string                   `json:"filter"`
	ModuleID   uint64                   `json:"moduleID,string,omitempty"`
	Metrics    []map[string]interface{} `json:"metrics,omitempty"`
	Dimensions []map[string]interface{} `json:"dimensions,omitempty"`
	YAxis      map[string]interface{}   `json:"yAxis,omitempty"`
	Legend     map[string]interface{}   `json:"legend,omitempty"`
	Tooltip    map[string]interface{}   `json:"tooltip,omitempty"`
	Offset     map[string]interface{}   `json:"offset,omitempty"`
	Renderer   struct {
		Version string `json:"version,omitempty" `
	} `json:"renderer,omitempty"`
}

func (*ChartConfigReport) WalkDimensionSteps

func (r *ChartConfigReport) WalkDimensionSteps(fn func(string, string, map[string]interface{}))

func (*ChartConfigReport) WalkMetrics

func (r *ChartConfigReport) WalkMetrics(fn func(string, map[string]interface{}))

type ChartFilter

type ChartFilter struct {
	NamespaceID uint64   `json:"namespaceID,string"`
	ChartID     []string `json:"chartID"`
	Handle      string   `json:"handle"`
	Name        string   `json:"name"`
	Query       string   `json:"query"`

	LabeledIDs []uint64          `json:"-"`
	Labels     map[string]string `json:"labels,omitempty"`

	Deleted filter.State `json:"deleted"`

	// Check fn is called by store backend for each resource found function can
	// modify the resource and return false if store should not return it
	//
	// Store then loads additional resources to satisfy the paging parameters
	Check func(*Chart) (bool, error) `json:"-"`

	// Standard helpers for paging and sorting
	filter.Sorting
	filter.Paging
}

type ChartSet

type ChartSet []*Chart

ChartSet slice of Chart

This type is auto-generated.

func (ChartSet) Filter

func (set ChartSet) Filter(f func(*Chart) (bool, error)) (out ChartSet, err error)

Filter iterates through every slice item, calls f(Chart) (bool, err) and return filtered slice

This function is auto-generated.

func (ChartSet) FindByHandle

func (set ChartSet) FindByHandle(handle string) *Chart

FindByHandle finds chart by it's handle

func (ChartSet) FindByID

func (set ChartSet) FindByID(ID uint64) *Chart

FindByID finds items from slice by its ID property

This function is auto-generated.

func (ChartSet) IDs

func (set ChartSet) IDs() (IDs []uint64)

IDs returns a slice of uint64s from all items in the set

This function is auto-generated.

func (ChartSet) Walk

func (set ChartSet) Walk(w func(*Chart) error) (err error)

Walk iterates through every slice item and calls w(Chart) err

This function is auto-generated.

type Component

type Component struct{}

Component struct serves as a virtual resource type for the compose component

This struct is auto-generated

func (Component) RbacResource

func (r Component) RbacResource() string

RbacResource returns string representation of RBAC resource for Component by calling ComponentRbacResource fn

RBAC resource is in the corteza::compose/... format

This function is auto-generated

type DeDupIssueKind

type DeDupIssueKind string

DeDupIssueKind based on strict mode rule or duplication config

func (DeDupIssueKind) String

func (rule DeDupIssueKind) String() string

type DeDupMultiValueConstraint

type DeDupMultiValueConstraint string

DeDupMultiValueConstraint for matching multi values accordingly

type DeDupRule

type DeDupRule struct {
	Name          DeDupRuleName          `json:"name"`
	Strict        bool                   `json:"strict"`
	ErrorMessage  string                 `json:"errorMessage"`
	ConstraintSet DeDupRuleConstraintSet `json:"constraints"`
}

func (DeDupRule) Attributes

func (rule DeDupRule) Attributes() (out []string)

func (DeDupRule) HasAttributes

func (rule DeDupRule) HasAttributes() bool

func (DeDupRule) IsStrict

func (rule DeDupRule) IsStrict() bool

func (DeDupRule) IssueKind

func (rule DeDupRule) IssueKind() string

func (DeDupRule) IssueMessage

func (rule DeDupRule) IssueMessage() (out string)

func (DeDupRule) String

func (rule DeDupRule) String() string

type DeDupRuleConstraint

type DeDupRuleConstraint struct {
	Attribute  string                    `json:"attribute"`
	Modifier   DeDupValueModifier        `json:"modifier"`
	MultiValue DeDupMultiValueConstraint `json:"multiValue"`
}

func (DeDupRuleConstraint) HasMultiValue

func (c DeDupRuleConstraint) HasMultiValue() bool

func (DeDupRuleConstraint) IsAllEqual

func (c DeDupRuleConstraint) IsAllEqual() bool

func (DeDupRuleConstraint) IsOneOf

func (c DeDupRuleConstraint) IsOneOf() bool

type DeDupRuleConstraintSet

type DeDupRuleConstraintSet []*DeDupRuleConstraint

type DeDupRuleName

type DeDupRuleName string

DeDupRuleName represent the identifier for duplicate detection rule

type DeDupRuleSet

type DeDupRuleSet []*DeDupRule

DeDupRuleSet slice of DeDupRule

This type is auto-generated.

func (DeDupRuleSet) Filter

func (set DeDupRuleSet) Filter(f func(*DeDupRule) (bool, error)) (out DeDupRuleSet, err error)

Filter iterates through every slice item, calls f(DeDupRule) (bool, err) and return filtered slice

This function is auto-generated.

func (DeDupRuleSet) Validate

func (dr DeDupRuleSet) Validate() (err error)

func (DeDupRuleSet) Walk

func (set DeDupRuleSet) Walk(w func(*DeDupRule) error) (err error)

Walk iterates through every slice item and calls w(DeDupRule) err

This function is auto-generated.

type DeDupValueModifier

type DeDupValueModifier string

DeDupValueModifier represent the algorithm used to check value string

type DiscoveryResult

type DiscoveryResult struct {
	Result []struct {
		Lang   string   `json:"lang"`
		Fields []string `json:"fields"`
	} `json:"result"`
}

type EmailNotification

type EmailNotification struct {
	To                []string
	Cc                []string
	ReplyTo           string
	Subject           string
	ContentPlain      string
	ContentHTML       string
	RemoteAttachments []string
}

type EncodingStrategy

type EncodingStrategy struct {
	Omit bool `json:"omit,omitempty"`

	*EncodingStrategyAlias `json:"alias,omitempty"`
	*EncodingStrategyJSON  `json:"json,omitempty"`
	*EncodingStrategyPlain `json:"plain,omitempty"`
}

EncodingStrategy is used by both: Module (for system fields) and ModuleField

type EncodingStrategyAlias

type EncodingStrategyAlias struct {
	Ident string `json:"ident"`
}

type EncodingStrategyJSON

type EncodingStrategyJSON struct {
	Ident string `json:"ident"`
}

type EncodingStrategyPlain

type EncodingStrategyPlain struct{}

type Icon

type Icon struct {
}

type IconFilter

type IconFilter struct {
	// Check fn is called by store backend for each resource found function can
	// modify the resource and return false if store should not return it
	//
	// Store then loads additional resources to satisfy the paging parameters
	Check func(icon *Icon) (bool, error) `json:"-"`

	// Standard helpers for paging and sorting
	filter.Sorting
	filter.Paging
}

type IconSet

type IconSet []*Icon

IconSet slice of Icon

This type is auto-generated.

func (IconSet) Filter

func (set IconSet) Filter(f func(*Icon) (bool, error)) (out IconSet, err error)

Filter iterates through every slice item, calls f(Icon) (bool, err) and return filtered slice

This function is auto-generated.

func (IconSet) Walk

func (set IconSet) Walk(w func(*Icon) error) (err error)

Walk iterates through every slice item and calls w(Icon) err

This function is auto-generated.

type IconType

type IconType string
const (
	// IconTypeLink empty or "link" (default):
	// Indicate that src will contain an absolute or relative link to an icon.
	// Can also be used for inline images (storing "base64:" prefixed string in source).
	// This type and reference is not validated by the backend.
	IconTypeLink IconType = "link" // type, source
	// IconTypeLibrary "library"
	// Source references an icon from a library. Ref's value should be in the following
	// notation: "font-awesome://<icon-identifier>".
	// This type and source is not validated by the backend.
	IconTypeLibrary IconType = "library" // type, library(font-awesome), icon name
	// IconTypeInlineSvg "svg"
	// SRC contains raw SVG document
	IconTypeInlineSvg IconType = "inline-svg" // source
	// IconTypeAttachment "attachment"
	// Reference (ID) to an existing attachment in local Corteza instance is expected
	// This type and reference must be validated by the backend.
	IconTypeAttachment IconType = "attachment" // type, Icon, name
)

type LocaleKey

type LocaleKey struct {
	Name          string
	Resource      string
	Path          string
	CustomHandler string
}

type Module

type Module struct {
	ID     uint64 `json:"moduleID,string"`
	Handle string `json:"handle"`

	// collection of configurations for various subsystems that
	// use this module and how it affects their behaviour
	Config ModuleConfig `json:"config"`

	// @todo should be removed and placed into a separate subsystem
	//       mostly because we want to allow client apps to store
	//       application configs away from the module config
	//       using separate access-control
	Meta types.JSONText `json:"meta"`

	Fields ModuleFieldSet `json:"fields"`

	Labels map[string]string `json:"labels,omitempty"`

	Issues []dal.Issue `json:"issues,omitempty"`

	NamespaceID uint64 `json:"namespaceID,string"`

	CreatedAt time.Time  `json:"createdAt,omitempty"`
	UpdatedAt *time.Time `json:"updatedAt,omitempty"`
	DeletedAt *time.Time `json:"deletedAt,omitempty"`

	// Warning: value of this field is now handled via resource-translation facility
	//          struct field is kept for the convenience for now since it allows us
	//          easy encoding/decoding of the outgoing/incoming values
	Name string `json:"name"`
}

func (Module) Clone

func (m Module) Clone() *Module

func (*Module) DecodeTranslations

func (r *Module) DecodeTranslations(tt locale.ResourceTranslationIndex)

func (*Module) EncodeTranslations

func (r *Module) EncodeTranslations() (out locale.ResourceTranslationSet)

func (Module) GetID

func (r Module) GetID() uint64

func (Module) GetLabels

func (m Module) GetLabels() map[string]string

GetLabels adds new label to label map

func (*Module) GetValue

func (r *Module) GetValue(name string, pos uint) (any, error)

func (Module) HasIssues

func (m Module) HasIssues() bool

func (Module) LabelResourceID

func (m Module) LabelResourceID() uint64

GetLabels adds new label to label map

func (Module) LabelResourceKind

func (Module) LabelResourceKind() string

GetLabels adds new label to label map

func (*Module) ModelRef

func (m *Module) ModelRef() dal.ModelRef

func (Module) RbacResource

func (r Module) RbacResource() string

RbacResource returns string representation of RBAC resource for Module by calling ModuleRbacResource fn

RBAC resource is in the corteza::compose:module/... format

This function is auto-generated

func (Module) ResourceTranslation

func (r Module) ResourceTranslation() string

ResourceTranslation returns string representation of Locale resource for Module by calling ModuleResourceTranslation fn

Locale resource is in "compose:module/..." format

This function is auto-generated

func (*Module) SetLabel

func (m *Module) SetLabel(key string, value string)

SetLabel adds new label to label map

func (*Module) SetValue

func (r *Module) SetValue(name string, pos uint, value any) (err error)

type ModuleConfig

type ModuleConfig struct {
	// How and where the records of this module are stored in the database
	DAL ModuleConfigDAL `json:"dal"`

	// Record data privacy settings
	Privacy ModuleConfigDataPrivacy `json:"privacy"`

	Discovery ModuleConfigDiscovery `json:"discovery"`

	RecordRevisions ModuleConfigRecordRevisions `json:"recordRevisions"`

	// RecordDeDup value duplicate detection settings
	RecordDeDup ModuleConfigRecordDeDup `json:"recordDeDup"`
}

func ParseModuleConfig

func ParseModuleConfig(ss []string) (m ModuleConfig, err error)

func (*ModuleConfig) Scan

func (c *ModuleConfig) Scan(src any) error

func (ModuleConfig) Value

func (c ModuleConfig) Value() (driver.Value, error)

type ModuleConfigDAL

type ModuleConfigDAL struct {
	ConnectionID uint64 `json:"connectionID,string"`

	Constraints map[string][]any `json:"constraints"`

	// model identifier (table, collection on the database)
	// can contain {{placeholders}}
	Ident string `json:"ident"`

	SystemFieldEncoding SystemFieldEncoding `json:"systemFieldEncoding"`
}

type ModuleConfigDataPrivacy

type ModuleConfigDataPrivacy struct {
	// Define the highest sensitivity level which
	// can be configured on the module fields
	SensitivityLevelID uint64 `json:"sensitivityLevelID,string,omitempty"`

	UsageDisclosure string `json:"usageDisclosure"`
}

type ModuleConfigDiscovery

type ModuleConfigDiscovery struct {
	Public    DiscoveryResult `json:"public"`
	Private   DiscoveryResult `json:"private"`
	Protected DiscoveryResult `json:"protected"`
}

type ModuleConfigRecordDeDup

type ModuleConfigRecordDeDup struct {
	// strictly restrict record saving
	// 		otherwise show a warning with list of duplicated records
	Strict bool `json:"-"`

	// list of duplicate detection rules applied to module's fields
	Rules DeDupRuleSet `json:"rules,omitempty"`
}

type ModuleConfigRecordRevisions

type ModuleConfigRecordRevisions struct {
	// enable or disable revisions
	Enabled bool `json:"enabled"`

	// where are record revisions stored
	Ident string `json:"ident"`
}

type ModuleField

type ModuleField struct {
	ID          uint64 `json:"fieldID,string"`
	NamespaceID uint64 `json:"namspaceID,string"`
	ModuleID    uint64 `json:"moduleID,string"`
	Place       int    `json:"-"`

	Kind string `json:"kind"`
	Name string `json:"name"`

	// Options relevant to field type
	Options ModuleFieldOptions `json:"options"`

	// Configuration - how sub-services and sub-systems like DAL and record revisions
	// are configured to work with this field
	Config ModuleFieldConfig `json:"config"`

	Required     bool           `json:"isRequired"`
	Multi        bool           `json:"isMulti"`
	DefaultValue RecordValueSet `json:"defaultValue"`

	Expressions ModuleFieldExpr `json:"expressions"`

	Labels map[string]string `json:"labels,omitempty"`

	CreatedAt time.Time  `json:"createdAt,omitempty"`
	UpdatedAt *time.Time `json:"updatedAt,omitempty"`
	DeletedAt *time.Time `json:"deletedAt,omitempty"`

	// Warning: value of this field is now handled via resource-translation facility
	//          struct field is kept for the convenience for now since it allows us
	//          easy encoding/decoding of the outgoing/incoming values
	Label string `json:"label"`
}

Modules - CRM module definitions

func (ModuleField) Clone

func (f ModuleField) Clone() *ModuleField

func (*ModuleField) DecodeTranslations

func (r *ModuleField) DecodeTranslations(tt locale.ResourceTranslationIndex)

func (*ModuleField) EncodeTranslations

func (r *ModuleField) EncodeTranslations() (out locale.ResourceTranslationSet)

func (ModuleField) GetID

func (r ModuleField) GetID() uint64

func (ModuleField) GetLabels

func (m ModuleField) GetLabels() map[string]string

GetLabels adds new label to label map

func (*ModuleField) GetValue

func (r *ModuleField) GetValue(name string, pos uint) (any, error)

func (ModuleField) IsBoolean

func (f ModuleField) IsBoolean() bool

func (ModuleField) IsDateOnly

func (f ModuleField) IsDateOnly() bool

func (ModuleField) IsDateTime

func (f ModuleField) IsDateTime() bool

func (ModuleField) IsNumeric

func (f ModuleField) IsNumeric() bool

func (ModuleField) IsRef

func (f ModuleField) IsRef() bool

IsRef tells us if value of this field be a reference to something (another record, file , user)?

func (ModuleField) IsSensitive

func (f ModuleField) IsSensitive() bool

func (ModuleField) IsTimeOnly

func (f ModuleField) IsTimeOnly() bool

func (ModuleField) LabelResourceID

func (m ModuleField) LabelResourceID() uint64

GetLabels adds new label to label map

func (ModuleField) LabelResourceKind

func (ModuleField) LabelResourceKind() string

GetLabels adds new label to label map

func (ModuleField) RbacResource

func (r ModuleField) RbacResource() string

RbacResource returns string representation of RBAC resource for ModuleField by calling ModuleFieldRbacResource fn

RBAC resource is in the corteza::compose:module-field/... format

This function is auto-generated

func (ModuleField) ResourceTranslation

func (r ModuleField) ResourceTranslation() string

ResourceTranslation returns string representation of Locale resource for ModuleField by calling ModuleFieldResourceTranslation fn

Locale resource is in "compose:module-field/..." format

This function is auto-generated

func (*ModuleField) SelectOptions

func (f *ModuleField) SelectOptions() (out []string)

func (*ModuleField) SetLabel

func (m *ModuleField) SetLabel(key string, value string)

SetLabel adds new label to label map

func (*ModuleField) SetValue

func (r *ModuleField) SetValue(name string, pos uint, value any) (err error)

type ModuleFieldConfig

type ModuleFieldConfig struct {
	DAL     ModuleFieldConfigDAL         `json:"dal"`
	Privacy ModuleFieldConfigDataPrivacy `json:"privacy"`

	RecordRevisions ModuleFieldConfigRecordRevisions `json:"recordRevisions"`
}

func (*ModuleFieldConfig) Scan

func (p *ModuleFieldConfig) Scan(src any) error

func (ModuleFieldConfig) Value

func (p ModuleFieldConfig) Value() (driver.Value, error)

type ModuleFieldConfigDAL

type ModuleFieldConfigDAL struct {
	EncodingStrategy *EncodingStrategy `json:"encodingStrategy"`
}

ModuleFieldConfigDAL holds DAL configuration for a specific field

If strategy is not set for a specific field (nil) then a default strategy is used

type ModuleFieldConfigDataPrivacy

type ModuleFieldConfigDataPrivacy struct {
	// Define the highest sensitivity level which
	// can be configured on the module fields
	SensitivityLevelID uint64 `json:"sensitivityLevelID,string,omitempty"`

	UsageDisclosure string `json:"usageDisclosure"`
}

type ModuleFieldConfigRecordRevisions

type ModuleFieldConfigRecordRevisions struct {
	// when true, skip record revisions for this field
	Skip bool `json:"enabled"`
}

type ModuleFieldExpr

type ModuleFieldExpr struct {
	ValueExpr string `json:"value,omitempty"`

	Sanitizers []string `json:"sanitizers,omitempty"`

	Validators               []ModuleFieldValidator `json:"validators,omitempty"`
	DisableDefaultValidators bool                   `json:"disableDefaultValidators,omitempty"`

	Formatters               []string `json:"formatters,omitempty"`
	DisableDefaultFormatters bool     `json:"disableDefaultFormatters,omitempty"`
}

func (*ModuleFieldExpr) Scan

func (opt *ModuleFieldExpr) Scan(src any) error

func (ModuleFieldExpr) Value

func (opt ModuleFieldExpr) Value() (driver.Value, error)

type ModuleFieldFilter

type ModuleFieldFilter struct {
	ModuleID []uint64
	Deleted  filter.State
	Limit    uint
}

type ModuleFieldOptionIndex

type ModuleFieldOptionIndex struct {
	// Applicable to ref field kinds where we use nested/object type
	// and we want to control how deep do we want to follow the references
	NestingDepth map[string]bool `json:"nestingDepth,omitempty"`

	// When embedding this field into a parent doc, do we skip it?
	SkipNested bool `json:"skipNested,omitempty"`
}

type ModuleFieldOptions

type ModuleFieldOptions map[string]interface{}

func (ModuleFieldOptions) Bool

func (opt ModuleFieldOptions) Bool(key string) bool

Bool returns option value for key as boolean true or false

Invalid, non-existing are returned as false

func (ModuleFieldOptions) Index

IsUnique - should value in this field be unique across records?

func (ModuleFieldOptions) Int64

func (opt ModuleFieldOptions) Int64(key string) int64

func (ModuleFieldOptions) Int64Def

func (opt ModuleFieldOptions) Int64Def(key string, def int64) int64

func (ModuleFieldOptions) IsUnique

func (opt ModuleFieldOptions) IsUnique() bool

IsUnique - should value in this field be unique across records?

func (ModuleFieldOptions) IsUniqueMultiValue

func (opt ModuleFieldOptions) IsUniqueMultiValue() bool

IsUniqueMultiValue - should value in this field be unique in the multi-value set?

func (ModuleFieldOptions) Precision

func (opt ModuleFieldOptions) Precision() (p uint)

func (*ModuleFieldOptions) Scan

func (opt *ModuleFieldOptions) Scan(src any) error

func (ModuleFieldOptions) SetIsUnique

func (opt ModuleFieldOptions) SetIsUnique(value bool)

SetIsUnique - should value in this field be unique across records?

func (ModuleFieldOptions) SetIsUniqueMultiValue

func (opt ModuleFieldOptions) SetIsUniqueMultiValue(value bool)

func (ModuleFieldOptions) SetPrecision

func (opt ModuleFieldOptions) SetPrecision(p uint)

func (ModuleFieldOptions) String

func (opt ModuleFieldOptions) String(key string) string

String returns option value for key as single string

Invalid, non-existing are returned as empty string ("")

func (ModuleFieldOptions) Strings

func (opt ModuleFieldOptions) Strings(key string) []string

Strings returns option value for key as slice of strings

Invalid, non-existing are returned as nil

func (ModuleFieldOptions) UInt64

func (opt ModuleFieldOptions) UInt64(key string) uint64

func (ModuleFieldOptions) UInt64Def

func (opt ModuleFieldOptions) UInt64Def(key string, def uint64) uint64

func (ModuleFieldOptions) Uint64

func (opt ModuleFieldOptions) Uint64(key string) uint64

Uint64 returns option value for key casted to uint64

func (ModuleFieldOptions) Value

func (opt ModuleFieldOptions) Value() (driver.Value, error)

type ModuleFieldSet

type ModuleFieldSet []*ModuleField

ModuleFieldSet slice of ModuleField

This type is auto-generated.

func (ModuleFieldSet) Clone

func (set ModuleFieldSet) Clone() (out ModuleFieldSet)

func (ModuleFieldSet) Filter

func (set ModuleFieldSet) Filter(f func(*ModuleField) (bool, error)) (out ModuleFieldSet, err error)

Filter iterates through every slice item, calls f(ModuleField) (bool, err) and return filtered slice

This function is auto-generated.

func (ModuleFieldSet) FilterByModule

func (set ModuleFieldSet) FilterByModule(moduleID uint64) (ff ModuleFieldSet)

func (ModuleFieldSet) FindByID

func (set ModuleFieldSet) FindByID(ID uint64) *ModuleField

FindByID finds items from slice by its ID property

This function is auto-generated.

func (ModuleFieldSet) FindByName

func (set ModuleFieldSet) FindByName(name string) *ModuleField

func (ModuleFieldSet) HasName

func (set ModuleFieldSet) HasName(name string) bool

func (ModuleFieldSet) IDs

func (set ModuleFieldSet) IDs() (IDs []uint64)

IDs returns a slice of uint64s from all items in the set

This function is auto-generated.

func (ModuleFieldSet) Len

func (set ModuleFieldSet) Len() int

func (ModuleFieldSet) Less

func (set ModuleFieldSet) Less(i, j int) bool

func (ModuleFieldSet) Names

func (set ModuleFieldSet) Names() (names []string)

func (*ModuleFieldSet) Scan

func (set *ModuleFieldSet) Scan(src any) error

func (ModuleFieldSet) Swap

func (set ModuleFieldSet) Swap(i, j int)

func (ModuleFieldSet) Value

func (set ModuleFieldSet) Value() (driver.Value, error)

func (ModuleFieldSet) Walk

func (set ModuleFieldSet) Walk(w func(*ModuleField) error) (err error)

Walk iterates through every slice item and calls w(ModuleField) err

This function is auto-generated.

type ModuleFieldValidator

type ModuleFieldValidator struct {
	ValidatorID uint64 `json:"validatorID,string,omitempty"`
	Test        string `json:"test,omitempty"`
	Error       string `json:"error,omitempty"`
}

type ModuleFilter

type ModuleFilter struct {
	ModuleID    []string `json:"moduleID"`
	NamespaceID uint64   `json:"namespaceID,string"`
	Query       string   `json:"query"`
	Handle      string   `json:"handle"`
	Name        string   `json:"name"`

	LabeledIDs []uint64          `json:"-"`
	Labels     map[string]string `json:"labels,omitempty"`

	Deleted filter.State `json:"deleted"`

	// Check fn is called by store backend for each resource found function can
	// modify the resource and return false if store should not return it
	//
	// Store then loads additional resources to satisfy the paging parameters
	Check func(*Module) (bool, error) `json:"-"`

	// Standard helpers for paging and sorting
	filter.Sorting
	filter.Paging
}

type ModuleSet

type ModuleSet []*Module

ModuleSet slice of Module

This type is auto-generated.

func (ModuleSet) Filter

func (set ModuleSet) Filter(f func(*Module) (bool, error)) (out ModuleSet, err error)

Filter iterates through every slice item, calls f(Module) (bool, err) and return filtered slice

This function is auto-generated.

func (ModuleSet) FindByHandle

func (set ModuleSet) FindByHandle(handle string) *Module

FindByHandle finds module by it's handle

func (ModuleSet) FindByID

func (set ModuleSet) FindByID(ID uint64) *Module

FindByID finds items from slice by its ID property

This function is auto-generated.

func (ModuleSet) IDs

func (set ModuleSet) IDs() (IDs []uint64)

IDs returns a slice of uint64s from all items in the set

This function is auto-generated.

func (ModuleSet) Walk

func (set ModuleSet) Walk(w func(*Module) error) (err error)

Walk iterates through every slice item and calls w(Module) err

This function is auto-generated.

type Namespace

type Namespace struct {
	ID      uint64        `json:"namespaceID,string"`
	Slug    string        `json:"slug"`
	Enabled bool          `json:"enabled"`
	Meta    NamespaceMeta `json:"meta"`

	Labels map[string]string `json:"labels,omitempty"`

	CreatedAt time.Time  `json:"createdAt,omitempty"`
	UpdatedAt *time.Time `json:"updatedAt,omitempty"`
	DeletedAt *time.Time `json:"deletedAt,omitempty"`

	// Warning: value of this field is now handled via resource-translation facility
	//          struct field is kept for the convenience for now since it allows us
	//          easy encoding/decoding of the outgoing/incoming values
	Name string `json:"name"`
}

func (Namespace) Clone

func (n Namespace) Clone() *Namespace

func (*Namespace) DecodeTranslations

func (r *Namespace) DecodeTranslations(tt locale.ResourceTranslationIndex)

func (*Namespace) EncodeTranslations

func (r *Namespace) EncodeTranslations() (out locale.ResourceTranslationSet)

func (Namespace) GetID

func (r Namespace) GetID() uint64

func (Namespace) GetLabels

func (m Namespace) GetLabels() map[string]string

GetLabels adds new label to label map

func (*Namespace) GetValue

func (r *Namespace) GetValue(name string, pos uint) (any, error)

func (Namespace) LabelResourceID

func (m Namespace) LabelResourceID() uint64

GetLabels adds new label to label map

func (Namespace) LabelResourceKind

func (Namespace) LabelResourceKind() string

GetLabels adds new label to label map

func (Namespace) RbacResource

func (r Namespace) RbacResource() string

RbacResource returns string representation of RBAC resource for Namespace by calling NamespaceRbacResource fn

RBAC resource is in the corteza::compose:namespace/... format

This function is auto-generated

func (Namespace) ResourceTranslation

func (r Namespace) ResourceTranslation() string

ResourceTranslation returns string representation of Locale resource for Namespace by calling NamespaceResourceTranslation fn

Locale resource is in "compose:namespace/..." format

This function is auto-generated

func (*Namespace) SetLabel

func (m *Namespace) SetLabel(key string, value string)

SetLabel adds new label to label map

func (*Namespace) SetValue

func (r *Namespace) SetValue(name string, pos uint, value any) (err error)

type NamespaceFilter

type NamespaceFilter struct {
	NamespaceID []string `json:"namespaceID"`

	Query string `json:"query"`
	Slug  string `json:"slug"`
	Name  string `json:"name"`

	LabeledIDs []uint64          `json:"-"`
	Labels     map[string]string `json:"labels,omitempty"`

	Deleted filter.State `json:"deleted"`

	// Check fn is called by store backend for each resource found function can
	// modify the resource and return false if store should not return it
	//
	// Store then loads additional resources to satisfy the paging parameters
	Check func(*Namespace) (bool, error) `json:"-"`

	// Standard helpers for paging and sorting
	filter.Sorting
	filter.Paging
}

type NamespaceMeta

type NamespaceMeta struct {
	// Temporary icon & logo URLs
	// @todo rework this when we rework attachment management
	Icon        string `json:"icon,omitempty"`
	IconID      uint64 `json:"iconID,string"`
	LogoID      uint64 `json:"logoID,string"`
	LogoEnabled bool   `json:"logoEnabled,omitempty"`
	HideSidebar bool   `json:"hideSidebar"`

	// Warning: value of this field is now handled via resource-translation facility
	//          struct field is kept for the convenience for now since it allows us
	//          easy encoding/decoding of the outgoing/incoming values
	Subtitle string `json:"subtitle,omitempty"`

	// Warning: value of this field is now handled via resource-translation facility
	//          struct field is kept for the convenience for now since it allows us
	//          easy encoding/decoding of the outgoing/incoming values
	Description string `json:"description,omitempty"`
}

func (*NamespaceMeta) Scan

func (nm *NamespaceMeta) Scan(src any) error

func (NamespaceMeta) Value

func (nm NamespaceMeta) Value() (driver.Value, error)

type NamespaceSet

type NamespaceSet []*Namespace

NamespaceSet slice of Namespace

This type is auto-generated.

func (NamespaceSet) Filter

func (set NamespaceSet) Filter(f func(*Namespace) (bool, error)) (out NamespaceSet, err error)

Filter iterates through every slice item, calls f(Namespace) (bool, err) and return filtered slice

This function is auto-generated.

func (NamespaceSet) FindByHandle

func (set NamespaceSet) FindByHandle(handle string) *Namespace

FindByHandle finds namespace by it's handle/slug

func (NamespaceSet) FindByID

func (set NamespaceSet) FindByID(ID uint64) *Namespace

FindByID finds items from slice by its ID property

This function is auto-generated.

func (NamespaceSet) IDs

func (set NamespaceSet) IDs() (IDs []uint64)

IDs returns a slice of uint64s from all items in the set

This function is auto-generated.

func (NamespaceSet) Walk

func (set NamespaceSet) Walk(w func(*Namespace) error) (err error)

Walk iterates through every slice item and calls w(Namespace) err

This function is auto-generated.

type OperationType

type OperationType string
const (
	OperationTypeCreate   OperationType = "create"
	OperationTypeUpdate   OperationType = "update"
	OperationTypeDelete   OperationType = "delete"
	OperationTypePatch    OperationType = "patch"
	OperationTypeUndelete OperationType = "undelete"
)

type Page

type Page struct {
	ID     uint64 `json:"pageID,string"`
	SelfID uint64 `json:"selfID,string"`

	NamespaceID uint64 `json:"namespaceID,string"`

	ModuleID uint64 `json:"moduleID,string"`

	Handle string `json:"handle"`

	Config PageConfig `json:"config"`
	Blocks PageBlocks `json:"blocks"`

	Meta PageMeta `json:"meta"`

	Children PageSet `json:"children,omitempty"`

	Labels map[string]string `json:"labels,omitempty"`

	Visible bool `json:"visible"`
	Weight  int  `json:"weight"`

	CreatedAt time.Time  `json:"createdAt,omitempty"`
	UpdatedAt *time.Time `json:"updatedAt,omitempty"`
	DeletedAt *time.Time `json:"deletedAt,omitempty"`

	// Warning: value of this field is now handled via resource-translation facility
	//          struct field is kept for the convenience for now since it allows us
	//          easy encoding/decoding of the outgoing/incoming values
	Title string `json:"title"`

	// Warning: value of this field is now handled via resource-translation facility
	//          struct field is kept for the convenience for now since it allows us
	//          easy encoding/decoding of the outgoing/incoming values
	Description string `json:"description"`
}

func (Page) Clone

func (m Page) Clone() *Page

func (*Page) DecodeTranslations

func (r *Page) DecodeTranslations(tt locale.ResourceTranslationIndex)

func (*Page) EncodeTranslations

func (r *Page) EncodeTranslations() (out locale.ResourceTranslationSet)

func (Page) GetID

func (r Page) GetID() uint64

func (Page) GetLabels

func (m Page) GetLabels() map[string]string

GetLabels adds new label to label map

func (*Page) GetValue

func (r *Page) GetValue(name string, pos uint) (any, error)

func (Page) LabelResourceID

func (m Page) LabelResourceID() uint64

GetLabels adds new label to label map

func (Page) LabelResourceKind

func (Page) LabelResourceKind() string

GetLabels adds new label to label map

func (*Page) Prune

func (p *Page) Prune(rt string)

func (Page) RbacResource

func (r Page) RbacResource() string

RbacResource returns string representation of RBAC resource for Page by calling PageRbacResource fn

RBAC resource is in the corteza::compose:page/... format

This function is auto-generated

func (Page) ResourceTranslation

func (r Page) ResourceTranslation() string

ResourceTranslation returns string representation of Locale resource for Page by calling PageResourceTranslation fn

Locale resource is in "compose:page/..." format

This function is auto-generated

func (*Page) SetLabel

func (m *Page) SetLabel(key string, value string)

SetLabel adds new label to label map

func (*Page) SetValue

func (r *Page) SetValue(name string, pos uint, value any) (err error)

type PageBlock

type PageBlock struct {
	BlockID uint64 `json:"blockID,string,omitempty"`

	Options map[string]interface{} `json:"options,omitempty"`
	Style   PageBlockStyle         `json:"style,omitempty"`
	Kind    string                 `json:"kind"`
	XYWH    [4]int                 `json:"xywh"` // x,y,w,h
	Meta    map[string]any         `json:"meta,omitempty"`

	// Warning: value of this field is now handled via resource-translation facility
	//          struct field is kept for the convenience for now since it allows us
	//          easy encoding/decoding of the outgoing/incoming values
	Title string `json:"title,omitempty"`

	// Warning: value of this field is now handled via resource-translation facility
	//          struct field is kept for the convenience for now since it allows us
	//          easy encoding/decoding of the outgoing/incoming values
	Description string `json:"description,omitempty"`
}

func (*PageBlock) UnmarshalJSON

func (b *PageBlock) UnmarshalJSON(data []byte) (err error)

Helper to extract old encoding to new one

type PageBlockStyle

type PageBlockStyle struct {
	Variants map[string]string      `json:"variants,omitempty"`
	Wrap     map[string]string      `json:"wrap,omitempty"`
	Border   map[string]interface{} `json:"border,omitempty"`
}

type PageBlocks

type PageBlocks []PageBlock

func (*PageBlocks) Scan

func (bb *PageBlocks) Scan(src any) error

func (PageBlocks) Value

func (bb PageBlocks) Value() (driver.Value, error)

type PageChildrenDeleteStrategy

type PageChildrenDeleteStrategy string
const (
	PageChildrenOnDeleteAbort   PageChildrenDeleteStrategy = "abort"
	PageChildrenOnDeleteForce   PageChildrenDeleteStrategy = "force"
	PageChildrenOnDeleteRebase  PageChildrenDeleteStrategy = "rebase"
	PageChildrenOnDeleteCascade PageChildrenDeleteStrategy = "cascade"
)

type PageConfig

type PageConfig struct {
	// How page is presented in the navigation
	NavItem struct {
		// Expanded menu
		Expanded bool            `json:"expanded"`
		Icon     *PageConfigIcon `json:"icon,omitempty"`
	} `json:"navItem"`
}

func (*PageConfig) Scan

func (bb *PageConfig) Scan(src any) error

func (PageConfig) Value

func (bb PageConfig) Value() (driver.Value, error)

type PageConfigIcon

type PageConfigIcon struct {
	Type IconType `json:"type,omitempty"`
	Src  string   `json:"src"`

	// Any custom styling that should be applied to the icon
	Style map[string]string `json:"style,omitempty"`
}

type PageFilter

type PageFilter struct {
	NamespaceID uint64   `json:"namespaceID"`
	PageID      []string `json:"pageID,string"`
	ParentID    uint64   `json:"parentID,string,omitempty"`
	ModuleID    uint64   `json:"moduleID,string,omitempty"`
	Root        bool     `json:"root,omitempty"`
	Handle      string   `json:"handle"`
	Title       string   `json:"title"`
	Query       string   `json:"query"`

	LabeledIDs []uint64          `json:"-"`
	Labels     map[string]string `json:"labels,omitempty"`

	Deleted filter.State `json:"deleted"`

	// Check fn is called by store backend for each resource found function can
	// modify the resource and return false if store should not return it
	//
	// Store then loads additional resources to satisfy the paging parameters
	Check func(*Page) (bool, error) `json:"-"`

	// Standard helpers for paging and sorting
	filter.Sorting
	filter.Paging
}

type PageLayout

type PageLayout struct {
	ID          uint64 `json:"pageLayoutID,string"`
	NamespaceID uint64 `json:"namespaceID,string"`
	PageID      uint64 `json:"pageID,string"`
	ParentID    uint64 `json:"parentID,string"`
	Handle      string `json:"handle"`
	Primary     bool   `json:"primary"`

	Weight int `json:"weight"`

	Meta PageLayoutMeta `json:"meta,omitempty"`

	Config PageLayoutConfig `json:"config"`
	Blocks PageLayoutBlocks `json:"blocks,omitempty"`

	Labels map[string]string `json:"labels,omitempty"`

	OwnedBy uint64 `json:"ownedBy,string"`

	CreatedAt time.Time  `json:"createdAt,omitempty"`
	UpdatedAt *time.Time `json:"updatedAt,omitempty"`
	DeletedAt *time.Time `json:"deletedAt,omitempty"`
}

func (PageLayout) Clone

func (m PageLayout) Clone() *PageLayout

func (*PageLayout) DecodeTranslations

func (r *PageLayout) DecodeTranslations(tt locale.ResourceTranslationIndex)

func (*PageLayout) EncodeTranslations

func (r *PageLayout) EncodeTranslations() (out locale.ResourceTranslationSet)

func (PageLayout) GetID

func (r PageLayout) GetID() uint64

func (PageLayout) GetLabels

func (m PageLayout) GetLabels() map[string]string

GetLabels adds new label to label map

func (*PageLayout) GetValue

func (r *PageLayout) GetValue(name string, pos uint) (any, error)

func (PageLayout) LabelResourceID

func (m PageLayout) LabelResourceID() uint64

GetLabels adds new label to label map

func (PageLayout) LabelResourceKind

func (PageLayout) LabelResourceKind() string

GetLabels adds new label to label map

func (PageLayout) RbacResource

func (r PageLayout) RbacResource() string

RbacResource returns string representation of RBAC resource for PageLayout by calling PageLayoutRbacResource fn

RBAC resource is in the corteza::compose:page-layout/... format

This function is auto-generated

func (PageLayout) ResourceTranslation

func (r PageLayout) ResourceTranslation() string

ResourceTranslation returns string representation of Locale resource for PageLayout by calling PageLayoutResourceTranslation fn

Locale resource is in "compose:page-layout/..." format

This function is auto-generated

func (*PageLayout) SetLabel

func (m *PageLayout) SetLabel(key string, value string)

SetLabel adds new label to label map

func (*PageLayout) SetValue

func (r *PageLayout) SetValue(name string, pos uint, value any) (err error)

type PageLayoutAction

type PageLayoutAction struct {
	ActionID  uint64               `json:"actionID,string"`
	Placement string               `json:"placement"`
	Meta      PageLayoutActionMeta `json:"meta"`
	Enabled   bool                 `json:"enabled"`

	// Kind and Params specify the action's behavior and the parameters it
	// can use for execution
	Kind   string `json:"kind"`
	Params any    `json:"params"`
}

type PageLayoutActionMeta

type PageLayoutActionMeta struct {
	// Warning: value of this field is now handled via resource-translation facility
	//          struct field is kept for the convenience for now since it allows us
	//          easy encoding/decoding of the outgoing/incoming values
	Label string `json:"label"`

	Style map[string]any `json:"style,omitempty"`
}

type PageLayoutBlock

type PageLayoutBlock struct {
	BlockID uint64         `json:"blockID,string,omitempty" yaml:"blockID"`
	XYWH    [4]int         `json:"xywh" yaml:"xywh"`
	Meta    map[string]any `json:"meta,omitempty"`
}

type PageLayoutBlocks

type PageLayoutBlocks []PageLayoutBlock

func (*PageLayoutBlocks) Scan

func (bb *PageLayoutBlocks) Scan(src any) error

func (PageLayoutBlocks) Value

func (bb PageLayoutBlocks) Value() (driver.Value, error)

type PageLayoutButton

type PageLayoutButton struct {
	Enabled bool `json:"enabled"`

	// Warning: value of this field is now handled via resource-translation facility
	//          struct field is kept for the convenience for now since it allows us
	//          easy encoding/decoding of the outgoing/incoming values
	Label string `json:"label"`
}

type PageLayoutButtonConfig

type PageLayoutButtonConfig struct {
	New    PageLayoutButton `json:"new"`
	Edit   PageLayoutButton `json:"edit"`
	Submit PageLayoutButton `json:"submit"`
	Delete PageLayoutButton `json:"delete"`
	Clone  PageLayoutButton `json:"clone"`
	Back   PageLayoutButton `json:"back"`
}

type PageLayoutConfig

type PageLayoutConfig struct {
	Visibility PageLayoutVisibility `json:"visibility"`

	Buttons PageLayoutButtonConfig `json:"buttons"`
	Actions []PageLayoutAction     `json:"actions,omitempty"`

	UseTitle bool `json:"useTitle"`
}

func (*PageLayoutConfig) Scan

func (bb *PageLayoutConfig) Scan(src any) error

func (PageLayoutConfig) Value

func (bb PageLayoutConfig) Value() (driver.Value, error)

type PageLayoutFilter

type PageLayoutFilter struct {
	PageLayoutID []string `json:"pageLayoutID"`
	NamespaceID  uint64   `json:"namespaceID,string"`
	PageID       uint64   `json:"pageID,string,omitempty"`
	ParentID     uint64   `json:"ParentID,string,omitempty"`
	Handle       string   `json:"handle"`
	Name         string   `json:"name"`
	Query        string   `json:"query"`

	LabeledIDs []uint64          `json:"-"`
	Labels     map[string]string `json:"labels,omitempty"`

	Deleted filter.State `json:"deleted"`

	// Check fn is called by store backend for each resource found function can
	// modify the resource and return false if store should not return it
	//
	// Store then loads additional resources to satisfy the paging parameters
	Check func(*PageLayout) (bool, error) `json:"-"`

	// Standard helpers for paging and sorting
	filter.Sorting
	filter.Paging
}

type PageLayoutMeta

type PageLayoutMeta struct {
	// Warning: value of this field is now handled via resource-translation facility
	//          struct field is kept for the convenience for now since it allows us
	//          easy encoding/decoding of the outgoing/incoming values
	Title string `json:"title"`

	// Warning: value of this field is now handled via resource-translation facility
	//          struct field is kept for the convenience for now since it allows us
	//          easy encoding/decoding of the outgoing/incoming values
	Description string `json:"description"`

	Style map[string]any `json:"style,omitempty"`
}

func ParsePageLayoutMeta

func ParsePageLayoutMeta(ss []string) (p PageLayoutMeta, err error)

func (*PageLayoutMeta) Scan

func (vv *PageLayoutMeta) Scan(src any) error

func (PageLayoutMeta) Value

func (vv PageLayoutMeta) Value() (driver.Value, error)

type PageLayoutSet

type PageLayoutSet []*PageLayout

PageLayoutSet slice of PageLayout

This type is auto-generated.

func (PageLayoutSet) Filter

func (set PageLayoutSet) Filter(f func(*PageLayout) (bool, error)) (out PageLayoutSet, err error)

Filter iterates through every slice item, calls f(PageLayout) (bool, err) and return filtered slice

This function is auto-generated.

func (PageLayoutSet) FindByHandle

func (set PageLayoutSet) FindByHandle(handle string) *PageLayout

FindByHandle finds pageLayout by it's handle

func (PageLayoutSet) FindByID

func (set PageLayoutSet) FindByID(ID uint64) *PageLayout

FindByID finds items from slice by its ID property

This function is auto-generated.

func (PageLayoutSet) IDs

func (set PageLayoutSet) IDs() (IDs []uint64)

IDs returns a slice of uint64s from all items in the set

This function is auto-generated.

func (PageLayoutSet) Walk

func (set PageLayoutSet) Walk(w func(*PageLayout) error) (err error)

Walk iterates through every slice item and calls w(PageLayout) err

This function is auto-generated.

type PageLayoutVisibility

type PageLayoutVisibility struct {
	Expression string   `json:"expression"`
	Roles      []string `json:"roles,omitempty"`
}

type PageMeta

type PageMeta struct {
	AllowPersonalLayouts bool `json:"allowPersonalLayouts"`
}

func ParsePageMeta

func ParsePageMeta(ss []string) (p PageMeta, err error)

func (*PageMeta) Scan

func (bb *PageMeta) Scan(src any) error

func (PageMeta) Value

func (bb PageMeta) Value() (driver.Value, error)

type PageSet

type PageSet []*Page

PageSet slice of Page

This type is auto-generated.

func (PageSet) Filter

func (set PageSet) Filter(f func(*Page) (bool, error)) (out PageSet, err error)

Filter iterates through every slice item, calls f(Page) (bool, err) and return filtered slice

This function is auto-generated.

func (PageSet) FindByHandle

func (set PageSet) FindByHandle(handle string) *Page

FindByHandle finds page by it's handle

func (PageSet) FindByID

func (set PageSet) FindByID(ID uint64) *Page

FindByID finds items from slice by its ID property

This function is auto-generated.

func (PageSet) FindByParent

func (set PageSet) FindByParent(parentID uint64) (out PageSet)

func (PageSet) IDs

func (set PageSet) IDs() (IDs []uint64)

IDs returns a slice of uint64s from all items in the set

This function is auto-generated.

func (PageSet) RecursiveWalk

func (set PageSet) RecursiveWalk(parent *Page, fn func(c *Page, parent *Page) error) (err error)

RecursiveWalk through all child pages

func (PageSet) Walk

func (set PageSet) Walk(w func(*Page) error) (err error)

Walk iterates through every slice item and calls w(Page) err

This function is auto-generated.

type PrivacyModule

type PrivacyModule struct {
	Module    PrivacyModuleMeta    `json:"module"`
	Namespace PrivacyNamespaceMeta `json:"namespace"`

	ConnectionID uint64                  `json:"-"`
	Connection   *sysTypes.DalConnection `json:"connection"`
}

type PrivacyModuleFilter

type PrivacyModuleFilter struct {
	NamespaceID  uint64   `json:"-"`
	ConnectionID []string `json:"connectionID"`

	// Standard helpers for paging and sorting
	filter.Sorting
	filter.Paging
}

type PrivacyModuleMeta

type PrivacyModuleMeta struct {
	ID     uint64         `json:"moduleID,string"`
	Name   string         `json:"name"`
	Handle string         `json:"handle"`
	Fields ModuleFieldSet `json:"fields"`
}

type PrivacyModuleSet

type PrivacyModuleSet []*PrivacyModule

PrivacyModuleSet slice of PrivacyModule

This type is auto-generated.

func (PrivacyModuleSet) Filter

func (set PrivacyModuleSet) Filter(f func(*PrivacyModule) (bool, error)) (out PrivacyModuleSet, err error)

Filter iterates through every slice item, calls f(PrivacyModule) (bool, err) and return filtered slice

This function is auto-generated.

func (PrivacyModuleSet) Walk

func (set PrivacyModuleSet) Walk(w func(*PrivacyModule) error) (err error)

Walk iterates through every slice item and calls w(PrivacyModule) err

This function is auto-generated.

type PrivacyNamespaceMeta

type PrivacyNamespaceMeta struct {
	ID   uint64 `json:"namespaceID,string"`
	Slug string `json:"slug"`
	Name string `json:"name"`
}

type Record

type Record struct {
	ID       uint64 `json:"recordID,string"`
	ModuleID uint64 `json:"moduleID,string"`

	Revision int `json:"revision,omitempty"`

	Values RecordValueSet `json:"values,omitempty"`

	Meta map[string]any `json:"meta,omitempty"`

	NamespaceID uint64 `json:"namespaceID,string"`

	OwnedBy   uint64     `json:"ownedBy,string"`
	CreatedAt time.Time  `json:"createdAt,omitempty"`
	CreatedBy uint64     `json:"createdBy,string" `
	UpdatedAt *time.Time `json:"updatedAt,omitempty"`
	UpdatedBy uint64     `json:"updatedBy,string,omitempty"`
	DeletedAt *time.Time `json:"deletedAt,omitempty"`
	DeletedBy uint64     `json:"deletedBy,string,omitempty"`
	// contains filtered or unexported fields
}

Record is a stored row in the `record` table

func (Record) Clone

func (r Record) Clone() *Record

func (*Record) CountValues

func (r *Record) CountValues() (pos map[string]uint)

CountValues returns how many values per field are there

func (Record) Dict

func (r Record) Dict() map[string]interface{}

func (Record) GetID

func (r Record) GetID() uint64

func (*Record) GetModule

func (r *Record) GetModule() *Module

func (*Record) GetValue

func (r *Record) GetValue(name string, pos uint) (any, error)

func (Record) RbacResource

func (r Record) RbacResource() string

RbacResource returns string representation of RBAC resource for Record by calling RecordRbacResource fn

RBAC resource is in the corteza::compose:record/... format

This function is auto-generated

func (*Record) SetModule

func (r *Record) SetModule(m *Module)

Sets/updates module ptr

Only if not previously set and if matches record specs

func (*Record) SetValue

func (r *Record) SetValue(name string, pos uint, value any) (err error)

func (*Record) UnmarshalJSON

func (r *Record) UnmarshalJSON(data []byte) error

UnmarshalJSON for custom record deserialization

Due to https://github.com/golang/go/issues/21092, we should manually reset the given record value set. If this is skipped there is a chance of data corruption; ie. wrong value is removed/edited

type RecordBulk

type RecordBulk struct {
	RefField string    `json:"refField,omitempty"`
	IDPrefix string    `json:"idPrefix,omitempty"`
	Set      RecordSet `json:"set,omitempty"`
}

type RecordBulkOperation

type RecordBulkOperation struct {
	Record      *Record
	RecordID    uint64
	NamespaceID uint64
	ModuleID    uint64

	LinkBy    string
	Operation OperationType
	ID        string
}

type RecordBulkOperationResult

type RecordBulkOperationResult struct {
	Record           *Record
	Error            error
	ValueError       *RecordValueErrorSet
	DuplicationError *RecordValueErrorSet
}

type RecordBulkSet

type RecordBulkSet []*RecordBulk

func (RecordBulkSet) ToBulkOperations

func (set RecordBulkSet) ToBulkOperations(dftModule uint64, dftNamespace uint64) (oo []*RecordBulkOperation, err error)

ToBulkOperations converts BulkRecordSet to a list of BulkRecordOperations

type RecordFilter

type RecordFilter struct {
	ModuleID    uint64 `json:"moduleID,string"`
	NamespaceID uint64 `json:"namespaceID,string"`
	Query       string `json:"query"`

	Meta map[string]any `json:"meta,omitempty"`

	Deleted filter.State `json:"deleted"`

	// Check fn is called by store backend for each resource found function can
	// modify the resource and return false if store should not return it
	//
	// Store then loads additional resources to satisfy the paging parameters
	Check func(*Record) (bool, error) `json:"-"`

	// Standard helpers for paging and sorting
	filter.Sorting
	filter.Paging
}

func (RecordFilter) ToConstraintedFilter

func (f RecordFilter) ToConstraintedFilter(c map[string][]any) filter.Filter

type RecordSet

type RecordSet []*Record

RecordSet slice of Record

This type is auto-generated.

func (RecordSet) Filter

func (set RecordSet) Filter(f func(*Record) (bool, error)) (out RecordSet, err error)

Filter iterates through every slice item, calls f(Record) (bool, err) and return filtered slice

This function is auto-generated.

func (RecordSet) FindByID

func (set RecordSet) FindByID(ID uint64) *Record

FindByID finds items from slice by its ID property

This function is auto-generated.

func (RecordSet) GetValuesByName

func (set RecordSet) GetValuesByName(names ...string) (out RecordValueSet)

GetValuesByName filters values for records by names

func (RecordSet) IDs

func (set RecordSet) IDs() (IDs []uint64)

IDs returns a slice of uint64s from all items in the set

This function is auto-generated.

func (RecordSet) UserIDs

func (set RecordSet) UserIDs() (IDs []uint64)

UserIDs returns a slice of user IDs from all items in the set

func (RecordSet) Walk

func (set RecordSet) Walk(w func(*Record) error) (err error)

Walk iterates through every slice item and calls w(Record) err

This function is auto-generated.

type RecordValue

type RecordValue struct {
	RecordID  uint64     `json:"-"`
	Name      string     `json:"name"`
	Value     string     `json:"value,omitempty"`
	Ref       uint64     `json:"-"`
	Place     uint       `json:"-"`
	DeletedAt *time.Time `json:"deletedAt,omitempty"`

	Updated  bool   `json:"-"`
	OldValue string `json:"-"`
}

RecordValue is a stored row in the `record_value` table

func (RecordValue) Cast

func (v RecordValue) Cast(f *ModuleField) (interface{}, error)

func (RecordValue) Clone

func (v RecordValue) Clone() *RecordValue

func (RecordValue) IsDeleted

func (v RecordValue) IsDeleted() bool

func (RecordValue) IsUpdated

func (v RecordValue) IsUpdated() bool

type RecordValueError

type RecordValueError struct {
	Kind    string                 `json:"kind"`
	Message string                 `json:"message"`
	Meta    map[string]interface{} `json:"meta"`
}

type RecordValueErrorSet

type RecordValueErrorSet struct {
	Set []RecordValueError `json:"set"`
}

func IsRecordValueErrorSet

func IsRecordValueErrorSet(err error) *RecordValueErrorSet

IsRecordValueErrorSet tests if given error is RecordValueErrorSet (or it wraps it) and it has errors If not is not (or !IsValid), it return nil!

func (*RecordValueErrorSet) Error

func (v *RecordValueErrorSet) Error() string

func (*RecordValueErrorSet) HasKind

func (v *RecordValueErrorSet) HasKind(kind string) bool

func (*RecordValueErrorSet) HasStrictErrors

func (v *RecordValueErrorSet) HasStrictErrors() bool

func (*RecordValueErrorSet) IsValid

func (v *RecordValueErrorSet) IsValid() bool

func (*RecordValueErrorSet) Len

func (v *RecordValueErrorSet) Len() int

func (RecordValueErrorSet) MarshalJSON

func (v RecordValueErrorSet) MarshalJSON() ([]byte, error)

func (*RecordValueErrorSet) Merge

func (v *RecordValueErrorSet) Merge(errs ...*RecordValueErrorSet)

func (*RecordValueErrorSet) Push

func (v *RecordValueErrorSet) Push(err ...RecordValueError)

func (RecordValueErrorSet) Safe

func (RecordValueErrorSet) Safe() bool

safe to show details of this error

func (*RecordValueErrorSet) SetMetaID

func (v *RecordValueErrorSet) SetMetaID(id uint64)

type RecordValueFilter

type RecordValueFilter struct {
	RecordID []uint64
	Deleted  filter.State `json:"deleted"`
	Limit    uint
}

type RecordValueSet

type RecordValueSet []*RecordValue

RecordValueSet slice of RecordValue

This type is auto-generated.

func (RecordValueSet) Clone

func (set RecordValueSet) Clone() (vv RecordValueSet)

func (RecordValueSet) Dict

func (set RecordValueSet) Dict(fields ModuleFieldSet) map[string]interface{}

Returns structured representation of values casted to the appropriate types

func (RecordValueSet) Filter

func (set RecordValueSet) Filter(f func(*RecordValue) (bool, error)) (out RecordValueSet, err error)

Filter iterates through every slice item, calls f(RecordValue) (bool, err) and return filtered slice

This function is auto-generated.

func (RecordValueSet) FilterByName

func (set RecordValueSet) FilterByName(name string) (vv RecordValueSet)

func (RecordValueSet) FilterByRecordID

func (set RecordValueSet) FilterByRecordID(recordID uint64) (vv RecordValueSet)

func (RecordValueSet) Get

func (set RecordValueSet) Get(name string, place uint) *RecordValue

Get value set?

func (RecordValueSet) GetClean

func (set RecordValueSet) GetClean() (out RecordValueSet)

func (RecordValueSet) GetUpdated

func (set RecordValueSet) GetUpdated() (out RecordValueSet)

func (RecordValueSet) Has

func (set RecordValueSet) Has(name string, place uint) bool

Has value set?

func (RecordValueSet) Len

func (set RecordValueSet) Len() int

func (RecordValueSet) Less

func (set RecordValueSet) Less(i, j int) bool

func (RecordValueSet) Merge

func (set RecordValueSet) Merge(mfs ModuleFieldSet, new RecordValueSet, canAccessField func(f *ModuleField) bool) (out RecordValueSet)

Merge merges old value set with new one and expects unchanged values to be in the new set

func (RecordValueSet) Replace

func (set RecordValueSet) Replace(name string, values ...string) (vv RecordValueSet)

Replace existing values, remove extra

func (*RecordValueSet) Scan

func (set *RecordValueSet) Scan(src any) error

func (RecordValueSet) Set

Set updates existing value or creates a new one

func (RecordValueSet) SetRecordID

func (set RecordValueSet) SetRecordID(recordID uint64)

func (RecordValueSet) SetUpdatedFlag

func (set RecordValueSet) SetUpdatedFlag(updated bool)

func (RecordValueSet) String

func (set RecordValueSet) String() (o string)

Simple RVS as string output utility fn that can help with debugging

func (RecordValueSet) Swap

func (set RecordValueSet) Swap(i, j int)

func (RecordValueSet) Value

func (set RecordValueSet) Value() (driver.Value, error)

func (RecordValueSet) Walk

func (set RecordValueSet) Walk(w func(*RecordValue) error) (err error)

Walk iterates through every slice item and calls w(RecordValue) err

This function is auto-generated.

type SensitiveRecord

type SensitiveRecord struct {
	RecordID uint64
	Values   []map[string]any
}

type SensitiveRecordSet

type SensitiveRecordSet struct {
	// Contextual metadata
	ConnectionID uint64
	Module       *Module
	Namespace    *Namespace

	Records []SensitiveRecord
}

type SystemFieldEncoding

type SystemFieldEncoding struct {
	ID *EncodingStrategy `json:"id"`

	ModuleID    *EncodingStrategy `json:"moduleID"`
	NamespaceID *EncodingStrategy `json:"namespaceID"`

	Revision *EncodingStrategy `json:"revision"`
	Meta     *EncodingStrategy `json:"meta"`

	OwnedBy *EncodingStrategy `json:"ownedBy"`

	CreatedAt *EncodingStrategy `json:"createdAt"`
	CreatedBy *EncodingStrategy `json:"createdBy"`

	UpdatedAt *EncodingStrategy `json:"updatedAt"`
	UpdatedBy *EncodingStrategy `json:"updatedBy"`

	DeletedAt *EncodingStrategy `json:"deletedAt"`
	DeletedBy *EncodingStrategy `json:"deletedBy"`
}

SystemFieldEncoding holds configuration for encoding record system fields

If strategy is not set for a specific field (nil) then a default strategy is used, assuming system field/column presence

Jump to

Keyboard shortcuts

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