definition

package
v0.0.0-...-64b9ca2 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Action

type Action struct {
	Method      string `json:"method"`
	Description string `json:"description"`
}

func (*Action) UnmarshalJSON

func (a *Action) UnmarshalJSON(data []byte) error

type Endpoint

type Endpoint struct {
	Name    string   `json:"name"`
	Path    string   `json:"path"`
	Actions []Action `json:"actions"`
}

func (*Endpoint) UnmarshalJSON

func (e *Endpoint) UnmarshalJSON(data []byte) error

type Parser

type Parser struct{}

func NewParser

func NewParser() *Parser

func (*Parser) Parse

func (p *Parser) Parse(r io.Reader) (Service, error)

func (*Parser) ParseFile

func (p *Parser) ParseFile(path string) (Service, error)

type Service

type Service struct {
	Host      string     `json:"host"`
	Port      int        `json:"port"`
	Endpoints []Endpoint `json:"endpoints"`
}

func (*Service) UnmarshalJSON

func (s *Service) UnmarshalJSON(data []byte) error

Jump to

Keyboard shortcuts

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