node

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2020 License: GPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsBuiltin

func IsBuiltin(t types.Type) bool

func ParseService

func ParseService(servicesPath string, ifaceNames ...string) (service []Service, events []Event, serviceTags tags.DocTags, err error)

Types

type Event

type Event struct {
	Name string       `json:"name"`
	Tags tags.DocTags `json:"tags,omitempty"`
	Type Object       `json:"type,omitempty"`
}

func ParseEvents

func ParseEvents(eventsDirectory string) (events []Event, err error)

type Method

type Method struct {
	Name      string       `json:"name"`
	Tags      tags.DocTags `json:"tags,omitempty"`
	Results   []Object     `json:"results,omitempty"`
	Arguments []Object     `json:"arguments,omitempty"`

	HasContext  bool `json:"hasContext,omitempty"`
	ReturnError bool `json:"returnError,omitempty"`
}

type Node

type Node struct {
	Name     string       `json:"name"`
	Tags     tags.DocTags `json:"tags,omitempty"`
	Events   []Event      `json:"events,omitempty"`
	Services []Service    `json:"services,omitempty"`
}

func Parse

func Parse(servicesPath string, ifaceNames ...string) (node Node, err error)

func (Node) SaveJSON

func (n Node) SaveJSON(path string) (err error)

type Object

type Object struct {
	Name   string   `json:"name"`
	Type   string   `json:"type"`
	Fields []Object `json:"fields,omitempty"`

	Tags     tags.DocTags        `json:"tags,omitempty"`
	TypeTags map[string][]string `json:"typeTags,omitempty"`
	SubTypes map[string]Object   `json:"subTypes,omitempty"`

	IsMap      bool `json:"isMap,omitempty"`
	IsArray    bool `json:"isArray,omitempty"`
	IsPrivate  bool `json:"isPrivate,omitempty"`
	IsNullable bool `json:"isNullable,omitempty"`
	IsEllipsis bool `json:"isEllipsis,omitempty"`
}

func (Object) Value

func (o Object) Value(str string) (value interface{})

type Service

type Service struct {
	Name    string       `json:"name"`
	Tags    tags.DocTags `json:"tags,omitempty"`
	Methods []Method     `json:"methods,omitempty"`
}

func ParseGoFile

func ParseGoFile(servicesPath, fileName string, ifaceNames ...string) (services []Service, fileTags tags.DocTags, err error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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