package
1.4.3
Repository: https://github.com/khlystov/goa.git
Documentation: pkg.go.dev

# Functions

Add adds two integers and returns the sum of the two.
AttributeImports constructs a new ImportsSpec slice from an existing slice and adds in imports specified in struct:field:type Metadata tags.
CanonicalParams returns the list of parameter names needed to build the canonical href to the resource.
CanonicalTemplate returns the resource URI template as a format string suitable for use in the fmt.Printf function family.
CheckVersion returns an error if the ver is empty, contains an incorrect value or a version number that is not compatible with the version of this repo.
CommandLine return the command used to run this process.
Comment produces line comments by concatenating the given strings and producing 80 characters long lines starting with "//".
Goify makes a valid Go identifier out of any string.
GoifyAtt honors any struct:field:name metadata set on the attribute and calls Goify with the tag value if present or the given name otherwise.
GoNativeType returns the Go built-in type from which instances of t can be initialized.
GoTypeDef returns the Go code that defines a Go type which matches the data structure definition (the part that comes after `type foo`).
GoTypeDesc returns the description of a type.
GoTypeName returns the Go type name for a data type.
GoTypeRef returns the Go code that refers to the Go type which matches the given data type (the part that comes after `var foo`) required only applies when referring to a user type that is an object defined inline.
GoTypeTransform produces Go code that initializes the data structure defined by target from an instance of the data structure described by source.
GoTypeTransformName generates a valid Go identifer that is adequate for naming the type transform function that creates an instance of the data structure described by target from an instance of the data strucuture described by source.
Indent inserts prefix at the beginning of each non-empty line of s.
IndentBytes inserts prefix at the beginning of each non-empty line of b.
KebabCase produces the kebab-case version of the given CamelCase string.
NewFinalizer instantiates a finalize code generator.
NewImport creates an import spec.
NewValidator instantiates a validate code generator.
NewWorkspace returns a newly created temporary Go workspace.
PackageFor returns the package for the given source file.
PackageName returns the name of a package at the given path.
PackagePath returns the Go package path for the directory that lives under the given absolute file path.
PackageSourcePath returns the absolute path to the given package source.
ParseDSL will run the DSL engine and analyze any imported `design` package, creating your `design.APIDefinition` along the way.
PrintVal prints the given value corresponding to the given data type.
Publicizer publicizes a single attribute based on the type.
RecursivePublicizer produces code that copies fields from the private struct to the public struct.
Run runs all generators passed as parameter.
RunTemplate executs the given template with the given input and returns the rendered string.
SimpleImport creates an import with no explicit path component.
SnakeCase produces the snake_case version of the given CamelCase string.
SourceFileFor returns a SourceFile for the file at the given path.
Tabs returns a string made of depth tab characters.
Tempvar generates a unique variable name.
ValidationChecker produces Go code that runs the validation defined in the given attribute definition against the content of the variable named target recursively.
WorkspaceFor returns the Go workspace for the given Go source file.
WriteTabs is a helper function that writes count tabulation characters to buf.

# Constants

TransformMapKey is the name of the metadata used to specify the key for mapping fields when generating the code that transforms one data structure into another.

# Variables

DefaultFuncMap is the FuncMap used to initialize all source file templates.
Reserved golang keywords and package names.
TempCount holds the value appended to variable names to make them unique.

# Structs

Finalizer is the code generator for the 'Finalize' type methods.
ImportSpec defines a generated import statement.
No description provided by the author
No description provided by the author
Validator is the code generator for the 'Validate' type methods.
No description provided by the author