internal

package
v0.0.1-beta Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var RouteRegistrations []func(*mux.Router)

Functions

func AddRouteRegistration

func AddRouteRegistration(register func(*mux.Router))

func GenerateProxyFunctionForInput

func GenerateProxyFunctionForInput(inputFile, outputDir string) error

func ProxyRequest

func ProxyRequest(w http.ResponseWriter, r *http.Request, url, method string, fieldMappings map[string]string)

func RegisterRoutes

func RegisterRoutes(r *mux.Router)

Types

type ApplicationJSON

type ApplicationJSON struct {
	Schema Schema `yaml:"schema"`
}

type Content

type Content struct {
	ApplicationJSON ApplicationJSON `yaml:"application/json"`
}

type OpenAPIMethod

type OpenAPIMethod struct {
	Summary      string       `yaml:"summary"`
	RequestBody  RequestBody  `yaml:"requestBody"`
	ProxyMapping ProxyMapping `yaml:"proxy_mapping"`
}

type OpenAPIPath

type OpenAPIPath struct {
	Methods map[string]*OpenAPIMethod `yaml:",inline"`
}

type Properties

type Properties struct {
	Type string `yaml:"type"`
}

type ProxyMapping

type ProxyMapping struct {
	ProxyHost     string            `yaml:"proxy_host"`
	ProxyEndpoint string            `yaml:"proxy_endpoint"`
	ProxyMethod   string            `yaml:"proxy_method"`
	FieldMappings map[string]string `yaml:"field_mappings"`
}

type RequestBody

type RequestBody struct {
	Content Content `yaml:"content"`
}

type Schema

type Schema struct {
	Type       string                 `yaml:"type"`
	Properties map[string]*Properties `yaml:"properties"`
}

Jump to

Keyboard shortcuts

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