eph

package
v0.24.5 Latest Latest
Warning

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

Go to latest
Published: May 15, 2024 License: BSD-3-Clause Imports: 11 Imported by: 0

Documentation

Overview

pacakge eph provides helpers for testing

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Aliases

type Aliases struct {
	ShortName string
	Aliases   []string
}

func (*Aliases) Assert

func (op *Aliases) Assert(cat *weave.Catalog) (err error)

type Aspects

type Aspects struct {
	Aspects string
	Traits  []string
}

Aspects A set of related object states such that exactly one member of the set is true for a given object at a single time. Generates an implicit kind of 'aspect' where every field of the kind is a boolean property.

func (*Aspects) Assert

func (op *Aspects) Assert(cat *weave.Catalog) (err error)

type BeginDomain

type BeginDomain struct {
	Name     string
	Requires []string
}

func (*BeginDomain) Assert

func (op *BeginDomain) Assert(cat *weave.Catalog) (err error)

type Cardinality

type Cardinality interface {
	Cardinality()
}

type Directives

type Directives struct {
	Directive grammar.Directive
}

Directives

func (*Directives) Assert

func (op *Directives) Assert(cat *weave.Catalog) (err error)

type EndDomain

type EndDomain struct {
	Name string
}

EndDomain

func (*EndDomain) Assert

func (op *EndDomain) Assert(cat *weave.Catalog) (err error)

type Ephemera

type Ephemera interface {
	Assert(*weave.Catalog) error
}

implemented by individual commands

type Kinds

type Kinds struct {
	Kind     string
	Ancestor string
	Contain  []Params
}

Kinds A new type deriving from another existing type. The new kind has all of the properties of all of its ancestor kinds and it can be used wherever one of its ancestor kinds is needed. ( The reverse isn't true because the new kind can have its own unique properties not available to its ancestors. )

func (*Kinds) Assert

func (op *Kinds) Assert(cat *weave.Catalog) (err error)

type ManyMany

type ManyMany struct {
	Kinds      string `if:"label=_,type=text"`
	OtherKinds string `if:"label=to_kinds,type=text"`
}

ManyMany

func (*ManyMany) Cardinality

func (*ManyMany) Cardinality()

type ManyOne

type ManyOne struct {
	Kinds     string `if:"label=_,type=text"`
	OtherKind string `if:"label=to_kind,type=text"`
}

ManyOne

func (*ManyOne) Cardinality

func (*ManyOne) Cardinality()

type Nouns

type Nouns struct {
	Noun string
	Kind string
}

Nouns

func (*Nouns) Assert

func (op *Nouns) Assert(cat *weave.Catalog) error

type OneMany

type OneMany struct {
	Kind       string `if:"label=_,type=text"`
	OtherKinds string `if:"label=to_kinds,type=text"`
}

OneMany

func (*OneMany) Cardinality

func (*OneMany) Cardinality()

type OneOne

type OneOne struct {
	Kind      string `if:"label=_,type=text"`
	OtherKind string `if:"label=to_kind,type=text"`
}

OneOne

func (*OneOne) Cardinality

func (*OneOne) Cardinality()

type Params

type Params struct {
	Affinity  affine.Affinity `if:"label=have"`
	Name      string          `if:"label=called,type=text"`
	Class     string          `if:"label=of,optional,type=text"`
	Initially rt.Assignment   `if:"label=initially,optional"`
}

Params 'Affinity' designates the storage type of a given parameter while 'class' is used to indicate an interpretation of that parameter, for example a reference to a kind. Pattern locals can have an initial value, other uses of parameter cannot.

func AspectParam

func AspectParam(aspectName string) Params

ensure fields which reference aspects use the necessary formatting

func (Params) GetFieldInfo

func (p Params) GetFieldInfo() mdl.FieldInfo

type Patterns

type Patterns struct {
	PatternName string
	Params      []Params
	Locals      []Params
	Result      *Params
}

Patterns Patterns provide author reusable code. The parameters define values provided by the caller. Locals provide scratch values for use during pattern processing. The result allows the pattern to return a value to the caller of pattern. While multiple pattern commands can be used to define a pattern, the set of arguments and the return can only be specified once.

func (*Patterns) Assert

func (op *Patterns) Assert(cat *weave.Catalog) (err error)

type Plurals

type Plurals struct {
	Plural   string
	Singular string
}

Plurals Rules for transforming plural text to singular text and back again. Used by the assembler to help interpret author definitions, and at runtime to help the parser interpret user input.

func (*Plurals) Assert

func (op *Plurals) Assert(cat *weave.Catalog) error

type PrintOnce

type PrintOnce string

func (*PrintOnce) PrintOnce

func (p *PrintOnce) PrintOnce()

type Relations

type Relations struct {
	Rel         string
	Cardinality Cardinality
}

Relations

func (*Relations) Assert

func (op *Relations) Assert(cat *weave.Catalog) error

type Relatives

type Relatives struct {
	Rel       string
	Noun      string
	OtherNoun string
}

Relatives

func (*Relatives) Assert

func (op *Relatives) Assert(cat *weave.Catalog) error

type Rules

type Rules struct {
	PatternName string
	Exe         []rt.Execute
}

Rules

func (*Rules) Assert

func (op *Rules) Assert(cat *weave.Catalog) error

type Values

type Values struct {
	Noun  string
	Field string
	Path  []string
	Value literal.LiteralValue
}

Values Give a noun a specific value at startup. Initialization is somewhat simplistic: 1. Initial values are not scoped to domains, triggers must be used to change values when domains begin and end. 2. The values inside of records can be set using a 'path' to find them, however individual values within lists cannot be set. Note: when using a path, the path addresses the noun first, the named field - referring to the inner most record - last.

func (*Values) Assert

func (op *Values) Assert(cat *weave.Catalog) error

Jump to

Keyboard shortcuts

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