plugins: Index | Files

package expr

import ""


Package Files

i18n.go root.go


var Root = &RootExpr{
    Description: map[eval.Expression]*I18nExpr{},
    Example:     map[eval.Expression]*I18nExpr{},
    Title:       map[eval.Expression]*I18nExpr{},

Root is the design root expression.

type I18nExpr Uses

type I18nExpr struct {
    // Origin is the origin string.
    Trans []Translateable
    // Parent expression, ServiceExpr or APIExpr.
    Parent eval.Expression

I18nExpr describes a CORS policy.

func (*I18nExpr) EvalName Uses

func (i18n *I18nExpr) EvalName() string

EvalName returns the generic expression name used in error messages.

func (*I18nExpr) Messages Uses

func (i18n *I18nExpr) Messages(locale string) []string

func (*I18nExpr) Validate Uses

func (i18n *I18nExpr) Validate() *eval.ValidationErrors

Validate ensures the origin expression is valid.

type RootExpr Uses

type RootExpr struct {
    // APIOrigins lists all the CORS definitions indexed by origin string
    // at the API level.
    Description map[eval.Expression]*I18nExpr
    Example     map[eval.Expression]*I18nExpr
    Title       map[eval.Expression]*I18nExpr

RootExpr keeps track of the CORS origins defined in the design.

func (*RootExpr) DependsOn Uses

func (r *RootExpr) DependsOn() []eval.Root

DependsOn tells the eval engine to run the goa DSL first.

func (*RootExpr) EvalName Uses

func (r *RootExpr) EvalName() string

EvalName returns the name used in error messages.

func (*RootExpr) Packages Uses

func (r *RootExpr) Packages() []string

Packages returns the import path to the Go packages that make up the DSL. This is used to skip frames that point to files in these packages when computing the location of errors.

func (*RootExpr) WalkSets Uses

func (r *RootExpr) WalkSets(walk eval.SetWalker)

WalkSets iterates over the API-level and service-level I18n definitions.

type Translateable Uses

type Translateable = func(locale string) string

Package expr imports 3 packages (graph). Updated 2019-07-09. Refresh now. Tools for package owners.