getters

package
v0.0.0-...-79dde53 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2026 License: Apache-2.0 Imports: 9 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// GetterTypeMarker is associated with a type that's used as the pointer receiver of the getter method
	GetterTypeMarker = markers.Must(markers.MakeDefinition("devfile:getter:generate", markers.DescribesType, struct{}{}))
	// DefaultFieldMarker is associated with a boolean pointer field to indicate the default boolean value
	DefaultFieldMarker = markers.Must(markers.MakeDefinition("devfile:default:value", markers.DescribesField, ""))
)

Functions

This section is empty.

Types

type Generator

type Generator struct{}

Generator generates getter methods that are used to return values for the boolean pointer fields.

The pointer receiver is determined from the `devfile:getter:generate` annotated type. The method will return the value of the field if it's been set, otherwise it will return the default value specified by the devfile:default:value annotation.

func (Generator) CheckFilter

func (Generator) CheckFilter() loader.NodeFilter

func (Generator) Generate

func (g Generator) Generate(ctx *genall.GenerationContext) error

Generate generates the artifacts

func (Generator) Help

func (Generator) RegisterMarkers

func (Generator) RegisterMarkers(into *markers.Registry) error

RegisterMarkers registers the markers of the Generator

Jump to

Keyboard shortcuts

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