handler

package
v0.6.2 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2024 License: MIT Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AboutPage added in v0.5.0

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 added in v0.4.0

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 added in v0.5.0

func CreateUser(db store.IStore) echo.HandlerFunc

CreateUser to create new user

func DeleteWakeOnHost added in v0.3.7

func DeleteWakeOnHost(db store.IStore) echo.HandlerFunc

func DownloadClient

func DownloadClient(db store.IStore) echo.HandlerFunc

DownloadClient handler

func EmailClient added in v0.3.0

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

EmailClient handler to send the configuration via email

func Favicon added in v0.5.0

func Favicon() echo.HandlerFunc

func GetClient added in v0.2.5

func GetClient(db store.IStore) echo.HandlerFunc

GetClient handler returns a JSON object of Wireguard client data

func GetClients added in v0.2.5

func GetClients(db store.IStore) echo.HandlerFunc

GetClients handler return a JSON list of Wireguard client data

func GetHashesChanges added in v0.5.0

func GetHashesChanges(db store.IStore) echo.HandlerFunc

GetHashesChanges handler returns if database hashes have changed

func GetOrderedSubnetRanges added in v0.6.0

func GetOrderedSubnetRanges() echo.HandlerFunc

GetOrderedSubnetRanges handler to get the ordered list of subnet ranges

func GetUser added in v0.5.0

func GetUser(db store.IStore) echo.HandlerFunc

GetUser handler returns a JSON object of single user

func GetUsers added in v0.5.0

func GetUsers(db store.IStore) echo.HandlerFunc

GetUsers handler return a JSON list of all users

func GetWakeOnLanHosts added in v0.3.7

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 added in v0.3.5

func Health() echo.HandlerFunc

Health check handler

func LoadProfile added in v0.5.0

func LoadProfile() 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 added in v0.5.0

func NeedsAdmin(next echo.HandlerFunc) echo.HandlerFunc

func NewClient

func NewClient(db store.IStore) echo.HandlerFunc

NewClient handler

func RefreshSession added in v0.6.0

func RefreshSession(next echo.HandlerFunc) echo.HandlerFunc

RefreshSession must only be used after ValidSession middleware RefreshSession checks if the session is eligible for the refresh, but doesn't check if it's fully valid

func RemoveClient

func RemoveClient(db store.IStore) echo.HandlerFunc

RemoveClient handler

func RemoveUser added in v0.5.0

func RemoveUser(db store.IStore) echo.HandlerFunc

RemoveUser handler

func SaveWakeOnLanHost added in v0.3.7

func SaveWakeOnLanHost(db store.IStore) echo.HandlerFunc

func SendTelegramClient added in v0.6.0

func SendTelegramClient(db store.IStore) echo.HandlerFunc

SendTelegramClient handler to send the configuration via Telegram

func SetClientStatus

func SetClientStatus(db store.IStore) echo.HandlerFunc

SetClientStatus handler to enable / disable a client

func Status added in v0.3.1

func Status(db store.IStore) echo.HandlerFunc

Status handler

func SuggestIPAllocation

func SuggestIPAllocation(db store.IStore) echo.HandlerFunc

SuggestIPAllocation handler to get the list of ip address for client

func UpdateClient added in v0.2.5

func UpdateClient(db store.IStore) echo.HandlerFunc

UpdateClient handler to update client information

func UpdateUser added in v0.5.0

func UpdateUser(db store.IStore) echo.HandlerFunc

UpdateUser to update user information

func UsersSettings added in v0.5.0

func UsersSettings() echo.HandlerFunc

UsersSettings handler

func ValidSession added in v0.3.0

func ValidSession(next echo.HandlerFunc) echo.HandlerFunc

func WakeOnHost added in v0.3.7

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 added in v0.3.7

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