inspect

package
v0.141.0 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2021 License: AGPL-3.0 Imports: 9 Imported by: 3

Documentation

Index

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 interface{}, localization flows.Localization, include func(envs.Language, assets.Reference))

Dependencies extracts dependencies

func ExtractFromTemplate added in v0.57.0

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 added in v0.87.0

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 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 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 added in v0.76.1

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

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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