Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DefinitionsCache ¶
type DefinitionsCache interface {
Get(*locator.Locator) (*openapi.RefOrSpec[openapi.Schema], bool)
Put(*locator.Locator, *openapi.RefOrSpec[openapi.Schema]) *openapi.RefOrSpec[openapi.Schema]
Definitions() map[string]*openapi.RefOrSpec[openapi.Schema]
IsResolving(*locator.Locator) bool
MarkResolving(*locator.Locator)
}
func NewDefinitionsCache ¶
func NewDefinitionsCache() DefinitionsCache
type ParserCache ¶
func NewParserCache ¶
func NewParserCache() ParserCache
type TypeDef ¶
type TypeDef struct {
// TypeSpec is the type specification of the type definition.
TypeSpec *ast.TypeSpec
// File is the file where the type definition is located.
File *ast.File
// Locator is the locator of the type definition.
Locator *locator.Locator
// EnumValues is the list of enum values, if the type is an enum.
EnumValues []any
}
type TypeDefCache ¶
type TypeDefCache interface {
Load(ctx context.Context, pkgPath string) error
Get(pkgPath string, typeName string) (*TypeDef, bool)
}
func NewTypeDefCache ¶
func NewTypeDefCache(root string, parserCache ParserCache) TypeDefCache
Click to show internal directories.
Click to hide internal directories.