dsl

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: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Model

func Model(path, systemName string)

Model specifies the import path of the Go package that contains the model as well as the name of the system to be validated.

Model must appear in the API expression.

Example:

import . "goa.design/plugins/v3/model"

var _ = API("calc", func() {
   Model("goa.design/model/examples/basic/model", "calc")
})

func ModelComplete

func ModelComplete()

ModelComplete marks the model as complete, meaning that the model plugin should validate that all containers have a corresponding service in addition to validating that each service has a corresponding container.

ModelComplete must appear in the API expression.

Example:

import . "goa.design/plugins/v3/model"

var _ = API("calc", func() {
   Model("goa.design/model/examples/basic/model", "calc")
   ModelComplete()
})

func ModelContainer

func ModelContainer(name string)

ModelContainer sets the name of the container for the enclosing service.

ModelContainer must appear in a Service expression.

Example:

import . "goa.design/plugins/v3/model"

var _ = API("calc", func() {
	Service("adder", func() {
		ModelContainer("Adder")
	})
})

func ModelContainerFormat

func ModelContainerFormat(format string)

ModelContainerFormat specifies a fmt.Sprintf format string that is used to compute the name of the model container from the service name. The default value is "%s Service".

ModelContainerFormat must appear in the API expression.

Example:

import . "goa.design/plugins/v3/model"

var _ = API("calc", func() {
   Model("goa.design/model/examples/basic/model", "calc")
   ModelContainerFormat("%s Service")
})

func ModelExcludedTags

func ModelExcludedTags(tags ...string)

ModelExcludedTags specifies a list of tags. Containers that have any of these tags will be excluded from the check. By default, the tags "external", "thirdparty" and "database" are excluded.

ModelExcludedTags must appear in the API expression.

Example:

import . "goa.design/plugins/v3/model"

var _ = API("calc", func() {
   Model("goa.design/model/examples/basic/model", "calc")
   ModelExcludedTags("external", "thirdparty", "database")
})

func ModelNone

func ModelNone()

ModelNone disables the model validation for the enclosing service.

ModelNone must appear in a Service expression.

Example:

import . "goa.design/plugins/v3/model"

var _ = API("calc", func() {
	Service("adder", func() {
		ModelNone()
	})
})

Types

This section is empty.

Jump to

Keyboard shortcuts

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