Documentation
¶
Overview ¶
Package codegen writes the binding and the validation of each handler input as plain Go.
The generator reads the struct tags one time, at generation time. No generated file imports reflect, and no request path uses it. See the SDD, S5, and design rule 2.
A fault names a file, a line and a column in the code that the person wrote. It never points into a template or into a generated file. See DX-6.
Index ¶
Constants ¶
const GeneratedFile = "zz_generated.go"
GeneratedFile is the name that the generator writes in each package.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Fault ¶
type Fault struct {
// File is the file that holds the fault.
File string `json:"file"`
// Line is the line of the struct field.
Line int `json:"line"`
// Column is the column of the struct field.
Column int `json:"column"`
// Message states the fault.
Message string `json:"message"`
// Repair states what to do. It is one sentence.
Repair string `json:"repair"`
}
Fault is one generation fault. It names a file, a line and a column in code that the person wrote, and it states the repair in one sentence. It never points into a template, into a generated file or into Avero. See DX-6 and DX-7.
type Faults ¶
type Faults struct {
Faults []*Fault `json:"faults"`
}
Faults holds every fault of one run. The generator reports every fault, not only the first.
type StaleFault ¶
type StaleFault struct {
// Path is the generated file.
Path string `json:"path"`
// Reason states what is wrong.
Reason string `json:"reason"`
}
StaleFault reports a generated file that a run of the generator would change.
func (*StaleFault) Error ¶
func (f *StaleFault) Error() string
Error states the fault and the repair.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package client holds the HTTP client generator and the runtime that its output calls, S13.
|
Package client holds the HTTP client generator and the runtime that its output calls, S13. |
|
internal/example
Package example holds the client that the tests of the generator drive.
|
Package example holds the client that the tests of the generator drive. |
|
internal
|
|
|
example
Package example is the fixture of the generator.
|
Package example is the fixture of the generator. |