parser

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2026 License: Apache-2.0, MIT Imports: 7 Imported by: 0

Documentation

Overview

Package parser extracts schema definitions from Go source code using AST analysis.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Parser

type Parser struct {
	// TagName is the struct tag to look for (default: "gt")
	TagName string

	// FallbackTags are alternative tags to check (e.g., "validate")
	FallbackTags []string

	// TypeInfo provides go/types information for proper type resolution (optional)
	TypeInfo *load.TypeInfo
}

Parser extracts schemas from Go source files.

func NewParser

func NewParser() *Parser

NewParser creates a new parser with default settings.

func (*Parser) ParsePackages

func (p *Parser) ParsePackages(pkgs []*load.Package) ([]*schema.Schema, error)

ParsePackages parses schemas from loaded packages with full type information.

Jump to

Keyboard shortcuts

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