aahframe.work: aahframe.work/internal/settings Index | Files

package settings

import "aahframe.work/internal/settings"


Package Files

settings.go settings_nonwin.go


const (
    DefaultEnvProfile       = "dev"
    DefaultHTTPPort         = "8080"
    DefaultSecureJSONPrefix = ")]}',\n"
    ProfilePrefix           = "env."


type Settings Uses

type Settings struct {
    PhysicalPathMode       bool
    PackagedMode           bool
    ServerHeaderEnabled    bool
    RequestIDEnabled       bool
    SSLEnabled             bool
    LetsEncryptEnabled     bool
    GzipEnabled            bool
    SecureHeadersEnabled   bool
    AccessLogEnabled       bool
    StaticAccessLogEnabled bool
    DumpLogEnabled         bool
    Initialized            bool
    HotReload              bool
    HotReloadEnabled       bool
    AuthSchemeExists       bool
    Redirect               bool
    Pid                    int
    HTTPMaxHdrBytes        int
    ImportPath             string
    BaseDir                string
    VirtualBaseDir         string
    Type                   string
    EnvProfile             string
    SSLCert                string
    SSLKey                 string
    ServerHeader           string
    RequestIDHeaderKey     string
    SecureJSONPrefix       string
    ShutdownGraceTimeStr   string
    DefaultContentType     string
    HotReloadSignalStr     string
    HTTPReadTimeout        time.Duration
    HTTPWriteTimeout       time.Duration
    ShutdownGraceTimeout   time.Duration
    Autocert               *autocert.Manager
    // contains filtered or unexported fields

Settings represents parsed and inferred config values for the application.

func (*Settings) HotReloadSignal Uses

func (s *Settings) HotReloadSignal() os.Signal

HotReloadSignal method returns type `os.Signal` based on config `runtime.config_hotreload.signal`. Default signal value is `SIGHUP`.

Note: `SIGUSR1`, `SIGUSR2` is not applicable to Windows OS.

func (*Settings) Refresh Uses

func (s *Settings) Refresh(cfg *config.Config) error

Refresh method to parse/infer config values and populate settings instance.

func (*Settings) SetImportPath Uses

func (s *Settings) SetImportPath(args []string)

SetImportPath method process import path and sets it into settings instance.

Package settings imports 13 packages (graph) and is imported by 3 packages. Updated 2019-04-17. Refresh now. Tools for package owners.