Back to godoc.org
github.com/michele/echo-apib

Package apib

v1.0.3
Latest Go to latest

The highest tagged major version is .

Published: Jun 22, 2019 | License: MIT | Module: github.com/michele/echo-apib

Index

func AddParam

func AddParam(name string, typ string, ex string, desc string, req bool)

func ApibGenerator

func ApibGenerator(next echo.HandlerFunc) echo.HandlerFunc

func Flush

func Flush()

func Group

func Group(group string)

func Name

func Name(name string)

func Record

func Record()

func Store

func Store()

type Call

type Call struct {
	Group    string
	Name     string
	Request  Request
	Response Response
}

type Param

type Param struct {
	Name        string
	Example     string
	Description string
	Type        string
	Required    bool
}

type Request

type Request struct {
	URI        string
	Method     string
	Headers    map[string]string
	Params     map[string][]string
	Body       string
	PathParams map[string]string
	FormParams map[string]string
}

type Resource

type Resource struct {
	Name        string
	URI         string
	Call        Call
	Params      map[string][]string
	ExtraParams []*Param
	Attributes  map[string]string
}

type Resources

type Resources []Resource

type Response

type Response struct {
	Headers    map[string]string
	Body       string
	StatusCode int
}

type Writer

type Writer struct {
	http.ResponseWriter
	// contains filtered or unexported fields
}

func NewWriter

func NewWriter(res http.ResponseWriter) *Writer

func (*Writer) Body

func (aw *Writer) Body() string

func (*Writer) Header

func (aw *Writer) Header() http.Header

func (*Writer) Write

func (aw *Writer) Write(b []byte) (int, error)

func (*Writer) WriteHeader

func (aw *Writer) WriteHeader(code int)

Package Files

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier