common

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Closer

func Closer(o any) io.ReadWriteCloser

func CloserWrap

func CloserWrap(o any, err error) (io.ReadWriteCloser, error)

func ConfigCsrfSecret

func ConfigCsrfSecret() string

ConfigCsrfSecret returns the CSRF secret.

func ConfigProxyGenerateQRCodeURL

func ConfigProxyGenerateQRCodeURL() string

ConfigProxyGenerateQRCodeURL returns the proxy QR code generation URL.

func ConfigProxyOTPSecret

func ConfigProxyOTPSecret() string

ConfigProxyOTPSecret returns the proxy OTP secret.

func ConfigProxyPass

func ConfigProxyPass() string

ConfigProxyPass returns the proxy password.

func ConfigProxyRedirectLoginURL

func ConfigProxyRedirectLoginURL() string

ConfigProxyRedirectLoginURL returns the proxy redirect login URL.

func ConfigProxyTargetHosts

func ConfigProxyTargetHosts() hosts

ConfigProxyTargetHosts returns the proxy target hosts.

func ConfigProxyUser

func ConfigProxyUser() string

ConfigProxyUser returns the proxy user.

func ConfigSessionToken

func ConfigSessionToken() string

ConfigSessionToken returns the session token.

func ConfigureProxy

func ConfigureProxy(opts ...option)

ConfigureProxy configures the proxy.

func Getenv

func Getenv[T any](key string, fallback T) (out T)

Getenv returns the value of the environment variable with the given key.

func Logger

func Logger() *zap.Logger

func WithCsrfSecret

func WithCsrfSecret(secret string) option

WithCsrfSecret sets the CSRF secret.

func WithProxyGenerateQRCodeURL

func WithProxyGenerateQRCodeURL(url string) option

WithProxyGenerateQRCodeURL sets the proxy QR code generation URL.

func WithProxyOTPSecret

func WithProxyOTPSecret(secret string) option

WithProxyOTPSecret sets the proxy OTP secret.

func WithProxyPass

func WithProxyPass(pass string) option

WithProxyPass sets the proxy password.

func WithProxyRedirectLoginURL

func WithProxyRedirectLoginURL(url string) option

WithProxyRedirectLoginURL sets the proxy redirect login URL.

func WithProxyTargetHosts

func WithProxyTargetHosts(hosts map[string]string) option

WithProxyTargetHosts sets the proxy target hosts.

func WithProxyUser

func WithProxyUser(user string) option

WithProxyUser sets the proxy user.

func WithSessionToken

func WithSessionToken(token string) option

WithSessionToken sets the session token.

Types

This section is empty.

Jump to

Keyboard shortcuts

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