expr

package
v3.19.1 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultFormat string = "%s Service"

DefaultFormat is the default format string used to compute the name of the model container from the service name.

Variables

View Source
var DefaultExcluded []string = []string{"database", "external", "thirdparty"}

DefaultExcluded specifies a list of default exclusion tags. Containers that have any of these tags will be excluded from the check.

Functions

func InitRoot

func InitRoot()

InitRoot initializes the root expression.

Types

type RootExpr

type RootExpr struct {
	// ModelPkgPath is the path to the directory containing the model files.
	ModelPkgPath string
	// SystemName is the name of the system to be validated.
	SystemName string
	// ContainerNameFormat is the format string used to compute the name of
	// the model container from the service name.
	ContainerNameFormat string
	// ExcludedTags specifies a list of tags. Containers that have any of these
	// tags will be excluded from the check.
	ExcludedTags []string
	// Complete is true if all containers have a corresponding service.
	Complete bool
	// ServiceContainer maps service names to container names.
	ServiceContainer map[string]string
}

RootExpr keeps track of the Model package path defined in the design.

var Root *RootExpr

Root is the design root expression.

func (*RootExpr) DependsOn

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

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

func (*RootExpr) EvalName

func (r *RootExpr) EvalName() string

EvalName returns the name used in error messages.

func (*RootExpr) Packages

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

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

WalkSets is a no-op as the Model plugin does not define any embedded DSL.

Jump to

Keyboard shortcuts

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