inspect

package
v0.115.3 Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2022 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckReference

func CheckReference(sa flows.SessionAssets, ref assets.Reference) bool

CheckReference determines whether this reference is accessible

func Dependencies

func Dependencies(s interface{}, localization flows.Localization, include func(envs.Language, assets.Reference))

Dependencies extracts dependencies

func ExtractFromTemplate

func ExtractFromTemplate(template string) ([]assets.Reference, []string)

ExtractFromTemplate extracts asset references and parent result references from the given template. Note that duplicates are not removed.

func LocalizableText

func LocalizableText(s interface{}, include func(uuids.UUID, string, []string, func([]string)))

LocalizableText extracts localizable text by reading engine tags on a struct

func NewDependencies

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 Results

func Results(s interface{}, include func(*flows.ResultInfo))

Results extracts result infos

func TemplatePaths

func TemplatePaths(t reflect.Type, base string, include func(string))

func Templates

func Templates(s interface{}, localization flows.Localization, include func(envs.Language, string))

Templates extracts template values by reading engine tags on a struct

func Translations

func Translations(localization flows.Localization, itemUUID uuids.UUID, property string, include func(envs.Language, string))

Types

type Dependency

type Dependency struct {
	Reference_ assets.Reference `json:"-"`
	Type_      string           `json:"type"`
	Missing_   bool             `json:"missing,omitempty"`
}

func (Dependency) MarshalJSON

func (d Dependency) MarshalJSON() ([]byte, error)

func (*Dependency) Missing

func (d *Dependency) Missing() bool

func (*Dependency) Reference

func (d *Dependency) Reference() assets.Reference

func (*Dependency) Type

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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