server

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2026 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// DefaultConfig for the API server
	DefaultConfig = Config{
		Stage:        "development",
		Port:         8080,
		ReadTimeout:  10,
		WriteTimeout: 5,
		Debug:        true,
		AllowOrigins: []string{"*"},
	}
)

Functions

func New

func New(cfg *Config) *echo.Echo

New instantates new Echo server

func Start

func Start(e *echo.Echo, isDevelopment bool)

Start starts echo server

Types

type Config

type Config struct {
	Stage           string
	Port            int
	ReadTimeout     int
	WriteTimeout    int
	Debug           bool
	AllowOrigins    []string
	IsEnableSwagger bool
	SwaggerPath     string
}

Config represents server specific config

Directories

Path Synopsis
middleware
jwt

Jump to

Keyboard shortcuts

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