generator

package
v0.0.0-...-862cbf9 Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2023 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ParamRoleCommon int = iota
	ParamRoleURL
)

Variables

This section is empty.

Functions

func RenderGolang

func RenderGolang(endpoints []Endpoint, types map[string]string, config *GolangConfig) error

func RenderTypescript

func RenderTypescript(endpoints []Endpoint, types map[string]string, config *TypescriptConfig) error

Types

type Endpoint

type Endpoint struct {
	Name    []string
	Title   string
	Method  string
	Param   []Param
	RetType string
}

func ParseDocument

func ParseDocument(raw []byte) ([]Endpoint, map[string]string)

type GolangConfig

type GolangConfig struct {
	Path    string
	Package string
}
type Header []string

func (Header) Contains

func (h Header) Contains(aim string) bool

type Param

type Param struct {
	Name string
	Type string
	Role int
}

type TypescriptConfig

type TypescriptConfig struct {
	FilePath string
}

Jump to

Keyboard shortcuts

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