types

package
v0.1.9 Latest Latest
Warning

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

Go to latest
Published: May 31, 2025 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIAnalysis

type APIAnalysis struct {
	Routes           []APIRoute
	UsedTypes        map[string]interface{} // Simplified for OpenAPI-based analysis
	TypeDefs         []TypeDefinition
	HandlerFuncs     map[string]interface{} // Simplified for OpenAPI-based analysis
	ImportNamespaces map[string]bool
	EnumTypes        map[string]TypeDefinition
}

APIAnalysis contains the complete analysis results

type APIMethod

type APIMethod struct {
	Route       APIRoute
	MethodName  string
	HasIDParam  bool
	HasBodyData bool
}

APIMethod represents a generated API method

type APIRoute

type APIRoute struct {
	Method       string `json:"method"`
	Path         string `json:"path"`
	Handler      string `json:"handler"`
	RequestType  string `json:"requestType"`
	ResponseType string `json:"responseType"`
	Description  string `json:"description"`
}

APIRoute represents a discovered API route

type FieldInfo

type FieldInfo struct {
	Name        string `json:"name"`
	TypeName    string `json:"type"`
	JSONTag     string `json:"jsonTag"`
	Optional    bool   `json:"optional"`
	IsArray     bool   `json:"isArray"`
	Description string `json:"description,omitempty"`
}

FieldInfo represents a field in a struct

type NestedAPI

type NestedAPI map[string]interface{} // Can contain either another NestedAPI or APIMethod

NestedAPI represents the nested API structure

type TypeDefinition

type TypeDefinition struct {
	Name        string      `json:"name"`
	Fields      []FieldInfo `json:"fields"`
	PackageName string      `json:"packageName"`
	IsEnum      bool        `json:"isEnum"`
	EnumValues  []string    `json:"enumValues,omitempty"`
}

TypeDefinition represents a Go struct converted to TypeScript

Jump to

Keyboard shortcuts

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