open_api

package
v0.16.1 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateHandleFunc

func CreateHandleFunc(handleFunc func(req *http.Request, params httprouter.Params) (status int, header http.Header, events []*EventResponse, body interface{})) httprouter.Handle

func CreateHandler

func CreateHandler(handler OpenApiHandler) httprouter.Handle

Types

type EventResponse

type EventResponse struct {
	Event     string `json:"event"`
	Namespace string `json:"namespace"`
	Key       string `json:"key"`
	Data      []byte `json:"data"`
}

func (*EventResponse) String

func (e *EventResponse) String() string

type OpenApiHandleFunc

type OpenApiHandleFunc func(req *http.Request, params httprouter.Params) (status int, header http.Header, events []*EventResponse, body interface{})

func (OpenApiHandleFunc) Serve

func (f OpenApiHandleFunc) Serve(req *http.Request, params httprouter.Params) (status int, header http.Header, event []*EventResponse, body interface{})

type OpenApiHandler

type OpenApiHandler interface {
	Serve(req *http.Request, params httprouter.Params) (status int, header http.Header, events []*EventResponse, body interface{})
}

type OpenApiProxyResponse

type OpenApiProxyResponse struct {
	RespData interface{}    `json:"resp_data"`
	Event    *EventResponse `json:"event"`
}

type Response

type Response struct {
	StatusCode int              `json:"status"`
	Header     http.Header      `json:"header"`
	Data       []byte           `json:"data"`
	Event      []*EventResponse `json:"Event"`
}

Jump to

Keyboard shortcuts

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