Documentation
¶
Index ¶
- Constants
- func NewImportMap(packagePath string) *common.DirectImportMap
- type APIRef
- type Builder
- type BuilderTemplate
- type ClassTemplate
- type Config
- type Constant
- type ConstantTemplate
- type ConstructorAssignmentTemplate
- type ConstructorTemplate
- type Converter
- type DataquerySchema
- type DataqueryUnmarshalling
- type Default
- type Deserializers
- type EnumTemplate
- type EnumValue
- type Factory
- type JSONMarshaller
- type Language
- type PanelSchema
- type RawTypes
- type Runtime
- type Serializers
- type Unmarshalling
Constants ¶
View Source
const LanguageRef = "java"
Variables ¶
This section is empty.
Functions ¶
func NewImportMap ¶
func NewImportMap(packagePath string) *common.DirectImportMap
Types ¶
type Builder ¶
type Builder struct {
// contains filtered or unexported fields
}
type BuilderTemplate ¶ added in v0.0.10
type BuilderTemplate struct {
Package string
RawPackage string
BuilderSignatureType string
BuilderName string
ObjectName string
Imports fmt.Stringer
ImportAlias string // alias to the pkg in which the object being built lives.
Comments []string
Constructor ast.Constructor
Properties []ast.StructField
Options []ast.Option
IsGenericPanel bool
}
type ClassTemplate ¶
type ClassTemplate struct {
Package string
RawPackage string
Imports fmt.Stringer
Name string
Extends []string
Comments []string
Fields []ast.StructField
Builders []BuilderTemplate
HasBuilder bool
Variant string
Identifier string
Annotation string
ToJSONFunction string
ShouldAddSerializer bool
ShouldAddDeserializer bool
ShouldAddFactoryMethods bool
Constructors []ConstructorTemplate
ExtraFunctionsBlock string
}
type Config ¶
type Config struct {
ProjectPath string `yaml:"-"`
PackagePath string `yaml:"package_path"`
// OverridesTemplatesDirectories holds a list of directories containing templates
// defining blocks used to override parts of builders/types/....
OverridesTemplatesDirectories []string `yaml:"overrides_templates"`
// ExtraFilesTemplatesDirectories holds a list of directories containing
// templates describing files to be added to the generated output.
ExtraFilesTemplatesDirectories []string `yaml:"extra_files_templates"`
// ExtraFilesTemplatesData holds additional data to be injected into the
// templates described in ExtraFilesTemplatesDirectories.
ExtraFilesTemplatesData map[string]string `yaml:"-"`
// SkipRuntime disables runtime-related code generation when enabled.
// Note: builders can NOT be generated with this flag turned on, as they
// rely on the runtime to function.
SkipRuntime bool `yaml:"skip_runtime"`
// GenerateJSONMarshaller controls the generation of `MarshalJSON()` and
// `UnmarshalJSON()` methods on types.
GenerateJSONMarshaller bool `yaml:"generate_json_marshaller"`
GenerateBuilders bool `yaml:"-"`
GenerateConverters bool `yaml:"-"`
// BuilderFactoriesClassMap allows to choose the name of the class that
// will be generated to hold "builder factories".
// By default, this class name is equal to the package name in which
// factories are defined.
// BuilderFactoriesClassMap associates these package names with a class
// name.
BuilderFactoriesClassMap map[string]string `yaml:"builder_factories_class_map"`
}
func (*Config) InterpolateParameters ¶
type ConstantTemplate ¶
type ConstructorAssignmentTemplate ¶ added in v0.0.27
type ConstructorTemplate ¶ added in v0.0.27
type ConstructorTemplate struct {
Args []ast.Argument
Assignments []ConstructorAssignmentTemplate
}
type Converter ¶ added in v0.0.7
type Converter struct {
// contains filtered or unexported fields
}
type DataquerySchema ¶
type DataqueryUnmarshalling ¶
type Deserializers ¶
type Deserializers struct {
// contains filtered or unexported fields
}
func (*Deserializers) JennyName ¶
func (jenny *Deserializers) JennyName() string
type EnumTemplate ¶
type Factory ¶ added in v0.0.25
type Factory struct {
// contains filtered or unexported fields
}
type JSONMarshaller ¶
type JSONMarshaller struct {
// contains filtered or unexported fields
}
type Language ¶
type Language struct {
// contains filtered or unexported fields
}
func (*Language) CompilerPasses ¶
func (*Language) NullableKinds ¶
func (language *Language) NullableKinds() languages.NullableConfig
type PanelSchema ¶
type RawTypes ¶
type RawTypes struct {
// contains filtered or unexported fields
}
type Serializers ¶
type Serializers struct {
// contains filtered or unexported fields
}
func (*Serializers) JennyName ¶
func (jenny *Serializers) JennyName() string
type Unmarshalling ¶
type Unmarshalling struct {
Package string
Name string
ShouldUnmarshallingPanels bool
Imports fmt.Stringer
DataqueryUnmarshalling []DataqueryUnmarshalling
Fields []ast.StructField
Hint any
}
Click to show internal directories.
Click to hide internal directories.