parser

package
v0.0.0-...-4fdfd55 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2019 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const Object = "Object"

Variables

This section is empty.

Functions

This section is empty.

Types

type Endpoint

type Endpoint struct {
	Name        string
	Description string

	Parameters      []Parameter
	ParameterByName map[string]Parameter
	Response        *Response
}

func NewEndpoint

func NewEndpoint(name string) *Endpoint

type Parameter

type Parameter struct {
	Field       string
	Type        string
	Description string
	Tag         string
}

type Parser

type Parser struct {
	Endpoints       []*Endpoint
	EndpointsByName map[string]*Endpoint
	// contains filtered or unexported fields
}

func NewParser

func NewParser(filename string) (*Parser, error)

func (*Parser) AddEndpoint

func (p *Parser) AddEndpoint(name, description string)

func (*Parser) Parse

func (p *Parser) Parse() error

type Response

type Response struct {
	Type   string
	Fields []ResponseField
}

type ResponseField

type ResponseField struct {
	Field       string
	Type        string
	Description string
	Tag         string
}

Jump to

Keyboard shortcuts

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