forked from ebhomengo/niki
23 lines
389 B
Go
23 lines
389 B
Go
package config
|
|
|
|
import (
|
|
"time"
|
|
|
|
"github.com/labstack/echo/v4"
|
|
)
|
|
|
|
type Config struct {
|
|
Port int `koanf:"port"`
|
|
Cors Cors `koanf:"cors"`
|
|
ShutDownCtxTimeout time.Duration `koanf:"shutdown_context_timeout"`
|
|
}
|
|
|
|
type Cors struct {
|
|
AllowOrigins []string `koanf:"allow_origins"`
|
|
}
|
|
|
|
type EchoServer struct {
|
|
Router *echo.Echo
|
|
Config Config
|
|
}
|