dashboard

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

func CheckService

func CheckService(i int) string

CheckService checks the status of a service

func Run

func Run(t *term.ViewPort)

The main function initializes and runs a terminal-based news reader application called StarTerm, which fetches news headlines from an RSS feed and allows the user to navigate and open the full news articles.

func StatusCode

func StatusCode(PAGE string, AUTH string, SUCCESS string) (r string)

StatusCode performs an HTTP request to the specified page and returns the status code and status message. The status code is compared to the specified success code, and if they match, the status message for online is returned. If the status code does not match the success code, the status message for offline is returned.

The function takes the following parameters:

PAGE: The URL of the page to request.
AUTH: The authorization header value to use for the request.
SUCCESS: The expected status code for a successful response.

The function returns the status message for the specified status code.

Types

This section is empty.

Jump to

Keyboard shortcuts

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