extractor

package
v0.0.0-...-9bdd10d Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2024 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Extractor

type Extractor struct {
	// contains filtered or unexported fields
}

func New

func New(path string) (*Extractor, error)

New parses the file at path and returns an extractor with its contents.

func (*Extractor) Extract

func (e *Extractor) Extract() ([]Route, []Struct)

Extract reads the JSON document and extracts all the routes and structs from it.

type Field

type Field struct {
	Name       string
	IsArray    bool
	IsOptional bool
	Type       string
}

type Route

type Route struct {
	Name       string
	Summary    string
	Method     string
	Path       string
	ParamsName string
	ReturnName string
}

type Struct

type Struct struct {
	Name       string
	Fields     []Field
	UnionNames []string
}

Jump to

Keyboard shortcuts

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