Documentation
¶
Index ¶
- func AppendCommentToObjects(comment string) compiler.Pass
- func PrefixObjectsNames(prefix string) compiler.Pass
- type CUEOption
- type SchemaToTypesPipeline
- func (pipeline *SchemaToTypesPipeline) CUEValue(pkgName string, value cue.Value, opts ...CUEOption) *SchemaToTypesPipeline
- func (pipeline *SchemaToTypesPipeline) Debug(enabled bool) *SchemaToTypesPipeline
- func (pipeline *SchemaToTypesPipeline) Golang() *SchemaToTypesPipeline
- func (pipeline *SchemaToTypesPipeline) Run(ctx context.Context) ([]byte, error)
- func (pipeline *SchemaToTypesPipeline) SchemaTransformations(passes ...compiler.Pass) *SchemaToTypesPipeline
- func (pipeline *SchemaToTypesPipeline) Typescript() *SchemaToTypesPipeline
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AppendCommentToObjects ¶
AppendCommentToObjects adds the given comment to every object definition.
func PrefixObjectsNames ¶
PrefixObjectsNames adds the given prefix to every object's name.
Types ¶
type CUEOption ¶
func ForceEnvelope ¶
ForceEnvelope decorates the parsed cue Value with an envelope whose name is given. This is useful for dataqueries for example, where the schema doesn't define any suitable top-level object.
type SchemaToTypesPipeline ¶
type SchemaToTypesPipeline struct {
// contains filtered or unexported fields
}
SchemaToTypesPipeline represents a simplified codegen.Pipeline, meant to take a single input schema and generates types for it in a single output language.
func TypesFromSchema ¶
func TypesFromSchema() *SchemaToTypesPipeline
TypesFromSchema generates types from a single input schema and a single output language.
func (*SchemaToTypesPipeline) CUEValue ¶
func (pipeline *SchemaToTypesPipeline) CUEValue(pkgName string, value cue.Value, opts ...CUEOption) *SchemaToTypesPipeline
CUEValue sets the pipeline's input to the given cue value.
func (*SchemaToTypesPipeline) Debug ¶
func (pipeline *SchemaToTypesPipeline) Debug(enabled bool) *SchemaToTypesPipeline
Debug controls whether debug mode is enabled or not. When enabled, more information is included in the generated output, such as an audit trail of applied transformations.
func (*SchemaToTypesPipeline) Golang ¶
func (pipeline *SchemaToTypesPipeline) Golang() *SchemaToTypesPipeline
Golang sets the output to Golang types.
func (*SchemaToTypesPipeline) Run ¶
func (pipeline *SchemaToTypesPipeline) Run(ctx context.Context) ([]byte, error)
Run executes the codegen pipeline and returns its output.
func (*SchemaToTypesPipeline) SchemaTransformations ¶
func (pipeline *SchemaToTypesPipeline) SchemaTransformations(passes ...compiler.Pass) *SchemaToTypesPipeline
SchemaTransformations adds the given transformations to the set of transformations that will be applied to the input schema.
func (*SchemaToTypesPipeline) Typescript ¶
func (pipeline *SchemaToTypesPipeline) Typescript() *SchemaToTypesPipeline
Typescript sets the output to Typescript types.
Directories
¶
| Path | Synopsis |
|---|---|
|
cmd
|
|
|
cli
command
|
|
|
cog-config-schemas
command
|
|
|
compiler-passes-docs
command
|
|
|
examples
|
|
|
_as_library
command
|
|
|
_go
command
|
|
|
_go_alerting
command
|
|
|
internal
|
|