web

package
v2.1.1 Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AuthorizeHandler

func AuthorizeHandler(externalURL string, client *netatmo.Client) http.HandlerFunc

func CallbackHandler

func CallbackHandler(ctx context.Context, client *netatmo.Client) http.HandlerFunc

func DebugDataHandler

func DebugDataHandler(log logrus.FieldLogger, readFunc func() (*netatmo.DeviceCollection, error)) http.Handler

DebugDataHandler creates a handler which outputs the raw JSON data.

func DebugTokenHandler

func DebugTokenHandler(log logrus.FieldLogger, tokenFunc func() (*oauth2.Token, error)) http.Handler

DebugTokenHandler creates a handler which returns information about the currently-used token. For security reasons, the actual token data is not returned.

func HomeHandler

func HomeHandler(tokenFunc func() (*oauth2.Token, error)) http.Handler

HomeHandler produces a simple website showing the exporter's status in a human-readable form. It provides links to other information and help for authentication as well.

func SetTokenHandler

func SetTokenHandler(ctx context.Context, client *netatmo.Client) http.HandlerFunc

Types

This section is empty.

Jump to

Keyboard shortcuts

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