jarvis

package
v0.0.0-...-796e579 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2022 License: AGPL-3.0 Imports: 60 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Main

func Main()

Main is the main entrance of jarvis server or client program.

Types

type Dashboard2FAData

type Dashboard2FAData struct {
	TOTP *DashboardTOTPData `json:",omitempty"`
}

Dashboard2FAData contains data for 2-factor authentication tab.

type DashboardData

type DashboardData struct {
	Path     string
	Now      *timeutil.Timestamp // Unix seconds.
	NeedSudo bool                // Needs to get sudo cookie first.

	Overview      *DashboardOverviewData     `json:",omitempty"`
	TwoFactorAuth *Dashboard2FAData          `json:",omitempty"`
	SecurityLogs  *DashboardSecurityLogsData `json:",omitempty"`
	SSHKeys       *DashboardSSHKeysData      `json:",omitempty"`
}

DashboardData contains the page data for a particular dashboard state.

type DashboardDataRequest

type DashboardDataRequest struct {
	Path string
}

DashboardDataRequest is the AJAX request to load dashboard data.

type DashboardOverviewData

type DashboardOverviewData struct {
	NoSysDock       bool
	NextcloudDomain string
	IPAddrs         []string
	DiskUsage       *diskUsage
	UptimeSecs      int64
}

DashboardOverviewData contains the data for dashboard overview.

type DashboardSSHKeysData

type DashboardSSHKeysData struct {
	Keys     string
	Disabled bool
}

DashboardSSHKeysData contains data for initializing SSH Keys dashboard page.

type DashboardSecurityLogsData

type DashboardSecurityLogsData struct {
	Entries []*LogEntry
}

DashboardSecurityLogsData encapsulates security logs entries for the dashbaord.

type DashboardTOTPData

type DashboardTOTPData struct {
	Enabled   bool
	TOTPSetup *TOTPSetup `json:",omitempty"`
}

DashboardTOTPData contains data for TOTP 2FA method.

type DisableTOTPRequest

type DisableTOTPRequest struct{}

DisableTOTPRequest is the request to disable 2-factor authentication..

type DisableTOTPResponse

type DisableTOTPResponse struct{}

DisableTOTPResponse is the response to disable 2-factor authentication..

type EnableTOTPRequest

type EnableTOTPRequest struct {
	SignedSecret []byte
	OTP          string
}

EnableTOTPRequest is the request to activate TOTP authentication..

type EnableTOTPResponse

type EnableTOTPResponse struct {
	Error string // Expected error that user should see.
}

EnableTOTPResponse is the response to activate TOTP authentication..

type LogEntry

type LogEntry struct {
	K    string
	T    int64
	User string `json:",omitempty"`
	Text string `json:",omitempty"`
	Type string `json:",omitempty"`
	V    []byte `json:",omitempty"`

	// The following fields are only used in Javascript.
	TSec int64  `json:",omitempty"`
	VStr string `json:",omitepmty"`
}

LogEntry is a log entry for jarvis to display.

type SetupTOTPRequest

type SetupTOTPRequest struct{}

SetupTOTPRequest is the request to create a signed TOTP setup.

type TOTPSetup

type TOTPSetup struct {
	SignedSecret []byte
	QRCode       string
	URL          string
}

TOTPSetup contains data fields needed for setting up TOTP authentication.

Jump to

Keyboard shortcuts

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