client

package
v0.4.12 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2025 License: MIT Imports: 12 Imported by: 0

Documentation

Overview

client/registerEndpoints.go

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetCoreClient

func GetCoreClient() interface{}

GetCoreClient returns the core client instance for advanced usage

func GetSessionStats

func GetSessionStats() map[string]interface{}

GetSessionStats returns current session statistics

func InitializeClient

func InitializeClient(serverCfg *cfgType.ServerConfig) error

InitializeClient sets up the client package with server configuration

func PrependDir

func PrependDir(dir string, files []string) []string

Helper function to prepend a directory path to a list of filenames

func RegisterEndpoints

func RegisterEndpoints(mux *http.ServeMux)

RegisterEndpoints registers all endpoints on the given mux

func RegisterPWARoutes

func RegisterPWARoutes(mux *http.ServeMux)

RegisterPWARoutes registers PWA-related routes

func RenderTemplate

func RenderTemplate(w http.ResponseWriter, data PageData, view string)

RenderTemplate renders a template with the standard layout

func ShutdownClient

func ShutdownClient() error

ShutdownClient gracefully shuts down the client package

Types

type ClientInitError

type ClientInitError struct {
	Message string
}

ClientInitError represents initialization errors

func (*ClientInitError) Error

func (e *ClientInitError) Error() string

type PWAIcon

type PWAIcon struct {
	Src     string `json:"src"`
	Sizes   string `json:"sizes"`
	Type    string `json:"type"`
	Purpose string `json:"purpose,omitempty"`
}

PWAIcon represents an icon in the manifest

type PWAManifest

type PWAManifest struct {
	Name            string          `json:"name"`
	ShortName       string          `json:"short_name"`
	Description     string          `json:"description"`
	StartURL        string          `json:"start_url"`
	Display         string          `json:"display"`
	BackgroundColor string          `json:"background_color"`
	ThemeColor      string          `json:"theme_color"`
	Orientation     string          `json:"orientation"`
	Scope           string          `json:"scope"`
	Lang            string          `json:"lang"`
	Categories      []string        `json:"categories"`
	Screenshots     []PWAScreenshot `json:"screenshots,omitempty"`
	Icons           []PWAIcon       `json:"icons"`
}

PWAManifest represents the web app manifest structure

type PWAScreenshot

type PWAScreenshot struct {
	Src        string `json:"src"`
	Sizes      string `json:"sizes"`
	Type       string `json:"type"`
	FormFactor string `json:"form_factor,omitempty"`
	Label      string `json:"label,omitempty"`
}

PWAScreenshot represents a screenshot in the manifest

type PageData

type PageData struct {
	Title string
	Theme string
}

Directories

Path Synopsis
client/core/eventSerializer.go
client/core/eventSerializer.go

Jump to

Keyboard shortcuts

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