webserver

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2023 License: MIT Imports: 16 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetPassword

func GetPassword() passwordStruct

GetPassword - Gets the Password

func JeffsRouter

func JeffsRouter() *mux.Router

JeffsRouter - The router

func Logger

func Logger(inner http.Handler, name string) http.Handler

Logger passed handler and name, get more info

func ReadPasswordFile

func ReadPasswordFile(nodeName string, passwordString string)

ReadPasswordFile - Reads the password hash from a file and puts in struct

func StartHTTPServer

func StartHTTPServer(nodeIP string, nodeWebPort string)

StartHTTPServer - Start the WebServer

func WritePasswordFile

func WritePasswordFile(nodeName string, passwordString string)

WritePasswordFile - Writes the password hash to a file and puts in struct

Types

type Message

type Message struct {
	Data string `json:"data"`
}

Message takes incoming JSON payload for writing data

type Route

type Route struct {
	RouteName        string
	RouteHTTPVerb    string
	RouteEndPoint    string
	RouteHandlerFunc http.HandlerFunc
}

Route - The struct for the route endpoints (e.g. /jeff)

type Routes

type Routes []Route

Routes is slice

Jump to

Keyboard shortcuts

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