config

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package config manages the sql-archiver configuration file.

The config file is stored at $HOME/.config/sql-archiver/config.yaml and holds a list of saved connection profiles under the "connections" key:

connections:
  - name: "local"
    host: "localhost:1433"
    user: "sa"
    password: "secret"

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeleteConnection

func DeleteConnection(name string) error

DeleteConnection removes the connection with the given name from the config file. If no connection with that name exists the call is a no-op.

func LoadConnections

func LoadConnections() ([]domain.Connection, error)

LoadConnections reads all saved connections from the config file. If the config file does not exist or contains no connections, an empty slice is returned without an error.

func SaveConnection

func SaveConnection(c domain.Connection) error

SaveConnection writes a connection to the config file. If a connection with the same Name already exists it is replaced; otherwise it is appended.

Types

This section is empty.

Jump to

Keyboard shortcuts

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