gentypes

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2022 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Argument

type Argument struct {
	// Name of the argument.
	// In case of interfaces this might be empty.
	Name string

	// Type is a reference to the type of argument.
	// If the type is a builtin type, the underlying Package is empty.
	Type TypeRef
}

Argument is an argument or return argument.

type File

type File struct {
	// Package where the file belongs.
	Package PackageRef

	// HeaderText is added as a comment to the top of the generated file, above any package comments.
	//
	// It is useful for adding license information to generated files.
	HeaderText string
}

File is an input to source code generation.

type PackageRef

type PackageRef struct {
	// Name of the package.
	Name string

	// Path to the package.
	Path string
}

PackageRef is a reference to a package. It can be used generate code referring to a package.

type TypeRef

type TypeRef struct {
	// Name of the type.
	Name string

	// Package is a reference to the package where the type can be found.
	Package PackageRef
}

TypeRef is a reference to a type. It can be used generate code referring to a type, possibly in another package.

Jump to

Keyboard shortcuts

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