serverconfig

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: May 14, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package serverconfig loads a kukeond ServerConfiguration document from disk. Used by `kukeond --configuration` (daemon root command) and `kuke init --server-configuration` to feed defaults into viper before the daemon starts. An absent file returns a zero-value document so the caller can fall back to its existing defaults without an error.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Load

Load reads path and returns the parsed ServerConfiguration. When the file does not exist, returns a zero-value document and no error — the absent case is normal (callers fall back to hardcoded defaults). Any other read or parse failure is wrapped with errdefs.ErrServerConfigurationInvalid.

func WriteDefault

func WriteDefault(path string) (bool, error)

WriteDefault writes the commented default ServerConfiguration to path when the file is absent. Returns true only when this call created the file; an existing file (any contents) is left untouched, satisfying the "first-write only" rule. Creates the parent directory if missing. Any other failure is returned wrapped.

Types

This section is empty.

Jump to

Keyboard shortcuts

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