admin

package
v5.3.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	// Prefix is a custom prefix to handle admin endpoints on.
	Prefix string

	// WebPath is path to admin web application to serve.
	WebPath string

	// WebProxyAddress is an address for proxying to the running admin web application app.
	// So it's possible to run web app in dev mode and point Centrifugo to its address for
	// development purposes.
	WebProxyAddress string

	// WebFS is custom filesystem to serve as admin web application.
	// In our case we pass embedded web interface which implements
	// FileSystem interface.
	WebFS http.FileSystem

	// Password is an admin password.
	Password string

	// Secret is a secret to generate auth token for admin requests.
	Secret string

	// Insecure turns on insecure mode for admin endpoints - no auth
	// required to connect to web interface and for requests to admin API.
	// Admin resources must be protected by firewall rules in production when
	// this option enabled otherwise everyone from internet can make admin
	// actions.
	Insecure bool
}

Config ...

type Handler

type Handler struct {
	// contains filtered or unexported fields
}

Handler handles admin web interface endpoints.

func NewHandler

func NewHandler(n *centrifuge.Node, apiExecutor *api.Executor, c Config) *Handler

NewHandler creates new Handler.

func (*Handler) ServeHTTP

func (s *Handler) ServeHTTP(rw http.ResponseWriter, r *http.Request)

Jump to

Keyboard shortcuts

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