handlers

package
v0.0.0-...-9780e12 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2025 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateDeviceMap

func CreateDeviceMap(devices []*models.Device) map[string]*models.Device

CreateDeviceMap converts a slice of Device structs into a map with DeviceID as the key.

func SetHandlerRepository

func SetHandlerRepository(r *Repository)

SetHandlerRepository sets the global repository (used globally if needed)

Types

type AuthHandler

type AuthHandler struct {
}

func (*AuthHandler) Login

func (h *AuthHandler) Login(w http.ResponseWriter, r *http.Request)

func (*AuthHandler) Logout

func (h *AuthHandler) Logout(w http.ResponseWriter, r *http.Request)

type DeviceHandler

type DeviceHandler struct {
}

func (*DeviceHandler) Destroy

func (h *DeviceHandler) Destroy(w http.ResponseWriter, r *http.Request)

func (*DeviceHandler) Get

func (*DeviceHandler) Index

func (h *DeviceHandler) Index(w http.ResponseWriter, r *http.Request)

func (*DeviceHandler) Store

func (h *DeviceHandler) Store(w http.ResponseWriter, r *http.Request)

func (*DeviceHandler) Update

func (h *DeviceHandler) Update(w http.ResponseWriter, r *http.Request)

type FavoriteHandler

type FavoriteHandler struct {
}

func (*FavoriteHandler) Update

func (h *FavoriteHandler) Update(w http.ResponseWriter, r *http.Request)

type LoraHandler

type LoraHandler struct {
}

func (*LoraHandler) UpChirpstack

func (h *LoraHandler) UpChirpstack(w http.ResponseWriter, r *http.Request)

type Repository

type Repository struct {
	App *core.App
}

Repository holds shared application configurations (App)

func GetRepo

func GetRepo() *Repository

GetRepo returns the global repository instance

func Initialize

func Initialize(app *core.App) *Repository

Initialize initializes the Repository with App and returns it

type SettingHandler

type SettingHandler struct {
}

func (*SettingHandler) Update

func (h *SettingHandler) Update(w http.ResponseWriter, r *http.Request)

type SigfoxHandler

type SigfoxHandler struct {
}

func (*SigfoxHandler) Up

type TestHandler

type TestHandler struct {
}

TestHandler is a handler for test routes, with access to shared Repository

func (*TestHandler) Index

func (h *TestHandler) Index(w http.ResponseWriter, r *http.Request)

Index handles the /test route

type UserHandler

type UserHandler struct {
}

func (*UserHandler) Destroy

func (u *UserHandler) Destroy(w http.ResponseWriter, r *http.Request)

func (*UserHandler) Index

func (u *UserHandler) Index(w http.ResponseWriter, r *http.Request)

func (*UserHandler) Store

func (u *UserHandler) Store(w http.ResponseWriter, r *http.Request)

func (*UserHandler) Update

func (u *UserHandler) Update(w http.ResponseWriter, r *http.Request)

type VueHandler

type VueHandler struct {
}

func (*VueHandler) ServeIndexWithVariables

func (v *VueHandler) ServeIndexWithVariables(w http.ResponseWriter, r *http.Request)

Jump to

Keyboard shortcuts

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