parser

package
v0.12.10 Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrPkgNotFound    = errors.New("pkg not found")
	ErrPkgMod         = errors.New("pkg has no module information")
	ErrNoGoFilesFound = errors.New("pkg has no Go files")
)

Functions

func Render

func Render(atomikaFS fs.FS, src, dest string, data interface{}) error

Types

type Definition

type Definition struct {
	Package  string            `json:"package"`
	Imports  map[string]string `json:"imports"`
	Services []Service         `json:"services"`
	Objects  []Object          `json:"objects"`
}

Definition will map the contents of service/def dir to an interfaces

func Generate

func Generate(p string, sdk *SDK) (*Definition, error)

type Field

type Field struct {
}

type FieldTag

type FieldTag struct {
	Value   string   `json:"value"`
	Options []string `json:"options"`
}

type FieldType

type FieldType struct {
}

type Method

type Method struct {
}

type Object

type Object struct {
}

type Parser

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

func NewParser

func NewParser() *Parser

func (*Parser) Parse

func (p *Parser) Parse(pkgPath string) (*Definition, error)

type SDK

type SDK struct {
	Go bool
	Js bool
	Ts bool
}

SDK struct is used in parsing services by default parser will generate only the service side if any of sdk is true, an SDK for that programming lang will be generated

type Service

type Service struct {
}

Jump to

Keyboard shortcuts

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