cache

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2026 License: MIT Imports: 15 Imported by: 0

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

type ParserCache interface {
	Parse(filename string) (*ast.File, error)
}

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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