webapi

package
v0.0.0-...-3bfe646 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2023 License: Apache-2.0 Imports: 33 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// RemoteAccessOn means remote support switch is turned on
	RemoteAccessOn = "on"
	// RemoteAccessOff means remote support switch is turned off
	RemoteAccessOff = "off"
	// RemoteAccessNotConfigured means the cluster is connected to any Ops Center
	RemoteAccessNotConfigured = "n/a"
)

Variables

This section is empty.

Functions

func ConsoleLogin

func ConsoleLogin(opsCenterURL, connectorID string, ttl time.Duration, insecure bool, pool *x509.CertPool) (*users.LoginEntry, error)

ConsoleLogin logs user using console flow and returns web session

Types

type Handler

type Handler struct {
	// Handler is the open-source web API handler
	*webapi.Handler
	// Operator is the enterprise operator service
	Operator ops.Operator
}

Handler extends the open-source web API handler

func NewHandler

func NewHandler(ossHandler *webapi.Handler, operator ops.Operator) *Handler

NewHandler returns a new enterprise web API handler

func (*Handler) CallbackHandler

func (h *Handler) CallbackHandler(w http.ResponseWriter, r *http.Request, p webapi.CallbackParams) error

CallbackHandler is the OAuth2 provider callback handler

func (*Handler) Resources

func (h *Handler) Resources(ctx *webapi.AuthContext) (resources.Resources, error)

Resources returns the resource controller

Jump to

Keyboard shortcuts

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