webserver

package
v0.0.0-...-9d62925 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2023 License: MIT Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RunServer

func RunServer(c Config)

RunServer starts the webserver

Types

type Config

type Config struct {
	DbFile        string //Database Filename
	Cert          string //Cert for the https server
	Key           string //Key for the https server
	WebserverPort string //Port to run the server on
	Setup         bool   //If true then run initial setup
}

Config holds info on the server configuration

type Message

type Message struct {
	Type         string      //Holds the type of message
	FunctionName string      //Holds the function names
	Data         interface{} //Holds the rest of the json data to be passed around
}

Message defines our message object

type PivotGraph

type PivotGraph struct {
	Listenerkey string
	Name        string
	Top         bool
	Agents      []basicAgent
	LType       string
	Port        string
}

PivotGraph struct holds data for the API call

type User

type User struct {
	UserID         string //UUID for the DB
	Username       string //Username
	Authenticated  bool   //Authed or not
	Admin          bool   //If the user is an Admin or not
	ChangePassword bool   //Does the user need to change their password
	MFASetup       bool   //Check to see if MFA is set or not for user if it is required
	MFA            bool   //Check to see if they need to be prompted for MFA
	MFASuccess     bool   //Did user pass MFA
}

User holds basic data on users for cookies

Directories

Path Synopsis
Package dgoogauth implements the one-time password algorithms supported by Google Authenticator This package supports the HMAC-Based One-time Password (HOTP) algorithm specified in RFC 4226 and the Time-based One-time Password (TOTP) algorithm specified in RFC 6238.
Package dgoogauth implements the one-time password algorithms supported by Google Authenticator This package supports the HMAC-Based One-time Password (HOTP) algorithm specified in RFC 4226 and the Time-based One-time Password (TOTP) algorithm specified in RFC 6238.

Jump to

Keyboard shortcuts

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