apiMeta

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Encode

func Encode(api *API) (res string, err error)

Types

type API

type API struct {
	Paths map[string]map[string]Response `json:"paths"`
}

func Decode

func Decode(s string) (api *API, err error)

func GenApiMeta

func GenApiMeta(serDesc map[string]*Service) *API

type Path

type Path struct {
	Method   string
	FullName string
}

type Response

type Response struct {
	Codes map[string]ResponseEntity `json:"responses"`
}

type ResponseEntity

type ResponseEntity struct {
	Schema      map[string]string `json:"schema"`
	Description string            `json:"description"`
}

type Service

type Service struct {
	PackageName string
	ServiceName string
	Paths       []Path
}

Jump to

Keyboard shortcuts

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