internal

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2026 License: MIT Imports: 14 Imported by: 0

README

internal Directory

El directorio internal encapsula toda la lógica interna del proyecto. Aquí se encuentran controladores, utilidades, gestión de TLS y apagado del servidor. Estos componentes están diseñados para soportar las funcionalidades centrales de la aplicación de manera modular y reutilizable.


Contents

handlers/ Directory

Controllers that handle incoming requests:

  • countries.go: Returns a list of countries from the database.
  • error_handler.go: Manages custom error pages for different routes.
  • health_handler.go: Simple endpoint (/ping) to verify system status.
  • logs_handler.go: Provides access to system logs with pagination and filtering.
  • server_info.go: Returns server information like statistics, version, and TLS details.
utils/ Directory

Helpers for common tasks:

  • file_utils.go: Checks the existence of files/directories and retrieves the executable's base path.
  • http_utils.go: Maps HTTP codes to descriptive messages.
  • log_utils.go: Methods for analyzing and processing logs (e.g., validate format and timestamp).
  • network_utils.go: Retrieves network info like public and private IP addresses.
  • tls_utils.go: Determines the TLS version used in a connection.
shutdown.go

Manages graceful shutdown for HTTP and HTTPS servers upon signals like SIGINT or SIGTERM.

server.go
  • Sets up the HTTPS server with certificates.
  • Configures HTTP to HTTPS redirection.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CatchSignalDual

func CatchSignalDual(serverTLS, serverHTTP *http.Server)

func LoadAllCertificates

func LoadAllCertificates(sites []loaders.SiteConfig) error

func SetupServerHTTP

func SetupServerHTTP(router http.Handler) (*http.Server, error)

func SetupServerHTTPS

func SetupServerHTTPS(router http.Handler) (*http.Server, error)

Types

This section is empty.

Directories

Path Synopsis
jwt

Jump to

Keyboard shortcuts

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