handler

package
v2.4.0 Latest Latest
Warning

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

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

Documentation

Overview

Package handler handles or proxies HTTP requests. It calls the underlining services if needs.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Func

type Func func(http.ResponseWriter, *http.Request) error

Func is http.HandlerFunc with error return.

type Handler

type Handler interface {
	// NToken handles get N-token requests.
	NToken(http.ResponseWriter, *http.Request) error
	// NTokenProxy handles proxy requests that require a N-token.
	NTokenProxy(http.ResponseWriter, *http.Request) error
	// AccessToken handles post access token requests.
	AccessToken(http.ResponseWriter, *http.Request) error
	// RoleToken handles post role token requests.
	RoleToken(http.ResponseWriter, *http.Request) error
	// RoleTokenProxy handles proxy requests that require a role token.
	RoleTokenProxy(http.ResponseWriter, *http.Request) error
	// ServiceCert handles get svccert requests.
	ServiceCert(http.ResponseWriter, *http.Request) error
}

Handler for handling a set of HTTP requests.

func New

New creates a handler for handling different HTTP requests based on the given services. It also contains a reverse proxy for handling proxy request.

Jump to

Keyboard shortcuts

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