Documentation ¶
Index ¶
- func CheckReference(sa flows.SessionAssets, ref assets.Reference) bool
- func Dependencies(s any, localization flows.Localization, ...)
- func ExtractFromTemplate(template string) ([]assets.Reference, []string)
- func LocalizableText(s any, include func(uuids.UUID, string, []string, func([]string)))
- func NewDependencies(refs []flows.ExtractedReference, sa flows.SessionAssets) []flows.Dependency
- func Results(s any, include func(*flows.ResultInfo))
- func TemplatePaths(t reflect.Type, base string, include func(string))
- func Templates(s any, localization flows.Localization, include func(envs.Language, string))
- func Translations(localization flows.Localization, itemUUID uuids.UUID, property string, ...)
- type Dependency
- type DependencyContainer
- type EngineField
- type ResultContainer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckReference ¶ added in v0.74.0
func CheckReference(sa flows.SessionAssets, ref assets.Reference) bool
CheckReference determines whether this reference is accessible
func Dependencies ¶
func Dependencies(s any, localization flows.Localization, include func(envs.Language, assets.Reference))
Dependencies extracts dependencies
func ExtractFromTemplate ¶ added in v0.57.0
ExtractFromTemplate extracts asset references and parent result references from the given template. Note that duplicates are not removed.
func LocalizableText ¶ added in v0.87.0
LocalizableText extracts localizable text by reading engine tags on a struct
func NewDependencies ¶ added in v0.74.0
func NewDependencies(refs []flows.ExtractedReference, sa flows.SessionAssets) []flows.Dependency
NewDependencies inspects a list of references. If a session assets is provided, each dependency is checked to see if it is available or missing.
func Translations ¶ added in v0.76.1
Types ¶
type Dependency ¶ added in v0.74.0
type Dependency struct { Reference_ assets.Reference `json:"-"` Type_ string `json:"type"` Missing_ bool `json:"missing,omitempty"` }
func (Dependency) MarshalJSON ¶ added in v0.74.0
func (d Dependency) MarshalJSON() ([]byte, error)
func (*Dependency) Missing ¶ added in v0.74.0
func (d *Dependency) Missing() bool
func (*Dependency) Reference ¶ added in v0.74.0
func (d *Dependency) Reference() assets.Reference
func (*Dependency) Type ¶ added in v0.74.0
func (d *Dependency) Type() string
type DependencyContainer ¶
type DependencyContainer interface {
Dependencies(flows.Localization, func(envs.Language, assets.Reference))
}
DependencyContainer allows flow objects to declare other dependencies
type EngineField ¶
type EngineField struct { Type reflect.Type JSONName string Localized bool Evaluated bool Getter func(reflect.Value) reflect.Value }
EngineField is a struct field which is part of the flow spec (i.e. included in JSON) and optionally has a engine tag
type ResultContainer ¶
type ResultContainer interface {
Results(func(*flows.ResultInfo))
}
ResultContainer allows flow objects to declare that they can generate a result