Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateRefreshableFile ¶
func GenerateRefreshableFile(targetPackagePath, targetPackageName string, refreshableTypes RefreshableTypes) *jen.File
Types ¶
type RefreshableType ¶
type RefreshableType struct {
Type types.Type
Imports map[types.Type]*decl.Import
OverrideName string
}
A RefreshableType contains all the necessary information to generate an interface and implementation for the contained internal type. It is expected that a constructed refreshable type has already handled any potential naming collisions, so users of this type are safe to use the expressions and declarations returned from it's functions if all the RefreshableTypes used they same refreshableTypeGenerator.
type RefreshableTypes ¶
type RefreshableTypes []RefreshableType
RefreshableTypes is a container for RefreshableType which provides some convenience functions
func NewRefreshableTypes ¶
func (RefreshableTypes) Imports ¶
func (t RefreshableTypes) Imports() decl.Imports
Imports returns an unordered list of unique imports for the analyzed fields
Click to show internal directories.
Click to hide internal directories.