swagger

package
v0.0.0-...-7c549dc Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

README

Go API Server for swagger

Interceptor Service

Overview

This server was generated by the [swagger-codegen] (https://github.com/swagger-api/swagger-codegen) project.
By using the OpenAPI-Spec from a remote server, you can easily generate a server stub.

To see how to make this your own, look here:

README

Running the server

To run the server, follow these simple steps:

go run main.go

Documentation

Overview

* Copyright (c) 2021, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. * * WSO2 Inc. licenses this file to you under the Apache License, * Version 2.0 (the "License"); you may not use this file except * in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License.

* Copyright (c) 2021, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. * * WSO2 Inc. licenses this file to you under the Apache License, * Version 2.0 (the "License"); you may not use this file except * in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License.

* Choreo-Connect Interceptor Service * * Interceptor Service * * API version: v1 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Choreo-Connect Interceptor Service * * Interceptor Service * * API version: v1 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Choreo-Connect Interceptor Service * * Interceptor Service * * API version: v1 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Choreo-Connect Interceptor Service * * Interceptor Service * * API version: v1 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Choreo-Connect Interceptor Service * * Interceptor Service * * API version: v1 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Choreo-Connect Interceptor Service * * Interceptor Service * * API version: v1 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Choreo-Connect Interceptor Service * * Interceptor Service * * API version: v1 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Choreo-Connect Interceptor Service * * Interceptor Service * * API version: v1 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Choreo-Connect Interceptor Service * * Interceptor Service * * API version: v1 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HandleRequest

func HandleRequest(w http.ResponseWriter, r *http.Request)

func HandleResponse

func HandleResponse(w http.ResponseWriter, r *http.Request)

func Index

func Index(w http.ResponseWriter, r *http.Request)

func Logger

func Logger(inner http.Handler, name string) http.Handler

func NewRouter

func NewRouter() *mux.Router

Types

type Book

type Book struct {
	Name string
}

type DynamicEndpoint

type DynamicEndpoint struct {
	EndpointName string `json:"endpointName,omitempty"`
}

type InvocationContext

type InvocationContext struct {
	RequestId string `json:"requestId,omitempty"`

	Protocol string `json:"protocol,omitempty"`

	Scheme string `json:"scheme,omitempty"`

	ApiName string `json:"apiName,omitempty"`

	ApiVersion string `json:"apiVersion,omitempty"`

	Vhost string `json:"vhost,omitempty"`

	SupportedMethods string `json:"supportedMethods,omitempty"`

	Method string `json:"method,omitempty"`

	BasePath string `json:"basePath,omitempty"`

	Path string `json:"path,omitempty"`

	PathTemplate string `json:"pathTemplate,omitempty"`

	Source string `json:"source,omitempty"`

	ProdClusterName string `json:"prodClusterName,omitempty"`

	SandClusterName string `json:"sandClusterName,omitempty"`

	AuthenticationContext *InvocationContextAuthenticationContext `json:"authenticationContext,omitempty"`
}

type InvocationContextAuthenticationContext

type InvocationContextAuthenticationContext struct {
	TokenType string `json:"tokenType,omitempty"`

	Token string `json:"token,omitempty"`

	KeyType string `json:"keyType,omitempty"`
}

type RequestHandlerRequestBody

type RequestHandlerRequestBody struct {
	RequestHeaders *map[string]string `json:"requestHeaders,omitempty"`

	RequestTrailers *map[string]string `json:"requestTrailers,omitempty"`

	RequestBody string `json:"requestBody,omitempty"`

	InvocationContext *InvocationContext `json:"invocationContext,omitempty"`
}

type RequestHandlerResponseBody

type RequestHandlerResponseBody struct {
	DirectRespond bool `json:"directRespond,omitempty"`

	ResponseCode int32 `json:"responseCode,omitempty"`

	DynamicEndpoint *DynamicEndpoint `json:"dynamicEndpoint,omitempty"`

	HeadersToAdd *map[string]string `json:"headersToAdd,omitempty"`

	HeadersToReplace *map[string]string `json:"headersToReplace,omitempty"`

	HeadersToRemove *[]string `json:"headersToRemove,omitempty"`

	TrailersToAdd *map[string]string `json:"trailersToAdd,omitempty"`

	TrailersToReplace *map[string]string `json:"trailersToReplace,omitempty"`

	TrailersToRemove *[]string `json:"trailersToRemove,omitempty"`

	Body string `json:"body,omitempty"`

	InterceptorContext *map[string]string `json:"interceptorContext,omitempty"`
}

type ResponseHandlerRequestBody

type ResponseHandlerRequestBody struct {
	ResponseCode int32 `json:"responseCode"`

	RequestHeaders *map[string]string `json:"requestHeaders,omitempty"`

	RequestTrailers *map[string]string `json:"requestTrailers,omitempty"`

	RequestBody string `json:"requestBody,omitempty"`

	ResponseHeaders *map[string]string `json:"responseHeaders,omitempty"`

	ResponseTrailers *map[string]string `json:"responseTrailers,omitempty"`

	ResponseBody string `json:"responseBody,omitempty"`

	InvocationContext *InvocationContext `json:"invocationContext,omitempty"`

	InterceptorContext *map[string]string `json:"interceptorContext,omitempty"`
}

type ResponseHandlerResponseBody

type ResponseHandlerResponseBody struct {
	ResponseCode int32 `json:"responseCode,omitempty"`

	HeadersToAdd *map[string]string `json:"headersToAdd,omitempty"`

	HeadersToReplace *map[string]string `json:"headersToReplace,omitempty"`

	HeadersToRemove *[]string `json:"headersToRemove,omitempty"`

	TrailersToAdd *map[string]string `json:"trailersToAdd,omitempty"`

	TrailersToReplace *map[string]string `json:"trailersToReplace,omitempty"`

	TrailersToRemove *[]string `json:"trailersToRemove,omitempty"`

	Body string `json:"body,omitempty"`
}

type Route

type Route struct {
	Name        string
	Method      string
	Pattern     string
	HandlerFunc http.HandlerFunc
}

type Routes

type Routes []Route

Jump to

Keyboard shortcuts

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