config

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2026 License: AGPL-3.0, AGPL-3.0-or-later Imports: 9 Imported by: 0

Documentation

Overview

Package config provides persistent configuration for the Hub.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	ID       string `json:"id"`
	Name     string `json:"name"`
	Platform string `json:"platform"`
}

Config holds the hub configuration.

type Manager

type Manager struct {
	// contains filtered or unexported fields
}

Manager handles loading and saving configuration.

func NewManager

func NewManager() (*Manager, error)

NewManager creates a new configuration manager.

func (*Manager) GenerateNewID

func (m *Manager) GenerateNewID() error

GenerateNewID generates a new unique ID (for troubleshooting).

func (*Manager) GetConfig

func (m *Manager) GetConfig() Config

GetConfig returns a copy of the current config.

func (*Manager) GetID

func (m *Manager) GetID() string

GetID returns the hub ID.

func (*Manager) GetName

func (m *Manager) GetName() string

GetName returns the hub name.

func (*Manager) GetPlatform

func (m *Manager) GetPlatform() string

GetPlatform returns the hub platform.

func (*Manager) Save

func (m *Manager) Save() error

Save writes config to disk.

func (*Manager) SetName

func (m *Manager) SetName(name string) error

SetName sets the hub name and saves config.

Jump to

Keyboard shortcuts

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