Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Context ¶
type Context struct { // OperationMode determines whether the generator is working with // source files or a module OperationMode OperationMode // SourceModule represents the module that will be used to source interfaces // to be used to generate stubs SourceModule gocli.ModuleInformation // Renames contains an association of interface names to be replaced // when generating sources Renames map[string]string // OutputDirectory contains the absolute path to the target directory // to receive generated sources OutputDirectory string // TargetPackageName determines the package name to be used when generating // sources. TargetPackageName string // Workdir determines the directory from which the CLI is being executed // from Workdir string // SourceFile represents the source file to be used to extract interfaces // from when using OperationModeSource SourceFile string // WantsAllInterfaces indicates whether the user wishes to generate stubs // for all exported interfaces. This option is only valid with // OperationModeSource. WantsAllInterfaces bool // UsedRenames contains a list of Renames that were actually used during the // codegen operation UsedRenames map[string]bool // IsInterfaceCache implements a simple cache that associates whether a // given type (through Type.FullName) is an interface IsInterfaceCache *genericConcurrentMap[string, bool] // PackageByNameCache implements a simple cache that associates package // import paths and their packages.Package representation PackageByNameCache *genericConcurrentMap[string, *packages.Package] // GoTypeDefinitionCache implements a simple cache that associates paths // of specific types with their respective Go type information. GoTypeDefinitionCache *genericConcurrentMap[string, types.Object] }
func LoadContext ¶
type Interface ¶
type OperationMode ¶
type OperationMode int8
const ( OperationModeInvalid OperationMode = iota OperationModeSource OperationModeModule )
Click to show internal directories.
Click to hide internal directories.