Documentation ¶
Index ¶
- type ContextInterface
- type FSInterface
- type FileInterface
- type ImportInterface
- type ImportSetInterface
- type NodeInterface
- type NodeOutputInterface
- type NodeOutputWithTypedDataInterface
- type NodeWithData
- type NodeWithImports
- type NodeWithName
- type NodeWithStringOutput
- type NodeWithTemplate
- type NodeWithUntypedData
- type SignedStringInterface
- type TemplateInterface
- type TemplateSetInterface
- type TypeInterface
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ContextInterface ¶
type ContextInterface interface { // the filesystem output will be written to FS() FSInterface // the filesystem to be used when loading templates to generate the output TemplateFS() embed.FS // the command used to generate the output CommandString(string) ContextInterface // the name of the generation process creating the output AttributionString(string) ContextInterface // retrieve CommandString value GetCommandString() string // retrieve AttributionString value GetAttributionString() string // Given an import, compute what namespace it should use within the current context GetImportNamespace(ImportInterface) (string, error) // Creates a new context with the file argument's package name and import namespaces applied WithinFile(string, ImportSetInterface) ContextInterface }
interface for the context object of a generation run
type FSInterface ¶
type FileInterface ¶
type FileInterface interface {
Save(ContextInterface) error
}
type ImportInterface ¶
type ImportSetInterface ¶
type ImportSetInterface interface { ImportMap() map[string]ImportInterface GetNamespaceForImport(ImportInterface) string }
type NodeInterface ¶
type NodeInterface interface {
Generate(ContextInterface) (NodeOutputInterface, error)
}
type NodeOutputInterface ¶
type NodeOutputInterface interface { NodeWithName NodeWithImports NodeWithTemplate NodeWithStringOutput NodeWithUntypedData }
type NodeOutputWithTypedDataInterface ¶
type NodeOutputWithTypedDataInterface[D any] interface { NodeOutputInterface NodeWithData[D] }
type NodeWithData ¶
type NodeWithData[D any] interface { // the data to be used Data() D }
type NodeWithImports ¶
type NodeWithImports interface { // set of all imports necessary UsedImports() (ImportSetInterface, error) }
type NodeWithName ¶
type NodeWithName interface { // the canonical name of the output data Name() string }
type NodeWithStringOutput ¶
type NodeWithStringOutput interface {
ToString(ContextInterface) (string, error)
}
type NodeWithTemplate ¶
type NodeWithTemplate interface { // primary template to use Template() TemplateInterface // set of all templates used Templates() TemplateSetInterface }
type NodeWithUntypedData ¶
type NodeWithUntypedData interface {
UntypedData() any
}
type SignedStringInterface ¶
type TemplateInterface ¶
type TemplateSetInterface ¶
type TemplateSetInterface interface {
Names() []string
}
type TypeInterface ¶
type TypeInterface interface { Name() string Import() ImportInterface }
Click to show internal directories.
Click to hide internal directories.