Versions in this module Expand all Collapse all v3 v3.6.3 Oct 20, 2023 Changes in this version + const Gendir + var DesignVersion = goa.Major + func AddImport(section *SectionTemplate, imprts ...*ImportSpec) + func AddServiceMetaTypeImports(header *SectionTemplate, svc *expr.ServiceExpr) + func AttributeTags(parent, att *expr.AttributeExpr) string + func CamelCase(name string, firstUpper bool, acronym bool) string + func CommandLine() string + func Comment(elems ...string) string + func CreateTempFile(t *testing.T, content string) string + func Diff(t *testing.T, s1, s2 string) string + func FormatTestCode(t *testing.T, code string) string + func GoNativeTypeName(t expr.DataType) string + func Goify(str string, firstUpper bool) string + func GoifyAtt(att *expr.AttributeExpr, name string, upper bool) string + func Indent(s, prefix string) string + func IsCompatible(a, b expr.DataType, actx, bctx string) error + func KebabCase(name string) string + func MapDepth(m *expr.Map) int + func RecursiveValidationCode(att *expr.AttributeExpr, attCtx *AttributeContext, req, alias bool, ...) string + func RegisterPlugin(name string, cmd string, pre PrepareFunc, p GenerateFunc) + func RegisterPluginFirst(name string, cmd string, pre PrepareFunc, p GenerateFunc) + func RegisterPluginLast(name string, cmd string, pre PrepareFunc, p GenerateFunc) + func RunDSL(t *testing.T, dsl func()) *expr.RootExpr + func RunDSLWithFunc(t *testing.T, dsl func(), fn func()) *expr.RootExpr + func RunPluginsPrepare(cmd, genpkg string, roots []eval.Root) error + func SectionCode(t *testing.T, section *SectionTemplate) string + func SectionCodeFromImportsAndMethods(t *testing.T, importSection *SectionTemplate, methodSection *SectionTemplate) string + func SectionsCode(t *testing.T, sections []*SectionTemplate) string + func SnakeCase(name string) string + func TemplateFuncs() map[string]interface + func ValidationCode(att *expr.AttributeExpr, attCtx *AttributeContext, req, alias bool, ...) string + func Walk(a *expr.AttributeExpr, walker func(*expr.AttributeExpr) error) error + func WalkMappedAttr(ma *expr.MappedAttributeExpr, it MappedAttributeWalker) error + func WalkType(u expr.UserType, walker func(*expr.AttributeExpr) error) error + func WrapText(text string, maxChars int) string + type AttributeContext struct + IgnoreRequired bool + Pkg string + Pointer bool + Scope Attributor + UseDefault bool + func NewAttributeContext(pointer, reqIgnore, useDefault bool, pkg string, scope *NameScope) *AttributeContext + func (a *AttributeContext) Dup() *AttributeContext + func (a *AttributeContext) IsPrimitivePointer(name string, att *expr.AttributeExpr) bool + func (a *AttributeContext) IsRequired(name string, att *expr.AttributeExpr) bool + type AttributeScope struct + func NewAttributeScope(scope *NameScope) *AttributeScope + func (a *AttributeScope) Field(att *expr.AttributeExpr, name string, firstUpper bool) string + func (a *AttributeScope) Name(att *expr.AttributeExpr, pkg string, ptr, useDefault bool) string + func (a *AttributeScope) Ref(att *expr.AttributeExpr, pkg string) string + func (a *AttributeScope) Scope() *NameScope + type Attributor interface + Field func(att *expr.AttributeExpr, name string, firstUpper bool) string + Name func(att *expr.AttributeExpr, pkg string, ptr, useDefault bool) string + Ref func(att *expr.AttributeExpr, pkg string) string + type File struct + FinalizeFunc func(string) error + Path string + SectionTemplates []*SectionTemplate + SkipExist bool + func RunPlugins(cmd, genpkg string, roots []eval.Root, genfiles []*File) ([]*File, error) + func (f *File) Render(dir string) (string, error) + func (f *File) Section(name string) []*SectionTemplate + type GenerateFunc func(genpkg string, roots []eval.Root, files []*File) ([]*File, error) + type Hasher interface + Hash func() string + type ImportSpec struct + Name string + Path string + func GetMetaType(att *expr.AttributeExpr) (typeName string, importS *ImportSpec) + func GetMetaTypeImports(att *expr.AttributeExpr) []*ImportSpec + func GoaImport(rel string) *ImportSpec + func GoaNamedImport(rel, name string) *ImportSpec + func NewImport(name, path string) *ImportSpec + func SimpleImport(path string) *ImportSpec + func (s *ImportSpec) Code() string + type InitArgData struct + FieldName string + FieldPointer bool + FieldType expr.DataType + Name string + Pointer bool + Type expr.DataType + type Location struct + FilePath string + RelImportPath string + func UserTypeLocation(ut expr.UserType) *Location + func (loc *Location) PackageName() string + type MappedAttributeWalker func(name, elem string, required bool, a *expr.AttributeExpr) error + type NameScope struct + func NewNameScope() *NameScope + func (s *NameScope) GoFullTypeName(att *expr.AttributeExpr, pkg string) string + func (s *NameScope) GoFullTypeRef(att *expr.AttributeExpr, pkg string) string + func (s *NameScope) GoTypeDef(att *expr.AttributeExpr, ptr, useDefault bool) string + func (s *NameScope) GoTypeName(att *expr.AttributeExpr) string + func (s *NameScope) GoTypeNameWithDefaults(att *expr.AttributeExpr) string + func (s *NameScope) GoTypeRef(att *expr.AttributeExpr) string + func (s *NameScope) GoTypeRefWithDefaults(att *expr.AttributeExpr) string + func (s *NameScope) GoVar(varName string, dt expr.DataType) string + func (s *NameScope) HashedUnique(key Hasher, name string, suffix ...string) string + func (s *NameScope) Name(name string) string + func (s *NameScope) Unique(name string, suffix ...string) string + type PrepareFunc func(genpkg string, roots []eval.Root) error + type Scoper interface + Scope func() *NameScope + type SectionTemplate struct + Data interface{} + FuncMap map[string]interface{} + Name string + Source string + func Header(title, pack string, imports []*ImportSpec) *SectionTemplate + func (s *SectionTemplate) Write(w io.Writer) error + type TransformAttrs struct + Prefix string + SourceCtx *AttributeContext + TargetCtx *AttributeContext + type TransformFunctionData struct + Code string + Name string + ParamTypeRef string + ResultTypeRef string + func AppendHelpers(oldH, newH []*TransformFunctionData) []*TransformFunctionData + func GoTransform(source, target *expr.AttributeExpr, sourceVar, targetVar string, ...) (string, []*TransformFunctionData, error) + func InitStructFields(args []*InitArgData, targetVar, sourcePkg, targetPkg string) (string, []*TransformFunctionData, error) Other modules containing this package github.com/mtal3t/goa