MCPcopy Create free account
hub / github.com/goadesign/goa / AttributeExpr

Struct AttributeExpr

expr/attribute.go:14–38  ·  view source on GitHub ↗

AttributeExpr defines an object field with optional description, default value and validations.

Source from the content-addressed store, hash-verified

12 // AttributeExpr defines an object field with optional description,
13 // default value and validations.
14 AttributeExpr struct {
15 // DSLFunc contains the DSL used to initialize the expression.
16 eval.DSLFunc
17 // Attribute type
18 Type DataType
19 // Base types if any
20 Bases []DataType
21 // Attribute reference types if any
22 References []DataType
23 // Optional description
24 Description string
25 // Docs points to external documentation
26 Docs *DocsExpr
27 // Optional validations
28 Validation *ValidationExpr
29 // Meta is a list of key/value pairs
30 Meta MetaExpr
31 // Optional member default value
32 DefaultValue any
33 // UserExample set in DSL or computed in Finalize
34 UserExamples []*ExampleExpr
35 // finalized is true if the attribute has been finalized - only
36 // applies if attribute type is an object
37 finalized bool
38 }
39
40 // ExampleExpr represents an example.
41 ExampleExpr struct {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected