_go

package
v0.0.0-...-5767c27 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 5, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func JenniesForGo

func JenniesForGo(targetGrafanaVersion string) jen.TargetJennies

Types

type GoTypesJenny

type GoTypesJenny struct{}

GoTypesJenny creates a [OneToOne] that produces Go types for the provided [thema.Schema].

Copied/hacked out of grafana/pkg/codegen for now to deal with ExpandReferences situation

func (GoTypesJenny) Generate

func (j GoTypesJenny) Generate(sfg codegen.SchemaForGen) (*codejen.File, error)

func (GoTypesJenny) JennyName

func (j GoTypesJenny) JennyName() string

type TypedSchemaJenny

type TypedSchemaJenny struct{}

TypedSchemaJenny generates a func that returns a [thema.TypedLineage] for a given schema. Implicitly depends on the output of codegen.GoTypesJenny.

TODO this could probably be upstreamed to thema eventually

func (TypedSchemaJenny) Generate

func (j TypedSchemaJenny) Generate(sfg codegen.SchemaForGen) (*codejen.File, error)

func (TypedSchemaJenny) JennyName

func (j TypedSchemaJenny) JennyName() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL