die

package
v0.10.1 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Die

type Die struct {
	Object       bool     `marker:"object,optional"`
	IgnoreFields []string `marker:"ignore,optional"`

	Target        string `marker:",optional"`
	Name          string `marker:",optional"`
	Type          string `marker:",optional"`
	TargetPackage string `marker:",optional"`
	TargetType    string `marker:",optional"`
	Blank         string `marker:",optional"`
	Doc           string `marker:",optional"`
	Spec          string `marker:",optional"`
	SpecType      string `marker:",optional"`
	SpecBlank     string `marker:",optional"`
	Status        string `marker:",optional"`
	StatusType    string `marker:",optional"`
	StatusBlank   string `marker:",optional"`
}

func (*Die) Default

func (d *Die) Default()

type Field

type Field struct {
	Receiver string `marker:"receiver"`
	Name     string `marker:"name"`
	Type     string `marker:"type"`

	TypePrefix  string `marker:",optional"`
	TypePackage string `marker:",optional"`
	Doc         string `marker:",optional"`
}

func (*Field) Default

func (d *Field) Default()

type Generator

type Generator struct {
	// HeaderFile specifies the header text (e.g. license) to prepend to generated files.
	HeaderFile string `marker:",optional"`
	// Year specifies the year to substitute for " YEAR" in the header file.
	Year string `marker:",optional"`
}

func (Generator) CheckFilter

func (Generator) CheckFilter() loader.NodeFilter

func (Generator) Generate

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

func (Generator) RegisterMarkers

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

type ObjectGenCtx

type ObjectGenCtx struct {
	Collector  *markers.Collector
	Checker    *loader.TypeChecker
	HeaderText string
}

ObjectGenCtx contains the common info for generating deepcopy implementations. It mostly exists so that generating for a package can be easily tested without requiring a full set of output rules, etc.

Jump to

Keyboard shortcuts

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