handler

package
v0.0.0-...-14a4c8a Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2023 License: MIT Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AboutPage

func AboutPage() echo.HandlerFunc

AboutPage handler

func ApplyServerConfig

func ApplyServerConfig(db store.IStore, tmplDir fs.FS) echo.HandlerFunc

ApplyServerConfig handler to write config file and restart Wireguard server

func ContentTypeJson

func ContentTypeJson(next echo.HandlerFunc) echo.HandlerFunc

ContentTypeJson checks that the requests have the Content-Type header set to "application/json". This helps against CSRF attacks.

func CreateUser

func CreateUser(db store.IStore) echo.HandlerFunc

CreateUser to create new user

func DeleteWakeOnHost

func DeleteWakeOnHost(db store.IStore) echo.HandlerFunc

func DownloadClient

func DownloadClient(db store.IStore) echo.HandlerFunc

DownloadClient handler

func EmailClient

func EmailClient(db store.IStore, mailer emailer.Emailer, emailSubject, emailContent string) echo.HandlerFunc

EmailClient handler to send the configuration via email

func Favicon

func Favicon() echo.HandlerFunc

func GetClient

func GetClient(db store.IStore) echo.HandlerFunc

GetClient handler returns a JSON object of Wireguard client data

func GetClients

func GetClients(db store.IStore) echo.HandlerFunc

GetClients handler return a JSON list of Wireguard client data

func GetHashesChanges

func GetHashesChanges(db store.IStore) echo.HandlerFunc

GetHashesChanges handler returns if database hashes have changed

func GetUser

func GetUser(db store.IStore) echo.HandlerFunc

GetUser handler returns a JSON object of single user

func GetUsers

func GetUsers(db store.IStore) echo.HandlerFunc

GetUsers handler return a JSON list of all users

func GetWakeOnLanHosts

func GetWakeOnLanHosts(db store.IStore) echo.HandlerFunc

func GlobalSettingSubmit

func GlobalSettingSubmit(db store.IStore) echo.HandlerFunc

GlobalSettingSubmit handler to update the global settings

func GlobalSettings

func GlobalSettings(db store.IStore) echo.HandlerFunc

GlobalSettings handler

func Health

func Health() echo.HandlerFunc

Health check handler

func LoadProfile

func LoadProfile(db store.IStore) echo.HandlerFunc

LoadProfile to load user information

func Login

func Login(db store.IStore) echo.HandlerFunc

Login for signing in handler

func LoginPage

func LoginPage() echo.HandlerFunc

LoginPage handler

func Logout

func Logout() echo.HandlerFunc

Logout to log a user out

func MachineIPAddresses

func MachineIPAddresses() echo.HandlerFunc

MachineIPAddresses handler to get local interface ip addresses

func NeedsAdmin

func NeedsAdmin(next echo.HandlerFunc) echo.HandlerFunc

func NewClient

func NewClient(db store.IStore) echo.HandlerFunc

NewClient handler

func RemoveClient

func RemoveClient(db store.IStore) echo.HandlerFunc

RemoveClient handler

func RemoveUser

func RemoveUser(db store.IStore) echo.HandlerFunc

RemoveUser handler

func SaveWakeOnLanHost

func SaveWakeOnLanHost(db store.IStore) echo.HandlerFunc

func SendJSONRPCRequest

func SendJSONRPCRequest(settings model.GlobalSetting) ([]model.Peer, error)

func SetClientStatus

func SetClientStatus(db store.IStore) echo.HandlerFunc

SetClientStatus handler to enable / disable a client

func Status

func Status(db store.IStore) echo.HandlerFunc

Status handler

func Status2

func Status2(db store.IStore) echo.HandlerFunc

func SuggestIPAllocation

func SuggestIPAllocation(db store.IStore) echo.HandlerFunc

SuggestIPAllocation handler to get the list of ip address for client

func UpdateClient

func UpdateClient(db store.IStore) echo.HandlerFunc

UpdateClient handler to update client information

func UpdateUser

func UpdateUser(db store.IStore) echo.HandlerFunc

UpdateUser to update user information

func UsersSettings

func UsersSettings(db store.IStore) echo.HandlerFunc

UsersSettings handler

func ValidSession

func ValidSession(next echo.HandlerFunc) echo.HandlerFunc

func WakeOnHost

func WakeOnHost(db store.IStore) echo.HandlerFunc

func WireGuardClients

func WireGuardClients(db store.IStore) echo.HandlerFunc

WireGuardClients handler

func WireGuardServer

func WireGuardServer(db store.IStore) echo.HandlerFunc

WireGuardServer handler

func WireGuardServerInterfaces

func WireGuardServerInterfaces(db store.IStore) echo.HandlerFunc

WireGuardServerInterfaces handler

func WireGuardServerKeyPair

func WireGuardServerKeyPair(db store.IStore) echo.HandlerFunc

WireGuardServerKeyPair handler to generate private and public keys

Types

type WakeOnLanHostSavePayload

type WakeOnLanHostSavePayload struct {
	Name          string `json:"name"`
	MacAddress    string `json:"mac_address"`
	OldMacAddress string `json:"old_mac_address"`
}

Jump to

Keyboard shortcuts

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